电竞比分网-中国电竞赛事及体育赛事平台

分享

Installing Win SDK for Svr 2008 after VS 2008 breaks VS command line build environment

 yunin 2008-09-07

Installing Win SDK for Svr 2008 after VS 2008 breaks VS command line build environment

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

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多