Planning to upgrade VS 2005 to VS 2010 - visual-studio-2010

I have installed VS 2010 and want to migrate all code written in VS 2005 to VS 2010.
Please note that we do not have VS 2008, all code are in C# 2.0 and Asp.net 2.0 only.
Can anyone please tell me now what all points need to be considered while migrating.
Update:
I have set target framework to 2.0 for all of my Libraries and web projects. It complies without any error!
However, when site opens in IE (Set to default.aspx), it gives me error as below:
InternalXmlHelper.vb(9) : error BC30560: 'ExtensionAttribute' is
ambiguous in the namespace 'System.Runtime.CompilerServices'.
<Global.System.Runtime.CompilerServices.ExtensionAttribute()> _

Keep all the target framework settings to .NET 2.0. This way, there should be no compilation problem at all.
The changes that you should see are the solution and project files only.

Start with known good solutions in source control (and label—you shouldn't need to go back, but easy to add an extra safety net).
Open each solution in VS2010, allow the conversion wizard to do the conversion.
Resolve any issues.

Honestly, if you're just upgrading VS 2010 you don't really need to consider much. Just keep backups (any real SCM product will do) and you're good. You don't have to upgrade your applications' runtime targets at all if you don't want to.
If you're building with CAS policy, you might run into issues with using MSBuild 4.0 to build you 2.0 applications. If you don't know what I'm talking about, never mind.
My advice is to make sure everyone's "checked in" to your source code provider, and run the conversion wizard and see how it goes.

Related

.net core visual studio publish is including runtimes

I'm currently using a .net core visual studio publish, and its including the runtime dlls in the output. I do not want these files, but would like to use the hosting bundles on the server.
This is a new thing, it didn't use to include these dlls with a publish. I think it might have been triggered by a visual studio update, but I am not positive why its happening.
Here's my settings:
The Deployment Mode is not set to "Self-Contained" which I think is the setting that should force the runtime to be included.
I've done tons of googling but can't seem to find any other configuration that would be related to this. Any guidance would be greatly appreciated!
Posting an answer, just in case anyone else ends up here. I found the answer mostly because of Lex Li comment.
The most recent upgrade to visual studio / .net core seems to require you to specificity a target runtime in your Publish Profile. In order to make this work, you will be forced to upgrade your project to 2.1 or higher. Otherwise visual studio will choose portable by default, and include the runtime dlls in the publish.

Building Compact Framework applications with VS2010 (without VS2005)

I want to perform a .NET CF 2.0 build using VS2010. I know it's not supported "normnally," but I've seen this answer: ( .NET Compact Framework with Visual Studio 2010? ) ...and I want to use that approach.
The blog post cited there says I need to modify the .csproj files for the .NET CF projects, to point to a particular Microsoft.CompactFramework.Common.targets . But I don't have that file.
I figured I needed to install the Windows Mobile 6 Standard SDK to get it.
I tried installing it and get this:
I have seen this question:
Windows Mobile 6 Standard SDK Refresh install issue on Visual Studio 2010 Professional Beta 2
I don't think the solution proposed there is workable for me. I do not have VS2008. I do not have VS2005. I have only VS2010, and I have no installable media for those other products.
I have also tried the administrative install (msiexec /a), but the resulting directory structure doesn't contain any files like Microsoft.CompactFramework.Common.targets .??
Q1:
Is there a way for me to install WM6 Standard SDK?
Q2: Anyone know the reg key that it looks for to determine if I have the appropriate pre-reqs?
Is this going to work if I just fiddle with my registry?
Q3: Is my assumption wrong? Really I want the Microsoft.CompactFramework.Common.targets file and its friends. Where can I get this? (I have no existing VS2008 machine to suck from)
Q4: Another approach I can think of is getting an eval version of VS2008, installing that into a VM, then installing the WM6 Std SDK there, then grabbing the Microsoft.CompactFramework.Common.targets file from that. Long way round. Is this gonna work and is it worth the trouble?
ANSWER
Here's the answer.
It is possible to build CF apps with VS2010, as outlined in Joel Fjorden's blog post. There are pre-requisites you need, in order to make this happen.
I believe the only official way to get the required files, including Microsoft.CompactFramework.Common.targets , Microsoft.CompactFramework.CSharp.targets , Microsoft.CompactFramework.VisualBasic.targets and Microsoft.CompactFramework.Build.Tasks.dll , is to install the related version of Visual Studio. These files are all version-specific, so to get the files for building for .NET CF 2.0, you need to install VS2005, and for .NET CF 3.5 you need to install VS2008. Installing VS2010 gives you neither. It works to use eval versions of the tools. It worked for me anyway.
If you are willing to go custom, you can simply copy these files from a working installation of VS2005 or VS2008 (or both), into the appropriate .NET directory, usually something like C:\Windows\Microsoft.NET\Framework\v2.0.50727 (change the version as appropriate). Chris Tacke has helpfully posted a link to the files you need. I don't know if copying these files violates the license for VS20?? , I am not a licensing expert.
You cannot get these files from the Windows Mobile SDK, as far as I can tell. Even so, you might still want a version-specific mobile SDK to get the emulators and skins and so on.
This is a basic "build" capability. It works but it doesn't give you designer support, debugging capability, built-in project templates, and so on. My advice to anyone who wants to do forward development on .NET CF is to use the tools that are geared toward those tasks - VS2005 or VS2008.
Thanks to Chris Tacke for posting a link for the files.
Not sure if it's any help, but the CF targets files from VS2008 can be found here. Let us know if you make any progress.
The "Power Toys for .NET Compact Framework" package (currently found at http://www.microsoft.com/en-us/download/details.aspx?id=13442) also contains the required files.
Thought I'd leave that here since it's an official Microsoft download.

Custom attributes are not consistent errors moving a VS 2008 solution to VS 2010

I'm trying to move my VS 2008 solution to VS 2010. Everything works perfectly (compile and link) if I keep the target framework at 4.0.
When I change the framework 2.0 and change the platform framework v100 (to get past compile errors) only to run into metadata linking errors, like this one:
error LNK2022: metadata operation failed (80131195) : Custom attributes are not consistent: (0x0c0000f7). C:\Development\Main\Filemaster\SoxService\MSVCMRTD.lib(managdeh.obj)
I've read that I'm supposed to use ILDAsm but it doesn't like my obj file and since the link didn't complete I don't have an exe to load.
Can anyone please provide some advice on how to find the sorts of errors?
I hate nothing worse than fighting the tool!
I was able to get around this problem by going into the project XML file itself and changing the TargetFramework to be 4.0 After that everything compiled and linked fine.
Hans he is referring to C++ Native Multi-Targeting which can be found at this location Platform Framework can be changed under project Properties > General and is advised by the article - however this does not work due to apparent bugs in VC++

Configuration Section Designer alternative

The project Configuration Section Designer http://csd.codeplex.com is such a great tool but now I've moved to VS2010 (forced actually) and it doesn't support 2010. I use this tool a great deal but now I can't and I have a ton of config stuff to write.
Is there an alternative to this tool that will work with VS2010?
I'm hoping for a good solution and not having to do a project in VS2008 and manually import the generated files. Ugh, the thought of using appSettings to store configuration is just horrid.
I was recently added as a contributor to this project (andym1978). I was able to fix the code to support VisualStudio 2010. We want to do more testing before releasing to the official 2.0 downloads area, but I've uploaded an unofficial 2.0 release
HERE. Please report bugs to the issues page and I will get to them ASAP.
There is an open discussion regrading this matter.
currently it seems like there is no formal version that is built for vs2010.
more information here : http://csd.codeplex.com/discussions/73703?ProjectName=csd
The version for VS 2010 is now available.
http://csd.codeplex.com/

What to look out for when moving from Visual Studio 2005 to 2008?

We're planning on updating our developers from Visual Studio 2005 to 2008. Are there any common "gotchas" to look out for during this move?
My major concern at the moment is that we use WSE 3.0 quite a bit (mostly to consume external .asmx web services, but we also host a few ourselves). Will that be an issue since WSE 3.0 has been replaced by WCF?
Additional background info: VB.NET application with several web sites, not web applications. Currently using .NET 2.0 with plans to upgrade to 3.5 soon as well.
Anything else we should be concerned about?
I think the main issue you have to watch out for is upgrading teams. Once you upgrade to a new version of Visual Studio, you will be forced to upgrade your project files as well. Once the upgrade is complete the file will no longer be compatible with previous versions of Visual Studio. This means that you will break anyone who is using the previous version of VS to develop. The best advise is to upgrade the entire team.
The best way to work around this is to keep 2 versions of the project file around. One for the previous version of Visual Studio and the other for the current. This obviously has a bit of overhead. And Once you actually start using new language features this will no longer be a sufficient as the new features likely won't compile in the old versions of Visual Studio.
The changes in the visual editor for things like ASP.NET projects (especially when it comes to styling elements) is very different and can be incredibly frustrating at first.
I've found VS05-08 migration pretty painless. In theory, you should be able to simply open the 2005 solution in VS2008, let it convert, and everything just works. VS2008 lets you 'target' a specific version of .NET, and the default here would be that it continues to target .NET 2.0. That said, 3.5 is an additive update, so there should be little or no breaking changes to any .NET 2.0 code should you change to 3.5 (which is just a drop-down-box to change). I'm pretty sure the WSE stuff should "just work".
In practice, things like project templates, dependencies, etc. could be an issue. Web sites and web applications are still both supported, so I think that shouldn't be an issue either.
In the end, just make a backup of everything, then open in VS2008 and see what happens.

Resources