How to detect visual studio version from within an visual studio extension - visual-studio

I'm writing a Visual Studio extension supporting Visual Studio 2017 and 2019. Since In some circumstance I need to know, which version the extension is currently installed in, to adjust the extensions behavior accordingly. I searched the visual Studio API, but up to now I was not able to find out the current version. Its now imported what kind of version I get e.g VS 2017 or 15.9.17 or this internal build version. Anything would be fine. has anybody a hint?

Related

Incompatible project type .deployproj (Visual Studio 2019)

I have a solution that contains a .deployproj type of project. It seems that Visual Studio 2019 is not able to load that project. The detailed error message is the following:
Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
- Provisioning.Arm, "C:...\Provisioning.Arm\Provisioning.Arm.deployproj"
Non-functional changes required
Visual Studio will automatically make non-functional changes to the following projects in order to enable them to open in Visual Studio 2015, Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1. Project behavior will not be impacted.
What can I do in order to load the project within Visual Studio 2019?
It seems that you need to install the Azure Development workload in order for Visual Studio to be able to load .deployproj projects.
So just modify the current installation to also contain this workload. (I don't know exactly what individual component needs to be installed for this to work, I just installed the entire Azure Development workload).

Should I install Visual Studio 2017 beside Visual Studio 2015 or should I first uninstall Visual Studio 2015 and then install Visual Studio 2017?

I am currently using Visual Studio 2015 for programming ASP.NET Core applications. I have the following questions regarding installing Visual Studio 2017:
What is considered to be best practice and/or cleanest method?
Should I install Visual Studio 2017 beside Visual Studio 2015?
Should I first uninstall Visual Studio 2015 and all .NET Core dependencies and then install Visual Studio 2017?
Are there any tools that would ensure a clean uninstall of Visual Studio 2015?
From page Visual Studio 2017 Platform Targeting and Compatibility
Compatibility with Previous Releases Installation
You can install and use Visual Studio 2017 alongside previous versions of Visual Studio, including Visual Studio 2015, Visual Studio 2013, and Visua Studio 2012.
So yes. you can install them without any problem.
VS 2013, VS 2015, and VS 2017 all work well side-by-side. VS 2012 can be a little dodgy on Windows 10, but should also work side-by-side. In theory VS 2010 should also work side-by-side with those, but I've run into quirks in the past with them interfering with one-another.
Projects should round-trip between 2015 and 2017 generally, although there are some one-way upgrade scenarios.
Note that if you really just need the older compiler toolset for some reason, you can also install VS 2017 and select the optional component Microsoft.VisualStudio.Component.VC.140 which installs the older v140 compiler which you can still use with the VS 2017 IDE. That said, there's not a lot of reason to do this since the VS 2015 & VS 2017 C++ standard libraries are binary compatible so you can mix them in a project.
See this blog post for information on VS 2017.
It sounds like you have done some projects in 2015 already, so you will probably want to keep it.
Once you open a project in a new version, it will try to upgrade the project and then you can't go back.
However, if you have multiple versions installed at the same time, when you try to open a project, say, from Windows Explorer, it will open it with the "Visual Studio Version Checker" and will look at the project file and determine which version to open it in.
Bottom line, if you have the hard drive space, there is no reason to not install them alongside each other.
In the past, it was recommended to install them in sequential order if you are installing multiple versions, but it doesn't sound like this is an issue for you and I don't know if that is even a problem anymore as it has been several versions since I have had to deal with that.
Good luck!
Personally, I would keep both - there have been multiple times through the years where you have compatibility issues and NEED to have the prior version(s). I've also had old project that will not upgrade and I've gone back and reinstalled old VS versions.
If you have no reason to keep VS2015 in your computer I would suggest uninstalling it.
I uninstalled VS2015 after installing VS2017 and later noticing that I was still using an old taskbar shortcut to VS2015.
So I was inadvertently still using VS2015.
Maybe some special cases require keeping older versions of VS along side the new version, but for the rest of us, I say, uninstall!
VS 2015 is the last version that is supported by Installshield LE.
If you have a need for building installers in the future, it will be useful to have VS 2015
1,2,3. Visual Studio 2017 has more features over 2015 and it contains 2015's current features so you don't need 2015 alongside 2017. Just stick with 2017. And I don't think you will have any problems while opening 2013 and 2015 projects with Visual Studio 2017.
Uninstall Tool is a good tool to use. It cleanses all the leftover files and registry entries after running the original uninstallation wizard and even tells you how many files will be cleaned after the required reboot.
For people continuing to read this, I have Visual Studio Professional 2008 (For Windows Embedded 6.5), 2010, 2015, 2017 and they all work even if open at the same time.
Edit: As stated in other answers, they need to be installed from oldest version to newest.

Create plugin in Visual Studio 2015 compatible with previous versions

Is that possible to create plugin into Visual Studio 2015 which will be compatible and could be installed into different versions of Visual Studio 2013/2012/2010 ? How to do it if so ?
Update:
I know that I can create different versions of plugin/solutions for/in different visual studios, but I was wondering if there is possibility to create one solution in Visual Studio 2015.
A Visual Studio extension can support multiple versions of Visual Studio specifying them in the VSIX Manifest. Plus your extension should reference dlls present in all versions of Visual Studio, typically referencing the version of lowermost targeted VS version.

Visual Studio 2012 Website Does Work Properly in Visual Studio 2012

I originally created an ASP.NET site in Visual Studio 2010 a few years ago and it went through the VS 2010 SP1 update as well. This meant that Visual Studio 2012 opened the solution without performing a one time upgrade.
The issue I am having is that the built-in browser selector in Visual Studio 2012 is not available for this project and the settings only let you use the default browser.
When I looked in the .SLN file, the version line indicates Visual Studio 2012 (i.e. # Visual Studio 2012) and no other setting in there appears to have anything to do with this limitation.
Has anybody had this issue and, if so, can you please let me know how your overcame it?
Thanks!
You're going to have to upgrade your project to allow it to make use of Visual Studio 2012 only features. Note, if you do this you will no longer be able to open your project in earlier versions of VS.
http://msdn.microsoft.com/en-us/library/hh266747%28VS.110%29.aspx
For VS 2010 , you can install WoVS Default Browser Switcher extension
Also a related question Change default browser in Visual Studio 2010 RC

I can't get TestDriven.NET to show up in my installation of Visual Studio 2010

I've used TestDriven.NET in the past (with Visual Studio 2005), but now that I've got a new installation of Visual Studio 2010 on a different computer, I can't see either the Add-In Manager, or the TestDriven.NET stuff, even though I have them installed.
Help, please! It's making me bonkers.
Note: trying with current version (3.0)
This problem was due to the fact that I was using one of the free versions of Visual Studio, which did not allow for Add-ins.

Resources