debugging visual studio extension, different version - c#

I am building an extension (Editor Classifier) using VS2012, and I can verify that it works with VS2013 by setting the install target to include the correct versions.
However as it is today, I need to install and verify features. This is ok for most cases, except when I would like to debug the extension.
Now, if I were debugging an extension on VS2012, using VS2012, then launching the Experimental Instance works well.
But if in a VS2012 project, if I set the startup program to be devenv.exe of VS2013, with rootSuffix /exp then although the VS2013 experimental instance is launched, it does not register the extension under development.
Any tips to configure Visual studio debugging across versions would be greatly appreciated!

It's not simple case of switching 3 letters when trying to make your VS2012 extension work with VS2013 :-).
You will need to do quite few things:
update referenced dlls
update the manifest
let the VS also do his magic when upgrading the project.
http://geekswithblogs.net/TarunArora/archive/2013/06/27/upgrading-vsix-extensions-from-vs2012-to-vs2013.aspx
You might also need to use ProvideAutoload on your package: Visual Studio Package Initialize method does not call when debugging

Related

Intellisense working for one project but not for another on same machine

I have a Unity project on my laptop where intellisense and autocompletion works just fine with visual studio code (mac os system).
Now, i created a brand new project (same Unity version as the old one) and for that project intellisense is not working :O Same machine, same editor, everything else is the same.
Any suggestions on what could fix that since the required dependencies are already installed (the visual studio code output is not giving me any logs or other messages by the way) ?
From omnisharp's announcements
If you still need Unity or .NET Framework support, you can set omnisharp.useModernNet to false in your VS Code settings and restart OmniSharp. Please see the Requirements section above to ensure necessary tooling is installed.
So we just need to uncheck Omnisharp: Use Modern Net in vscode settings, and beware of the settings precedence.

Microsoft.VisualStudio.TestTools.LoadTesting cannot be found after upgrading to Visual Studio 2017

Having recently updated from Visual Studio 2015 to 2017, I ran into a referencing issue where performance testing namespaces and dll references seem to have disappeared.
I finally figured out what had caused it, but figured a few people may run into this, so I will also be including the solution.
To solve this you have to first load up visual studio installer (It's installed alongside Visual Studio 2017) and click on modify.
Then click on Individual components and select the items shown in this image:
Microsoft test manager
testing tools core features
Web performance and load testing tools
Make sure you restart VS 2017 after installing these, I had to do a clean and rebuild as well.

This project(Visual Studio 2012 express) is incompatible with the current version of Visual Studio 2013 express

Am doing a back end project in C# in Visual Studio. My team mate had done it using Visual Studio 2012 express and everything seems to work there. But when i used git to clone it to my system where am using Visual Studio 2013 express, one part of the project says its incompatible with the current version of VS. I could clean and build the project, but was unable to run the project. I searched and found that one solution is to go to Programs and features, select VS, right click,select repair. But even after doing this, the problem persists. Is there any work around?
When I was learning ASP.NET MVC by Informit tutorials I was in the very similar situation. I downloaded the sample sources that was created in VS2013 but had VS2015 installed. It was some kind of bug \ magic, but VS didn't recognized some libraries in VS2015 even they were installed. What is more strange is the fact that when I decided to totally rewrite the project line by line it worked!
Of course, I tried to clean, rebuild, reinstall NuGet packages.
So, if you have an access to sources *.cs, then just try to create new project and copy-paste code.

Debugging Roslyn Analyzer

I am working on writing a DiagnosticAnalyzer. I was able to unit test it just fine. I wanted to try it out in Visual Studio. The VSIX project that got created seems to be working. When I set that to the default project and Run the solution another instance of VS launches and I can see that my VSIX got installed. However when I set breakpoints it shows that the symbols aren't loaded and the breakpoint won't be hit. Anyone have any ideas why this would happen?
Have you made sure, that you have installed the correct version of the ".NET Compiler Platform SDK Templates" extension? I had the same problem and noticed that I had installed the wrong version. I'm using CTP 6 of VS2015 so I had to install ".NET Compiler Platform SDK Templates for CTP6" (Visual Studio Gallery). After that I've been able to debug the analyzer extension just like any other program.

Visual Studio version-agnostic projects/solutions: is it possible?

I remember seeing an open source project within the last year that I was able to open in both VS 2008 and VS 2010 without an upgrade wizard popping up. I think...
Is it possible to create a project/solution that will open up in any version of Visual Studio without prompting me to run the upgrade wizard? If so, how do I do this?
Information for both C++ and C# projects would be most helpful.
You can, use CMake and generate VSx solution.
I think the project that you have seen had 2 visual studio solutions for different visual studio versions.
Update:
Also, you can use http://sourceforge.net/projects/vspc/
or see http://www.emmet-gray.com/Articles/ProjectConverter.htm
The solution format hasn't changed significantly over the visual studio versions except the version number.
If the code itself is generic enough (not using linq, etc) then you can edit the first line of the solution file to "downgrade" the version.
VS2005 uses:
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
You can give the Prebuild project a try to generate needed solution files on the fly.
Prebuild is a cross-platform XML-driven pre-build tool which allows
developers to easily generate project files for major IDE's and .NET
development tools including: Visual Studio .NET 2002, 2003, 2005, 2008, 2010
SharpDevelop, MonoDevelop, NAnt and Autotools.
May be it is not what you ask about, but you can convert you project into nmake target
The only way to do this is to create separate solutions (for 2010 and 2008), and include existing projects to different solutions. Create new projects in VS2008, and then add them to VS2010 solution.
You may need something like round-tripping
Round-tripping is the ability to use a current or previous version of Visual Studio to target a platform that is supported by both versions of VS. For example, with round-tripping, you can open projects from a previous version of VS in a newer IDE without the need for conversion, thus allowing you to work side-by-side on old and upgraded projects.
Read more

Categories