Why do Visual Studio solutions need to be upgraded with every release of Visual Studio? - 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.

Related

How To Convert Visual Studio 2010 project to Visual Studio 2015

I have a project from VS Studio 2010 that I want to work with in VS 2015. When I start this Project with VS 2015 I receive an error saying something like "compatibility-Error (Version)".
How can I successfully convert a Visual Studio 2010 project to use with Visual Studio 2015?
Without you going into any more detail about the actual error. (error numbers / screenshot) it will be very hard for any of us to give a real answer. Therefore I am going to suggest you take a look at Troubleshooting Unsuccessful Project Upgrades.
Something else to check out might be the Porting, Migrating, and Upgrading Visual Studio Projects guide
One of the key things mentioned in the 2nd link I provided is:
The following list describes support in Visual Studio 2015 and Visual Studio 2013 for projects that were created in Visual Studio 2012 or Visual Studio 2010 SP
Therefore I'd recommend upgrading the 2010 version to SP1 first. (if this is still installed that is)
One further thing to note is that if you keep the old version of Visual studio installed you can import a project which is made with an older version and skip the update. Visual studio 2015 will then use parts of the older version itself to open the project.
For details you can read How to: Upgrade Visual C++ Projects to Visual Studio 2015 page and the equally useful Installing Visual Studio Versions Side-by-Side page.
It appears that there are issues when moving from VS 2010.Net to VS 2015.Net and may require that you build the project from scratch and copy the code over. VS 2015 requires a Namespace. There are a number of designer issues on control that require the style page be used since various attributes have been removed. Something still, however, do work but you need to review the HTML, specifically things like Font and alignment. While it's a pain it isn't a big deal since it requires mostly cut and paste.
If you are having issues converting web projects the projects may have originally been created as a "web site" rather than a "web Project" . Try opening the application as a web site and see what happens. At least that may help get you to the point you can actually get to the code to convert it in VS 2015. Hope this helps.
Try to Right-click the solution, then select "Re-target solution".

What version of Visual Studio 2008... Does "Visual Studio Tools for Applications 2.0" INCLUDES vs2008?

I have Visual Studio 2010 Professional installed. But for a client I do need Visual Studio 2008 (to avoid some upgrades that are note compatible with vs2010)
It is my job's notebook, so everything must be original and legal. And both, the client and my boss want to avoid licences costs. ANYWAY... it seems that my notebook already has some version of vs2008, I need to know if it is too muche reduced or if it will work to develop.
I can open a vs2008 that seems pretty much the same, also the about screen. But at "Add or Remove Programs" I just only have "Visual Studio Tools for Applications 2.0"
Finnaly when I run the app, it works, but the code is not recognize, it is shown as it is notepad.
Here are some screenshots that may help... THANKS ALL!!
VSTA is sort of a replacement for VBA, i.e. you can use VS to write .NET code to extend and automate thrid-party applications that are designed to support it. It appears that that is the only VS 2008 component that you have installed so you cannot open VB or C# projects or any of that stuff. If you want a legal copy of VS 2008 that you don't have to pay for then you'll need to look at an Express edition, although that may lack some features that you need. 2008 Express editions are hard to come by now too, as they are not offered for download any more by Microsoft.
What are these non-upgradeable parts of your project?

Does InfoPath 2013 support Visual Studio 2013?

I am trying to develop custom code for an InfoPath 2013 form. I have Visual Studio 2013 Professional installed, but when trying to edit code I get the following message:
The following external components are required to edit your form code. Please install them and try again.
Microsoft Visual Studio 2012
Visual Studio C# Support
Microsoft Visual Studio Tools for Applications 2012
C# support is installed, along with Visual Studio Tools for Applications 2012.
Does InfoPath 2013 just not support VS2013?
Unfortunately No
MS has really been making some bad decisions lately
Firstly VS2013 was released so they forced people to upgrade if you want to develop for Windows 8.1
Secondly, MS have announced that they are dropping InfoPath and have yet to provide an alternate solution. Support is still available but InfoPath 2013's successor will be another solution.....i'm guessing Azure Forms or SharePoint forms, something like that
Very disappointing
As you have found, adding code to an InfoPath 2013 form requires Visual Studio 2012. I am not aware of a way to use it with any other version of Visual Studio.
Depending on what you plan to use the custom code for, you may be able to get by with the qRules library (full disclosure: I am one of the developers of this library). It contains many of the most common features for which people tend to use code within InfoPath, and you can use them simply by executing rules within your form, eliminating the need for any version of Visual Studio.
If there is a specific thing you are looking to do with code, I can tell you whether it's possible to do so with qRules, but you should open a separate question for that (and let me know here).

Developing Visual Studio addins for multiple versions of Visual Studio

I've been given the task of developing some extensions for Visual Studio for our internal use. These will have to support a couple of different versions of Visual Studio (VS2008, 2010 and 2012 - VS2005 would be a nice to have but not essential). I'd like to develop these in as consistent a way as possible, reusing as much of the code as possible, while fitting it into the existing project structure for these kinds of tools, which is a Visual Studio 2012 .sln.
What's the best / easiest way of developing this kind of extension? A VSPackage project? Can I make a 2008-compatible VSPackage which is developed in VS2012?
The features I will need for the extensions I'm writing at the moment are pretty basic - I need to create Tools menu commands, possibly a custom toolwindow. My requirements might change later on but I don't need editor adornments or anything like that at the moment.
I saw this question which might seem to be a duplicate, but the answer which was accepted doesn't answer the question, so...
It really depends on what is your extension going to do.
VS2008 does not support extensions (.vsix) and you will need to write VSPackage deployed as msi for it. You also won't have access to many new features introduced in VS2010 (easier editor integration and access to vs services via MEF), but basic stuff such as manipulating solution/project/files should be fine and work on all versions (e.g. using DTE should be ok).
As far as I remember for VS2008 you will also need to obtain a PLK, which is no longer required for 2010 and 2012.
I haven't tried developing 2008 package in VS2012, but you definitely can develop 2010 extension in 2012.
Also remember that VS2008 is .Net 3.5, so your code should use .net 3.5 and version of c# which it supports to be portable.

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.

Resources