I am aware that you can probably build a lower version of .NET, but is it possible for me to build a project against the .NET framework version 4?
No, each version of Visual Studio is only capable of targeting the framework it was released with and lower ones. (Leaving .NET 1.1 out of it...) So...
- VS2005 can only compile against .NET 2.0 (and .NET 3.0 with some extensions, admittedly)
- VS2008 can compile against .NET 2.0, .NET 3.0 and .NET 3.5
- VS2010 can compile against .NET 2.0, .NET 3.0, .NET 3.5 and .NET 4.0
(And then there's client profiles, the Compact Framework, Silverlight etc.)
No.
You can however just get the .NET framework. That will give you the necessary assemblies and the compiler. While Visual Studio is great, it is not necessary.
I think technically yes, but certainly not easily. You could customise the build process by hand to use the (freely available) compilers from the .NET 4 framework. You'd have to install .NET 4 by hand and then roll your own build scripts from scratch, if you wanted full integration, or hand-compile your projects from the command line.
It's worth remembering, though, that VS2005 wouldn't have IntelliSense support or compiler integration for .NET 4, so you're not going to have anything like a pleasant experience in the IDE. Notepad might be easier!
To be honest I'm not sure it's something I'd consider attempting!
VS is retrocompatible, but the opposite is false. This is a one way ticket. VS2005 is only compatible with .NET 2.0, and retrocompatible to 1.1 and 1.0.
Then, final answer is no. For example, VS2005 won't run on Vista unless you install Vista SP1.
No, VS2005 can only build against the .Net Framework 2.0. Support for multiple runtimes didn't show up until VS2008. You can use MSBee to build against 1.1 in 2005, but that is the closest you can get to multiple runtime targets.
If you use a seperate build tool, like NAnt, then you can target multiple framework versions (including Silverlight and Mono), assuming the code will compile against those frameworks.
No, not even for VS 2008 according to Scott Guthrie (who would certainly know):
There isn't any way to target .NET 4 from VS08 and use new features. Having said that, .NET4 is upwards comaptible with .NET 3.5 - so applications you build targeting .NET 3.5 with VS08 should work fine on top of .NET
Similar question here: