This project is read-only.

Allow us to tell patcher the path to where VS is installed


When determining the install path for VS 2012, it looks for an environment variable that only gets set if the Visual Studio "Common Tools" (C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools) get installed, which they always do in a normal install, unless you use the "/adminfile" VS install method and choose to not install C++.

In helpers.cs (patcher source code), it first gets the tools path:

installPath = Environment.ExpandEnvironmentVariables("%VS110COMNTOOLS%");

Then, it goes up 2 folder levels and assumes that's the real VS 2012 install folder:

installPath = new DirectoryInfo(installPath).Parent.Parent.FullName;

The problem is "VS110COMNTOOLS" environment variable won't always exist. Please, let us tell the patcher where the 2012 install path is (via config setting or command-line argument). Very simple and removes your stress of trying to guess where the path is, and allows people to use this when the patcher can't guess the path.


RealRaven2000 wrote Jul 1, 2013 at 11:04 AM

We also need this in extract mode, I encountered the same error there "Unable to find the install path for Visual Studio." The source installation has a Packages folder in
C:\Program Files\Microsoft Visual Studio 10.0>
but I am still searching for the IDE folder.

the best thing would be to add a commandline prompt e.g.
--installpath=<root folder for MS VS Studio 2010 or 2012>

make the path value as short as possible e.g.

C:\Program Files (x86)\Microsoft Visual Studio 11.0
C:\Program Files\Microsoft Visual Studio 10.0

to foolproof it you could also add an alternative option to enter a list of dll pathes:
--dllpath=<folder with dlls in it>[;<folder with dlls in it>]

as always, try to not be clever, and you have a robust solution.

RealRaven2000 wrote Jul 1, 2013 at 11:11 AM

Just looking on my VM installation I had installed VS2010 to a spliced path here:
S:\Microsoft Visual Studio 10.0\Common7\IDE
I still need the name of the environment variable so that I can carry out the extract. Apparently starting up in a Visual Studio Command Prompt (2010) is not sufficient.