Reputation: 17949
Very simple question, if you compile a program with .NET 4.0 (a program that explicitly uses a feature from .NET 4.0 which is not available in previous framework versions), say a command line program, and you deploy it to a computer that doesn't have .NET 4.0 (let's say it only has .NET2.0 framework).
What happens when you run the .exe from the command line? Is there an exception thrown? Which exception?
I could test myself but I don't have right now a Windows box handy that lacks this framework version.
Thanks in advance.
Upvotes: 0
Views: 336
Reputation: 1957
You might get an System.IO.FileLoadException with a message:"Could not load file or assembly ... Version 4.0.0 ..." when you try to run a .NET 4 program on a machine with a previous version of .NET installed.
Hope this helps...
Upvotes: 0
Reputation: 34013
You won't be able to start the executable as a whole. You will either get an Exception (in the form of Windows encountered an error.. etc) Or you will get a notice that you don't have the right .NET version (not to sure about this last part though..)
Upvotes: 0