How to choose which version of Visual Studio gets pulled up by default? - visual-studio-2012

I have VS 2012 and 2013 installed on my system.
I have a 2012 project that I want to get pulled up in VS 2013 when I double-click it from the Windows Explorer.
Is this possible?

If you only want specific slns to open in 2013, you can open the sln file in a text editor, and change the line
# Visual Studio 2012
to
# Visual Studio 2013
Note that it will ask you to upgrade the projects to 2013 when you open it for the first time. If you want all of 2013's compiler features you will have to upgrade, but if you chose not to it will still load in the 2013 IDE and you get some of the IDE related features.

Right click any solution file and select Open with... option. Use Visual Studio Version Selector as the default program to use for Visual Studio solution files.

Related

SharePoint 2010 project incompatible in Visual Studio 2015

I have installed Visual Studio 2015 (Professional). But when I open SharePoint 2010 project on VS 2015, it's showing project is incompatible.
Could you please tell any solution or idea to load the project in VS 2015?
Your project is not loading because Microsoft Office Developer Tools is not installed on your machine. You can easily modify your visual studio 2015 by following steps:
Run Visual Studio 2015 Setup File
Click on modify
Find the “Microsoft Office Developer Tools” and select it.
Finally click on Update.
After completing the setup open your project.
When you install VS2015, you do not install the mandatory Office Development Tools for Visual Studio 2015.
Once, you have downloaded and installed those. (Around 78MB) your SharePoint projects should, once again, load up without any errors.
Direct Link to the latest version:
http://aka.ms/getlatestofficedevtools

Why am I not able to open a VS project

I have a Visual Studio project that I created in my previous PC (32-bit if that makes any difference). I recently got a new PC (64-bit) and I am trying to open the project and I am seeing the following error:
Unsupported
This version of Visual Studio does not have the following project types installed or does not support them. You can still open these projects in the version of Visual Studio in which they were originally created.
- ONew, "C:\temp\onb\ONewSln\ONew\ONew.csproj"
No changes required
These projects can be opened in this version of Visual Studio without changing them. They will continue to open in Visual Studio 2010 SP1 and in this version of Visual Studio.
- ONewWeb, "C:\temp\onb\ONewSln\ONewWeb\ONewWeb.csproj"
- ONewSln, "C:\temp\onb\ONewSln\ONewSln.sln"
Screenshot:
Is there a add-on or visual studio component that I have to download to make it work?
Please help me resolve the issue.
After doing some research and spending hours banging my head against the wall, I figured out how to resolve the issue.
You have to install Microsoft Office Developer Tools for Visual Studio 2012.
Open up the Web Platform Installer and if you don’t have it installed, download and install it. Search for Office Developer Tools and install it.
This will enable you to open the project without any issue.
Usually you can open VS2010 SP1 files in VS2012. But after opening and on compiling you may get some errors of missing packages. Then you have to install the missing packages. Check this out: Visual Studio 2012 compatibilty.
Some solutions, projects, files, and other assets that you created in Visual Studio 2010 Service Pack 1 (SP1) will run without modification in Visual Studio 2012, but others have to be upgraded. The above document describes how various kinds of assets behave in these two versions of Visual Studio.
If you use both Visual Studio 2012 and Visual Studio 2010 SP1, you can create and modify projects and files in either version as long as you don't add features that require Visual Studio 2012.
VS2012 may convert projects when you first open them, but the changes are (except noted in the document linked) backward compatible with VS2010.

Create a setup file in Visual Studio 2012

I have a windows form project and I want to create an installation package for this project. How can I create a setup file in Visual Studio 2012 ? My project is without data base.
How to create a Setup package using Visual Studio 2012.NET?
Microsoft released the Visual Studio Installer Project extension in April of this year, the catch is it's for VS2013, not VS2012.
http://blogs.msdn.com/b/visualstudio/archive/2014/04/17/visual-studio-installer-projects-extension.aspx
The 'lite' InstallShield option remains in VS if you need something with more flexibility.
Advanced Installer also has a free version that includes an extension for VS. This is a commercial tool but the extension is included in the free edition as I said, for more advanced features you need to purchase a Professional or higher licenses and edit the project direct from Advanced Installer GUI, not from VS. (but you can still use the project in the VS solution, so you get the MSI built at the end of your build process)
Visual Studio setup projects (vdproj) are not supplied with VS 2012
There are several solutions for you:
You could use InstallShield instead.
If you don't want or
can't use InstallShield for any reason, you could try WiX. This
toolset builds Windows installation packages from XML source code.
If you only use Windows Presentation Foundation (.xbap), Windows Forms (.exe), console application (.exe), or Office solution (.dll) you could look at ClickOnce. To use this you should right click on the project file in the solution explorer and select "Publish" from the pop-up menu.
Alternatively you can use previous version of Visual Studio (2010).

Crystal report .rpt file in visual studio 2012 shows binary format instead of design

We developed an application in visual studio 2010 and reports are working fine, when we choose to open the same application through visual studio 2012 Ultimate, reports are not working and when i open .rpt file showing binary format ad also I could not find Crystalreport.rpt in Reporting template in visual studio 2012. After googling it, I have installed
CRforVS_redist_install_32bit_13_0_5 , but doesn't work.
How can i change or edit .rpt file design using visual studio 2012 and want to change the .rpt database name too. Any suggestion or idea to achieve this?
I had the same problem after installing visual studio 2012 and found no answer on the forums. I uninstalled CR yesterday and downloaded again the CRForVS 13.0.5 from here just in case there was a bug in the previous version I downloaded in may and installed it. Then I installed update 3 for Visual studio and everything works fine now.
Cheers
Michael
I figure this one out for me.
From SAP Crystal Reports's download site:
Please note: To integrate "SAP Crystal Reports, developer version for Microsoft > Visual Studio" you must run the Install Executable. Running the MSI will not ? >fully integrate Crystal Reports into VS. MSI files by definition are for runtime >distribution only.
By default Windows 10 does not install the 3.5 framework, CR for VS still needs >it. Select it by "Turn Windows feature on or off" and choose both options.
I downloaded the exe, instead of the MSI packages, and it worked for me finally. Helps to read I guess.

How to use MSBuild to target v110 platform toolset?

I am developing a command line application that creates a full Visual Studio 11 solution made of a single VC++ project and that tries to compile it in the end using MSBuild.
The problem I am facing is strange.
If I execute my command line program inside Visual Studio 11 it works; if I instead launch it outside the development environment it throws me the error:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(511,5): error MSB8008: Specified platform toolset (v110) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected. [f:\ABC.vcxproj]
The command I am using is the following:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe f:\snake\W9A30040.vcxproj /property:PlatformToolset=v110;Configuration=Debug /v:quiet
But I have the feeling that PlatformToolset=v110 is ignored and MSBuild use v100 (Visual Studio 2010).
Do you have any suggestions how to tell MSBuild to compile for v110 Platform Toolset?
I ran into the same problem as well with the full release of VS 2012. You can also set the VisualStudioVersion as a property with MSBuild as opposed to dealing with environment variables as mentioned in the accepted answer. For instance:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe .\myproject.vcxproj /p:VisualStudioVersion=11.0
The environment variables approach I'm sure work just as well, I honestly didn't try that as I was trying to stay away from having to modify the environment variables.
Make sure that the top of your .SLN file looks like this:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
When you double-click on the solution file, it's the # Visual Studio 2012 that controls which version of Visual Studio is loaded (and controls the icon displayed in Windows Explorer).
However, when you run MSBuild, it looks at the Format Version 12.00 part.
Confused?
This is confusing, since Visual Studio 2010 is version 10.0 and Visual Studio 2012 is version 11.0 (not 12.0), and using the version 12.0 solution file format causes MSBuild to (implicitly) set VisualStudioVersion to 11.0.
I found a workaround for this issue; could be a problem of Visual Studio 11 Beta that will be resolved before official release.
Anyway, if you are interestedm just set the environment variable "VisualStudioVersion" equal to "11.0" before calling MSBuild.exe.
In batch files
set VisualStudioVersion=11.0
or in VB.NET
Environment.SetEnvironmentVariable("VisualStudioVersion", "11.0")
Starting with Visual Studio 2013, MSBuild is now part of Visual Studio, and the correct path should be $(MSBuildToolsPath) (“C:\Program Files (x86)\MSBuild\12.0\Bin”). If you use msbuild.exe from the .Net framework folder (“C:\Windows\Microsoft.NET\Framework64\v4.0.30319”) it will not able to distinguish the vs2012 and vs2013 versions.
Use the menu based options to do this. From VC++2010 Express:
- Right click on the main file of the project (not the solution itself at the very top of the tree).
- Click General.
- Find Platform Toolset on the right side of the dialog, top half.
- Change from v110 to v100.
- Click OK.
----- Done ------
Microsoft provides a batch file to set all the EnvVars
You find it in the Start Menu under "Microsoft Visual Studio 2012/Visual Studio Tools" or in the Visual Studio folder ("C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat")

Resources