Visual Studio Development Bookmark and Share   
 index > Visual Studio Setup and Installation > Workaround: Install WinSDK for SVR2008 after VS2008 breaks VS command line build environment (vcvars32.bat)
 

Workaround: Install WinSDK for SVR2008 after VS2008 breaks VS command line build environment (vcvars32.bat)

Issue: After installing the Windows SDK for Server 2008, you are no longer able to build at the VS2008 command line. You receive an error that csc, vbc, and/or msbuild commands are not recognized. You are able to build without problems in the VS IDE.

Cause: The VC++ compilers that install with the Windows SDK overwrite vcvars32.bat improperly.

Workaround: Repair the VS2008 command line build environment by editing c:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat manually.

Close all instances of Visual Studio:

1. Use Notepad to edit the file %\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat. Change the top few lines where the variables are set.

Change these lines:

@SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0
@SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0\VC
@
SET FrameworkDir=Framework32
@SET FrameworkVersion=v2.0.50727

@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR
@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR

to the following, in order to set the correct path to the frameworkdir:

@SET VSINSTALLDIR=c:\Program Files\Microsoft Visual Studio 9.0
@SET VCINSTALLDIR=c:\Program Files\Microsoft Visual Studio 9.0\VC
@
SET FrameworkDir=c:\Windows\Microsoft.NET\Framework
@SET FrameworkVersion=v2.0.50727
@
SET Framework35Version=v3.5

@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR
@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR

  1. Open the VS command line build environment and verify that you can build successfully.

Please email us directly if you need additional help.

Karin Meier

Windows SDK Program Manager

Karin Meier  Friday, April 18, 2008 9:53 PM
All these changes are already there , but still i am not able to generate a X.509 certificate.
gdeepakHotmail  Monday, December 08, 2008 12:00 PM
I experienced this problem and when I was gonna go and try to fix it there was no bin folder in the VC folder :/
Himal-  Saturday, August 22, 2009 8:54 PM

Another problem is this:

If you installed VS 2008 on a drive other than C:, then you will have something like this:

E:\Microsoft Visual Studio 9.0\{blah, blah, blah}

But, you WILL NOT have

E:\Microsoft Visual Studio 9.0\vc\vcpackages

That folder, which contains vcbuild.exe, will actually be here:

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages

I fixed it by just copying the whole “vc�folder over to E:

Ike Starnes  Monday, September 21, 2009 4:30 PM

You can use google to search for other answers

Custom Search

More Threads

• VS .NET 2003 Prereq problem
• Can't install Service Pack 1
• VS 2002 w/ .NET 2.0
• VS2005 SP1
• Visual Studio 2008 hangs and displays a Delay Notification icon
• Unable to Install VS Studio 2008 Professional on a Windows Server 2008
• Deploying aspx websites from XP to Win 2003
• Visual Studio Trial 2008 Installation problem
• Visual Studio 2008 SP1: Missing "none" check out lock type.
• VS2008: Web.config Closes on Save