If you want your code to run properly on another system you must distribute it correctly. There are two options. If your friend is a developer and they have the correct libraries installed then it will work. The second option is some type of deployment strategy. MSVS use to have very good support for setup and deployment but now I would recommend using an open source installer. The installer should detect that .NET 4 is not installed and will proceed to download and install it from Microsoft. Getting C# to run on other Windows-based systems is far far simpler than C++ but both come down to proper deployment of your application.