Howard Pinsley
Howard Pinsley

Reputation: 11468

Can I safely move my project to .NET 4.0?

I've migrated my project to VS2010 but have not yet targeted .NET 4.0. It's currently targeting 3.5 SP1 (and CLR 2). The project relies on several third party components -- mostly open source -- that were presumably built against the 2.0 CLR.

Can I simply retarget my project to the 4.0 runtime? Or do I have to get new versions of all the referenced assemblies on which it depends?

I've read a little about the new in-process side-by-side feature of .NET 4.0, but I don't think it applies here (the example I read was about two different .NET plug ins to an office application). My situation is different. My solution directly references assemblies and I wouldn't think side-by-side applies -- unless I don't understand its purpose.

TIA

Upvotes: 2

Views: 213

Answers (2)

Aaronaught
Aaronaught

Reputation: 122634

You can probably retarget, but the success or failure will depend entirely on the specifics of what your application is doing.

Have a look through the links posted here: Breaking changes in .NET 4.0.

Most breaking changes will either be compiler issues or Framework issues. You most likely don't need to worry about compiler issues, because you've already migrated to Visual Studio 2010. Breaking changes in the Framework, on the other hand, are very important to understand, because you may not notice them until long after you've deployed a new version and the bug reports start pouring in.

Upvotes: 1

Allon Guralnek
Allon Guralnek

Reputation: 16121

Try running your app using .NET 4.0 (without changing it) by using the method described here:

http://social.msdn.microsoft.com/Forums/en/netfxsetupprerelease/thread/d6d8957e-742a-4cc2-b5c1-d9130ea423d0

If it works and there are no issues, you can migrate your project by retargeting to .NET 4.

Upvotes: 0

Related Questions