Reputation: 43
If I compile a simple(no additional libraries or assemblies) c# application, can I assume it will run on any new windows 7 machine natively or do I have to worry about end users having .Net or other libraries installed?
Upvotes: 4
Views: 202
Reputation: 21
Windows 7 ships with .Net 3.5, so, if you this .net version or lower, your application should be able to run on any Windows 7 installation
Upvotes: 2
Reputation: 11544
Windows 7 includes the .NET Framework 3.5.1 as an OS component.
This means you will get:
However, if you're using newer versions of .NET, and if you're using libraries that don't get shipped with the above, then you still need to consider packaging these up in an MSI/installer.
This page on Wikipedia has a good summary:
http://en.wikipedia.org/wiki/.NET_Framework#Versions
If this is anything more than a "quick and dirty" app, or unless you work in an area where you know exactly what the target machines look like (i.e. a corporate environment with a locked down OS image) then I'd suggest you look at building an installer and deal with pulling down the pre-requisites as appropriate. (WiX is my recommended way of doing that).
And WiX questions are tagged here on SO...
https://stackoverflow.com/tags/wix/
Upvotes: 8
Reputation: 13350
You need the appropriate .Net framework installed to match what your C# program was written with. If you don't have the correct framework, download it from microsoft.com.
Upvotes: 1
Reputation: 62027
Windows 7 comes preinstalled with .NET 3.5.1 which includes 3.5 SP1, so unless you need features of .NET 4 it should work just fine.
Upvotes: 5