Can you please help me with this. Am I able to run .net 2.0 in visual studio 2012? Can you direct me to the diagrams that show the framework compatibility?
Yes. You are able to build .Net v2.0 projects in the Visual Studio 2012.
Here goes the list of all available versions of .Net Framework:
http://pasteboard.s3.amazonaws.com/images/uWRTNBl.png
Framework targeting does not guarantee that your application will run correctly. You must test your application to make sure it runs against the targeted version. You cannot target framework versions that are earlier than the .NET Framework 2.0.
http://msdn.microsoft.com/en-us/library/bb398197(v=vs.110).aspx
In short, yes, you can target .NET 2.0 - and no, there's no master list of compatibility issues.
Related
I'm new to .net framework. Have few queries.
Does visual studio requires .net framework to be pre installed in the system.
Does visual studio comes with .net framework within it. So no need to install separately.
If .net framework comes within visual studio, is it different version for different vs versions.
I have seen that in application tab we have target framework, may I know from where all these different versions of .net framework visual studio has.
Application developed with one version say 4.5 , can this run on 4.0 and do we have to modify this version first to 4.0 and then run it.
When you're installing VS it's automatically install default version of .net framework for current Visual Studio , but you can additionally install any other versions if you need, it's like an additional nozzle to the vacuum cleaner :-)
I am planning to install VS 2012 or 2013 and I was wondering if .NET 4.5 will get installed with it? I think it will but then what will happen to all my apps with target platform 4.0?
So my question is when I install VS, will my old apps which have target platform 4 contain elements of .NET 4.5?
Let say as example type string in 4.5 it has some improvements or something which 4.0 doesnt have. Will I get them even though I build against 4.0 according to target platform?
I would like to avoid some strange behavior in already existing projects just because I am running now visual studio 2013.
Any experience on this one guys?
Sorry in case of a duplicate question
In Visual Studio 2013 you can still build against .NET 4.0. The (highest) framework version installed on your development machine has no influence on the end result of your build process.
When installing .NET 4.5 in place of .NET 4 will change something on your PC: It gives you the ability to compile against the 4.5 version of the framework. As long as your compile your code against the NET 4.0 version, it has no need of .NET 4.5 to be installed.
If you target .NET 4.0, your code will not be able to access types which are specific to .NET 4.5 or .NET 4.5.1. However, your code will be running against .NET 4.5. That is only a problem if you do not test against .NET 4.0. In that case, you could find that bugs are fixed in .NET 4.5, but your users may still be using .NET 4.0, which may still have the bugs.
Having read numerous posts on the net and here at Stack Overflow about this I still am unsure as to whether VS 2010 supports .NET 4.5. MS states on http://www.microsoft.com/en-in/download/details.aspx?id=30653 that it is an in place upgrade .NET 4.
Does this mean that once .NET 4.5 has been installed on a machine with VS2010 installed I can still leave my target as .NET 4 but it will actually be using 4.5? For various reasons I cannot upgrade to VS 2012.
All pointers greatly appreciated.
You can't target .NET 4.5 with VS2010.
.NET 4.5 does not install side by side with .NET 4.0, it replaces it. But it still allows you to target .NET 4.0 with it installed, so it shouldn't break the installation AFAIK. But you can't utilize any of the .NET 4.5 features since you can't target anything higher than .NET 4.0 in Visual Studio 2010.
If you need to use these features, you will have to install Visual Studio 2012.
I am porting a project built on VS2008 to VS2005 since the minor .NET version for us have to 2.0 instead of 3.5 and rest of our code is building on VS2005. So I modified the visual studio version from 2008 to 2005 at the .sln file
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
So I am able to load the .sln into the VS2005. I have some building problem, mainly the "var" and after I modified those lines with real data type, the code compiles and runs.
However at the project assembly reference. I found out that my code is still reference Linq which is from .NET 3.5:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll
When I open up the dialog to add new reference, I could see that the .NET version 2.0, 3.5 and even 4.0 (although the CLR runtime version is 2.0.50727 in most of cases. sometimes 1.x and sometimes 4.0, Linq's runtime version is 2.0.50727).
I thought that VS2005 only supports .NET 2.0 which seems not that case here. So I guess how can I make sure that my application would only require .NET 2.0 framework. Is it enough to make sure that I only reference .NET 2.0 and below reference?
As long as the target framework is .NET 2.0 and you don't reference any libraries that do target higher .NET framework versions, your app should run just fine on .NET 2.0.
That said, I believe Visual Studio 2008 supports multi-targeting, so you should be able to use VS2008 but still target .NET 2.0 as your output type. Additionally, VS2010 and VS2012RC also support .NET 2.0 only projects.
To answer the exact question in the title (for the benifit of those who find this page by its title) the .NET version used by default in Visual Studio 2005 is .NET v2.0.
You can still use VS2008. VS2008 fully supports 2.0-only projects (just change the project settings). When in 2.0 mode VS will disable any 3.0 and 3.5 assemblies as well as any C# language features that depend on 3.0 or 3.5 library classes (such as extension methods, but there is a workaround to get those working with 2.0).
I'll say that VS2010 also supports 2.0-only projects too.
i want to use Visual C# 2010 Express to create a .Net Framework 3.5 using WPF Application- this is due to the comfort that 2010 version gives to its user... (me)
So should I use version 2010 to create a WPF Application in .Net Framework 3.5? if yes, than how do i do that?
Thanks,
Din
You can target a previous version of the .NET Framework in Visual Studio 2010 (and 2008), for more info, see the MSDN How To article.
Creating your assembly like this is just fine, if you are not yet comfortable working the the new .Net revision. You can always retarget to .Net 4.0 later if you want to, and rewrite any code that could benefit from new additions to the Framework or language.
In corporate environments, it's not uncommon for older versions of .Net to be the desktop standard, and in that case you would have to target the specific version of the framework.