Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Stealing liberally from here: <a href="http://allen-mack.blogspot.com/2008/03/replace-visual-studio-command-prompt.html" rel="noreferrer">http://allen-mack.blogspot.com/2008/03/replace-visual-studio-command-prompt.html</a>, I was able to get this to work. I added the following to my profile.ps1 and all is well with the world. </p> <pre><code>pushd 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC' cmd /c "vcvarsall.bat&amp;set" | foreach { if ($_ -match "=") { $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" } } popd write-host "`nVisual Studio 2010 Command Prompt variables set." -ForegroundColor Yellow </code></pre> <p>This has worked well for years - until Visual Studio 2015. vcvarsall.bat no longer exists. Instead, you can use the vsvars32.bat file, which is located in the Common7\Tools folder. </p> <pre><code>pushd 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools' cmd /c "vsvars32.bat&amp;set" | foreach { if ($_ -match "=") { $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" } } popd write-host "`nVisual Studio 2015 Command Prompt variables set." -ForegroundColor Yellow </code></pre> <p>Things have changed yet again for Visual Studio 2017. <code>vsvars32.bat</code> appears to have been dropped in favor of <code>VsDevCmd.bat</code>. The exact path may vary depending on which edition of Visual Studio 2017 you're using. </p> <pre><code>pushd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools" cmd /c "VsDevCmd.bat&amp;set" | foreach { if ($_ -match "=") { $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" } } popd Write-Host "`nVisual Studio 2017 Command Prompt variables set." -ForegroundColor Yellow </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload