TFS and VS 2010 - visual-studio

I attempted to open a solution today at my new job and it said I need to convert it because it was made in an earlier version of Visual Studio. It also said that the solution would automatically be checked out in source control.
Obviously I do not want to do anything that messes anything up. Is it possible to just change my target framework in Visual Studio and not have to deal with any conversion stuff, or should I just install Visual Studio 2008?

If ANY developers are still using VS 2008, do not upgrade the solution. You can create a new solution and have it sit "side by side" or you can branch the code. But if you overwrite the solution with a VS 2010 solution, they will not be able to work on it again.

It will break compatibility with Visual Studio 2008. Keep your company's solutions the same format as you get them unless directed to change them.

You can change your target framework, but that will not stop the conversion. The issue is with the project and solution files. The are XML based MSBUILD. What is happening is an upgrade of MSBUILD, not the .NET framework.
You should install VS2008 and use it until all possible team members are upgraded to VS2010. Once you upgrade, members using VS2008 will not be able to open the solution. There are some was to hack around MSBUILD upgrades, but I don't recommend them.

Related

Opening Different Visual Studio projects

OK, can't find a solution to this.
A client sent me his Microsoft Visual Studio Express 2012 for Web project. I have Microsoft Visual Studio Ultimate 2010 installed.
I get an error when I try to open his project saying "this project is not compatible with the current version of visual studio".
We'll be passing the project back & forth quite a bit, so I need a solution that meets that need please.
So, I figure I may be able to modify the project with a text editor to let me open it. If so, do I have to re-edit it back when I send it back to him?
Can I install VS Express 2012 for Web on a machine that already has VS Ultimate 2010 on it without any conflicts? Can I open it if I install VS 2012 Ultimate (keeping 2010 as well)?
I have another client that uses 2010, so whatever I do, I need to be able to still support him.
If I can't have 2 versions installed at the same time, and can't easily edit a file to make it compatible, then I guess my last option is a virtual machine.
Thanks in advance for any advice.
Microsoft Visual Studio has backwards compatibility since the version 2010 SP1.
So in this case you just need update your Visual Studio 2010 to SP1 and it will understand the new way files are versioned.
Based on my experience:
You do can edit it with a text file and send it back, but it's not compiled yet so it's your partners job.
Maybe, just maybe, you can edit the .sln and .(whatever the project file extension is) file to meet your VS10 env (I think it's going to be a bumpy road though)
Yes, I'm pretty sure you can have VS 10 and VS 12 installed on same machine, note that you have to have .Net 4.0 and .Net 4.5

Convert solution to the latest version

I am practicing Microsoft net framework training kit. The problem is that the solution/projects were made by Visual Studio 2008. I use Visual Studio 2012.
The projects are unavailable.
I want to modify the solution file and project files. Just worry about messing up them.
Another snapshot:
How to modify them by editor then I can load them with visual studio 2012?
Visual Studio should do update the projects and solutions for you. In my experience, it only shows unavailable when the project is located in a different location than where the solution file is looking for it. Perhaps you recently changed the name or copied only some of the files?
At the very least you should be able to remove the unavailable projects and re-add the original projects. They'll be converted as they're added.
Convert it to 2010 first, then convert it to 2012. It is the particular case. It could be the project was written in 2008 but faied in 2012.

Why do Visual Studio solutions need to be upgraded with every release of Visual Studio?

This is easily one of the most annoying "features" of Visual Studio in its history and I don't understand why it exists -- ever.
Why would a CodePlex project need to care what version of Visual Studio I am using?
Off the top of my head, the only thing I can think of is that some versions of Visual Studio might introspect assemblies searching for attributes to determine what to display in "Visual Designers" and "Property Editors". But why would that cause Visual Studio to not be able to open the project and allow me to browse its contents and compile?
It seems to me like Open Source in .NET is somewhat limited by the stupid dependency management exhibited by Visual Studio. In other words, if I am using Visual Studio 2008 and you are using Visual Studio 2010, then we have different solution files.
http://blogs.msdn.com/b/visualstudio/archive/2010/03/15/why-does-visual-studio-2010-convert-my-projects.aspx
Here's an example from the site as to why Visual Studio converts your projects to 2010 format.
For instance, Visual Studio runs
custom tools such as single file
generators for designers in order to
output code representing the changes
made to the designer. Many of these
custom tools are upgraded or
completely replaced in the newer IDE.
During conversion, the IDE knows which
custom tools to replace or upgrade. In
order to make round-tripping work, VS
would need old and new custom tools to
understand each other so as to ensure
that old and new designers can work
side by side. Other than designers,
the following files would also be
affected: resource editors, wizards,
code snippets, item and project
templates, diagramming and modeling
tools, and many more.tools, and many more.
Since 2010 knows about what tools 2008 has, it can convert forward to be compatible with the custom tools 2010 uses. 2008 has no idea about what 2010 is using, how could it? Therefore, it is impossible to convert backwards since it doesn't know what it needs to convert, nor how to.
I believe the purpose of this touches on what you stated in your comments. If you are using 2008 and I 2010 and I compile it, how could you possibly run it again? 2010 is backwards compatible but 2008 has no way to make itself forward compatible.
Thus, by recompiling the project in 2010 I ensure that no 2008 user may mistakenly think they can compile it.

Running Visual Studio 2005, 2008, and 2010 on same system

I have around 50 projects in Visual Studio 2005 that I am building a new development machine for and I'd like to slowly move those projects to VS 2008 but also have 2010 available for select new projects.
Can this work? Are there any gotchas for this sort of setup? Any general advice for running multiple versions of Visual Studio on the same system would be greatly appreciated. Specifically related to managing a controlled migration of projects to new versions but being able to selectively keep some on old versions.
I've got 7.1, 8, and 9 installed at the same time (well, and VB part of 6 as well) and I've not really had a problem opening projects file in the wrong version. The Visual Studio Solution files is "associated" with a particular version even if they all have the same extension of .sln, as you can see from its little icon. Microsoft Visual Studio Version Selector seems to handle individual project files (.vcproj) fine as well.
The only thing I've had is the individual source code files not opening up in the latest version like I want, but that's easily fixed with the click of a little button in VS Opions.
Microsoft have this to say:
Visual Studio supports the installation of Visual Studio .NET 2002, 2003, ... on the same computer.
In general, you should install the earliest release of Visual Studio first, and then install subsequent versions of Visual Studio in the order in which they were released.
Make sure when you open up the 2005 files you're doing it in 2005. To open them in another would require a conversion which would render them incompatible with the older compiler set-up. To aid this, structure whatever workspace you're using into 2005, 2008, and 2010 so as to minimize accidental chance of this.
Second, when you double click to open the projects, it will invariably attempt to open them with 2010. You'll have to start with VS#### instead of the solution/project unless you're in the 2010 workspace.
I have VC6, VB6, VS 2008, and VS2010 RC installed on Windows Vista. I cannot double click on the VC6 dsp files without VS2010 opening and asking to perform the conversion. The 2008 C# projects open in 2008 as long as I use the solution file. The 2008 project file opens in 2010 instead of 2008 even though the version selector is the default program. Most of the time I try to remember to open the desired version of Visual Studio and then open the project.
You can mitigate some of these issues by changing the default program associations in the control panel or the registry.
Update: This setup works on Windows 7 x64, with the addition of VS2013.
Yes it can work. I'm not sure if you have to install them in a particular order... but install them in order of the versions... 2005, 2008, 2010. Should be good to go.
I can't speak for 2010, but I have run 2005 and 2008 at the same time on my system without any fuss.
And I made the double-click mistake that wheaties warns about more than once :(
I have VS2005 & VS2008 running without any issues. I have had problems when working with betas, express editions & am assuming you don't have them.
I would say refrain from making too many changes to the setup of these editions, it should be fine.
I also had the same doubt. I work at my company which is still on VS 2008 and I want to personally use the VS 2010 and not risk the 2008. I installed the 2010 and it worked fine with the 2008. Just make sure you note the projects that are in 2005 and open them with the same accordingly.
The reason why it works is simple: if you open your solution file in Notepad, you'll see which version of VS is related to your project.

Will Visual Studio 2010 still be able to use all the plugins for Visual Studio 2008?

I use Visual Studio 2k8 Pro Edition at home and I have loaded it with a lot of important addins customised for my development.
If I get VS2010 Pro Edition, would all of these plugins fail to work? Is this a plugin-related matter or down to Visual Studio itself? E.g. Visual Studio 2010 may just be based on the 2008 version but with enhancements (is it?).
Thanks
You can always download the beta and try them out.
Impossible to say without seeing it in practice. Seriously. We don't know which plug-ins you're using so we've no idea how they're going to react to a new VS version...
But even you had told us, you'd save yourself a lot of time just installing VS 2010 in a VM and trying your plug-ins out.
Nope at least Resharper 4.5 is not working in VS2010
No. Unmanaged addins are COM objects that are tied to the version of the IDE environment. For the most part, the addins just need to be rebuilt with only minor changes though.
EDIT: Addins that go beyond using the standard addin interfaces though will probably require retooling for the VS2010 environment.
EDIT 2: Managed addins are typically deployed using .addin files which are sometimes located in "%APPDATA%\Microsoft\MSEnvShared\Addins". The .addin file is an xml file that can be edited by hand. You can try adding a new HostApplication element to the file for a particular managed addin - and specify version 10.0.
Here is the info on the resharper compatibility:
http://blogs.jetbrains.com/dotnet/2009/05/preview-of-resharper-for-visual-studio-2010-coming-soon/
(Basically they will have a preview release in June)

Resources