2010-01-26 3 views
1

Visual Studio 2008에서 웹 배포 프로젝트를 작성하려고하는데 실패하고 계속 그 이유를 모르겠습니다. 오류 :웹 배포 프로젝트 빌드 실패 (Visual Studio 2008)

------ Build started: Project: website_deploy, Configuration: Release Any CPU ------ 
if exist ".\TempBuildDir\" rd /s /q ".\TempBuildDir\" 
'C:\Documents' is not recognized as an internal or external command, 
operable program or batch file. 
C:\Program Files\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets(92,7): error MSB3073: The command "if exist ".\TempBuildDir\" rd /s /q ".\TempBuildDir\"" exited with code 1. 
Done building project "website_deploy.wdproj" -- FAILED. 
========== Build: 1 succeeded or up-to-date, 1 failed, 0 skipped ========== 

나는 다른 컴퓨터에서 동일한 프로젝트를 가지고 있고 그것은 잘 구축합니다. 내가 Visual Studio 2008 Web Deployment Projects - RTW 다운로드 및 Visual Studio 2008

편집 용 서비스 팩 1을 설치 한 : 오류 목록에서

, 그것은 Error 1 The command "if exist ".\TempBuildDir\" rd /s /q ".\TempBuildDir\"" exited with code 1.있다. 나는 프로젝트가 그대로 공백 (C:\Web\Projects\)

그것은 웹 사이트 및 Add Web Deployment Project을 클릭 마우스 오른쪽 버튼으로 클릭에 의해 생성 된 새로운 웹 배포 프로젝트로 발생하지 않고 폴더에 C:\Documents와 함께 오는 이유를 알고하지 않습니다.

수정 (29 Jan).

Building with tools version "3.5". 
Target "_PrepareForBuild" in file "C:\Program Files\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets": 
    Using "CreateProperty" task from assembly "Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". 
    Task "CreateProperty" 
    Done executing task "CreateProperty". 
    Task "CreateProperty" 
    Done executing task "CreateProperty". 
    Task "CreateProperty" 
    Done executing task "CreateProperty". 
    Using "Exec" task from assembly "Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". 
    Task "Exec" 
    Command: 
    if exist ".\TempBuildDir\" rd /s /q ".\TempBuildDir\" 
    'C:\Documents' is not recognized as an internal or external command, 
    operable program or batch file. 
    C:\Program Files\MSBuild\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets(92,7): error MSB3073: The command "if exist ".\TempBuildDir\" rd /s /q ".\TempBuildDir\"" exited with code 1. 
    Done executing task "Exec" -- FAILED. 
Done building target "_PrepareForBuild" in project "website_deploy.wdproj" -- FAILED 
+1

는 C : \ Documents and Settings의 공간을 좋아하지 않습니다. – RYFN

+0

'C : \ Documents'는 솔루션이나 프로젝트 파일의 어느 곳에서나 참조되지 않습니다. – SamWM

답변

1

문제가 무엇인지 알아 냈습니다.

사용자 프로필 폴더에 @ 기호가 있는데, MSBuild가 깨질 수 있습니다 (@는 MSBuild와 특별한 의미가 있으므로).

사용자 프로필 폴더가 C:\Documents and Settings\[email protected]이고이 문제는 C:\Documents and Settings\username으로 바뀌 었습니다. 따라서 폴더 이름에 공백이 있으면 실패의 원인이 아닙니다.

1

프로젝트가 임시 디렉토리에 빌드 된 후 영구적 인 위치에 복사된다고 생각합니다. ".\TempBuildDir\"은 빌드가 성공한 PC에서 간격이없는 디렉토리로 이어지는 상대 경로이지만 임시 디렉토리 (C : \ Documents and Settings의 기본값)로 인해 PC에서 실패합니다.

확실하게 : PC와 다른 컴퓨터의 임시 디렉토리 위치를 확인하십시오. 또는 가능한 경우 TempBuildDir 경로를 C : \ Temp 또는 사용자에게 적합한 모든 경로로 변경하십시오.

구체적으로 말하자면, 다른 컴퓨터가 Vista 또는 Win7 PC 인 경우 TempBuildDir은 C : \ Users 디렉터리의 어딘가에있을 수 있습니다. 컴퓨터가 WinXP PC 인 경우, TempBuildDir은 C : \ Documents and Settings 어딘가에있을 가능성이 큽니다.