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

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.

Related

Upgrade Errors While Opening Solution in a newer version of Visual Studio - Step By Step Fix

When an older solution file is opened from a Visual Studio version higher than the one it was written on there are almost always errors. The logical approach might be to start with the updates to extensions but that also causes issues along the way.
Is there a specific set of instructions regarding the better method to use while upgrading an old project to a newer version of Visual Studio?
Example:
There are three updates pending:
1) Live Share
2) ML.NET Model Builder 2019
3) SQL Server Integration Services
There are 559 errors (first four as examples):
Optimization does not exist
BundleCollection could not be found
Mvc does not exist in the namespace
GlobalFilterCollection could not be found
Should the Updates be the first place to start?
Is there a better methodology for this upgrade process?
Changes to the project model from one version of Visual Studio to the next may require that projects and solutions be upgraded so that they can run on the newer version. The Visual Studio SDK provides interfaces that can be used to implement upgrade support in your own projects.
To support an upgrade, your project system implementation must define and implement an upgrade strategy. In determining your strategy, you can choose to support side-by-side (SxS) backup, copy backup, or both.
You can review this document for workarounds for solutions created in earlier versions of Visual Studio to open in newer versions.
https://learn.microsoft.com/en-us/visualstudio/extensibility/internals/upgrading-projects?view=vs-2022#upgrading-custom-projects

.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.

Visual Studio 2017 project reference support between .net standard and .net core

I have a .Net standard 2.0 project in a Visual Studio solution that contains some Azure functions. In the same solution, I've created a .Net Core 2.0 Unit Test project. I've added a project reference from the .Net Core Unit Test project to the .Net standard 2.0 library.
Despite the project reference, Visual Studio is behaving like I'm referencing a dll instead of the project. For example, if I try to use F12/Go to reference, it brings me to a 'From metadata' file instead of the actual code file in the other project. Additionally, codelens features like 'Tested by' (and even just 'referenced by') and the Live Unit testing icons in the .Net Standard project aren't working, since they don't seem to be aware of the Unit Test project at all.
Is there some way to get this integration working between the two projects? My Visual Studio is up to date (15.5.3 enterprise), and I'm not using any tools like Resharper or anything like that.
I'm also facing the same issue but so far the project reference vs dll reference is not the case. I believe this is an existing issue with Azure function projects. There is a thread in Microsoft community regarding this issue. The last comment from Visual Studio is as follows:
I'm closing this report, because in the last 90 days there was no internal developer activity and very small number of new votes or comments. Sorry, we would like to look at this further, but we just don’t have the time right now. Our goal in closing older issues such as this one is to keep customers informed on which issues are currently being pursued by Visual Studio teams. If you still have trouble with our latest version, please report it as a new problem.

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.

Planning to upgrade VS 2005 to VS 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.

Resources