How can I change Visual Studio 2012 Express item templates? - visual-studio-2012

For example I wan't my classes and interfaces to be StyleCop compliant. In non-express editions we can find and change the class template at:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class
But it doesn't work for express edition.

Templates are in this folder for 2012 web express edition
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\VWDExpress\ItemTemplates
And this for 2012 windows express edition
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\WDExpress\ItemTemplates

Caveat when updating templates that require you to edit the .vstemplate file (such as multi-file templates) in 2012 Express editions:
In Visual Studio Express for Desktop 2012 (WDExpress.exe), I have had no luck updating Item Templates using the method in How to: Update Existing Templates (under "Manually Updating an Existing Template"), which entails copying the updated .zip file to
C:\Users\<username>\Documents\Visual Studio 2012\My Exported Templates
What turned out to work instead, was to copy the .zip file to
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\WDExpress\ItemTemplates\VisualC\1033
(as described by A. Karimi), and then running
wdexpress /installvstemplates
on the "Developer Command-Line" as Administrator. (If you do not do this as Administrator, the process will fail, and a dialog is shown with the unhelpful error message "The operation could not be completed".)
Guess: It seems that successful installation can verified by checking if the template .zip file has been copied to
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\WDExpress\ItemTemplatesCache\VisualC\1033

Related

vcvarsall.bat missing after installing Visual Studio 2019

Previously on my Visual Studio 2017, I had the file vcvarsall.bat located at this location - "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
But later my office installed Visual Studio 2019 and I dont see vcvarsall.bat file anywhere.
Can anyone advise how to get the file, I did read some forums but could not find any solution.
Please advise.
Thanks.
You can find the vcvarsall.bat file for VS2019 at:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Your VS Edition\VC\Auxiliary\Build\vcvarsall.bat
And one point we should know, this file is under VC folder. So it's part of C++ workload. If you can't find the file in the location above, please make sure you've installed the C++ related workload. (In VS, go Tools menu=>Get Tools and Features=>Install the Desktop Development With C++ workload)
In addition: The path you mentioned above refers to the vcvarsall.bat for VS2015. The vcvarsall.bat for VS2017 should be under C:\Program Files (x86)\Microsoft Visual Studio\2017\... directory. VS2015=>vs version 14.0 while VS2017=>15.0.

Cannot locate VS 2015 Enterprise executable

Installed VS 2015 Enterprise in location
C:\Program Files(x86)\Microsoft Visual Studio 14.0
From previous posts with other versions it is supposed to be in the Common\IDE folder somewhere. In Control Panel it already shows as installed. Can't locate it.
As said in comments, the path is:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe

VS2012 changes assembly location after adding the reference

I have a TFS Policy for VS2010, I want to use it in VS2012 also so I created a new project (a library targeting Framework 4.5) and started the migration, the problem is that VS2012 insist on changing the paths of my references, for example:
C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\envdte.dll
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VSSDK\VisualStudioIntegration\Common\Assemblies\v2.0\Microsoft.VisualStudio.Shell.Interop.dll
VS2012 changes it to:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\envdte.dll
C:\Program Files (x86)\Microsoft Visual Studio 2010 SDK SP1\VisualStudioIntegration\Common\Assemblies\v2.0\Microsoft.VisualStudio.Shell.Interop.dll
Is there a way to avoid this?, I added a HintPath to the .proj file with the full path but Im afraid it will not compile on the server if cant find the exact same path.

What 's wrong with VS2012 and Performance Analyzer?

I am trying to do some perf. analysis on a piece of code that is dog slow... I start VS2012 Premium as Admin, load my solution and the go to 'Analyze - Launch Performance Wizard' Immediately I am shown a dialog that says:
Could not load file or assembly 'VSPerfReader.DLL' or one of its dependencies.
Awesome! The file is located here:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools
I can start Windows Performance Analyzer (standalone) from 'start' just fine btw.
Had the same issue, adding the following line to my system path variable and restarting visual studio did the trick.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools
Credit to Ade Miller in the comment for the solution.
Same instructions as Ryan Taylor above but with a visual. My issue was with Visual Studio 2013 (after installing VS2015 SP1). The value I entered the new path variable is below.
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools

Visual C++ includes directories

I want to read some library files and I went to Tools>Options>Projects and Solutions>VC++ directories and I found the following :
$VSInstalldir/...
$VSInstalldir/...
$FrameworkSDKdir/
$WindowsSDKdir/...
$PATH
$SystemRoot/Syswow64/....
And I could locate only files inside $VSInstalldir .
Where are $FrameworkSDKdir, $WindowsSDKdir, $PATH, $SystemRoot/Syswow64 supposed to be in Windows???
Most of those variables are set using batch files. You can find each one by going to your Visual Studio installation folder, then the VC subfolder and tracing through vcvarsall.bat.
For instance, on my VS2008 installation on WinXP:
Open C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat
Go to the x86 label, that points to C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat
That file points to C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat
This file (finally) contains all the variable definitions.
Another, easier, way is to open the Visual Studio Command Prompt under Microsoft Visual Studio 2008 -> Visual Studio Tools and then use the echo command to print all those variables.
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
C:\Program Files\Microsoft Visual Studio 9.0\VC>echo %FrameworkDir%
C:\WINDOWS\Microsoft.NET\Framework
C:\Program Files\Microsoft Visual Studio 9.0\VC>echo %VSInstalldir%
C:\Program Files\Microsoft Visual Studio 9.0

Resources