3

Let's say I have a compiled C# application which was created with Visual Studio. A .exe file. I want to run the file on another computer. What are the system requirements for the computer in order to run the file? Does it have to have the same .Net Framework version used while creating the C# program?

LevvanGOALski
  • 31
  • 1
  • 3
  • It don´t have to be the same .Net version. You can choose the required .Net version of your software in the settings of your project. – Fruchtzwerg Oct 31 '15 at 20:55
  • In addition to .net framework you'll need all other non-system assemblies , which are referenced by your .exe project on the target machine – Igor Bendrup Oct 31 '15 at 21:00

2 Answers2

0

You can set the .NET Framework requirements in the Project's Properties Page.

Target Framework Setting Property of Project

You can get to this page in Visual Studio by Opening a Windows Forms or WPF Project, right click on the Project in question and choose Properties.

Pedram Soheil
  • 88
  • 1
  • 8
0
  • Short answer:

    Yes, the client computer would need the .NET framework version targeted by your program.

  • Long answer:

    C# programs precompiles to IL -- binaries that are entirely dependent on the .NET framework. In your projects settings you can choose the .NET version you'd like to use (a lower version implies less language features but more compatibility usually).

    You can use a linker though (and go native, woo!). See Salamander.

Gabe
  • 1