Visual Studio 2010's support for .NET 4.5 - c#

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.

Related

is it necessary to install VS 2010 on server while migrating from .net 2.0 to 4.0

I have project in .net 2.0 with visual studio 2008.
I want to migrate to .net 4.0.
So is it necessary to install VS 2010.
Or with VS 2008 i can use .net 4.0 ???
Please help me.
VS2008 support .NET framework 3.5 max..
You will have to use VS2010 to work on .NET framework 4.0
4.0 is different from the previous .NET versions, vs2008 does not support 4.0. You have to migrate to VS2010 if you want to upgrade to 4.0.

VS 2012/2013 and .NET 4.5 Query

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.

visual studio 2012 .net frame work compatability

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.

Rookie build and deployment a dynamic library question

I had a request to write a dll library using C#, it should be build under .NET 3.5.
I've build the library (it's a simple TCP client) using Visual Studio 2005 with .NET 2.0.50727.
I'm assuming that I can not deliver this library since it's built against wrong .net
I have more .NET versions installed on my development machine but it looks like I can't switch the .net in properties like JDK versions in eclipse for a particular project.
Is the only proper way of doing this is installing Visual Studio 2008 Express with 3.5 .NET?
Or some C# sdk with appropriate compiler (the thing is that I don't know the syntax for the c# compiler and NANT would be pain in the ass at this stage)?
cheers
P.
As jgauffin already mentioned your .Net 2.0 assembly will work fine in .Net 3.5.
And switching to another .Net Framework is just downwards possible.
So with VS2010 you can built against .Net 4, 3.5, 2.0 and 1.1
With VS2008 you can built against .Net 3.5, 2.0 and 1.1
With VS2005 you can built only against .Net 2.0
With VS2003 you can built only against .Net 1.1
So if you really need it just go and download it from here.
3.5 is just 2.0 with additional libraries. Your DLL will work fine from a .Net 3.5 application.
I might be wrong, but I think that 3.5 was introduced with Visual Studio 2008 and cannot be built against with 2005. That's why you can't switch version.

should i use Microsoft Visual C# 2010 Express to create a .Net 3.5 targeted, WPF Application?

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.

Categories