2014-04-04 4 views
6

Azure SDK 버전 2.2를 사용할 때 Visual Studio 2012 오류 목록에이 오류가 표시됩니다.Azure에서 "예기치 않게 ValidateServiceFiles 작업이 실패했습니다"라는 오류를 어떻게 해결합니까?

는 또한 파일 참조 :

 Error 5 The "ValidateServiceFiles" task failed unexpectedly. 
System.IO.FileNotFoundException: Could not find file 'C:\Project\Data.Contracts\ServiceConfiguration.Local.cscfg'. 
File name: 'C:\Project\Data.Contracts\ServiceConfiguration.Local.cscfg' 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
    at Microsoft.ServiceHosting.Tools.Internal.Translations.Translate.ServiceConfigurationFromFile(Boolean useInternalSchema, String serviceConfigurationFile, ValidationHandler validationHandler) 
    at Microsoft.ServiceHosting.Tools.MSBuildTasks.ValidateServiceFiles.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.2\Microsoft.WindowsAzure.targets 669 5 Azure. 

파일이 분명히 존재하고 올바른 특성을가집니다. 이상한 점은 파일이 주어진 경로에 있지 않다는 것입니다. 다른 경로에 있습니다. 마치 ValidateServiceFiles 프로세스가 혼란스럽고 잘못된 폴더에있는 파일을 찾는 것과 같습니다.

Azure 작업자 역할 프로젝트 및 클라우드 프로젝트를 다시로드해도 컴퓨터가 다시 시작되지 않습니다. 때때로 솔루션에 각 클라우드 프로젝트를 직접 구축하여 진행할 수 있습니다. 그러나 오류는 항상 원래대로 되긴하지만 소스 제어에서 최신 정보를 얻은 후 항상 반환됩니다.

자세한 빌드 로그

이 계시 :

58>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.2\Microsoft.WindowsAzure.targets(3259,5): warning MSB3026: Could not copy "ServiceConfiguration.Local.cscfg" to "bin\Debug\ServiceConfiguration.cscfg". Beginning retry 2 in 1000ms. Could not find file 'ServiceConfiguration.Local.cscfg'. 

을하지만이 도움이되지 않습니다. 파일이 프로젝트의 올바른 위치에 있습니다 (오류 메시지에 지정된 경로가 아님)

ValidateServiceFiles 프로세스를 디버깅하는 방법에 대한 인터넷상의 도움이 거의 없습니다.

답변

1

많은 검색을 한 후에 대답을 찾았습니다. 파란색 물음표로 표시된 것처럼 디스크에 실제로 존재하지 않는 프로필 파일을 게시하는 데 3 개의 참조가있었습니다. 누군가가 푸른 포털에 클라우드 서비스를 삭제하면, 로컬 컴퓨터에서 빌드가 작동하지 않기 때문에

enter image description here

+1

더 프로파일을 게시 한 경우, 당신은 또한 게시를 클릭, 클라우드 프로젝트를 오른쪽 클릭 푸른 로그인, 일관성있는 클라우드 스토리지 및 스토리지 계정이있는 푸른 가입을 선택할 필요가 없습니다 수 있습니다. 그런 다음 게시를 취소 한 다음 클라우드 프로젝트를 다시 작성합니다. –

+0

그리고 이렇게하면 누락 된 게시 파일에 대한 참조가 마술처럼 나타날 수 있습니다. –

+0

이 작업이 실패한 것으로 보이는 경우 프로젝트의 .ccproj.user 파일을 편집하십시오. 여기서 누락 된 파일을 참조하는 태그 ActivePublishProfile을 볼 수 있습니다. –

3

이 문제의 임의의 성격이다. 이는 ValidateServiceFiles 함수가 게시 프로파일 파일에 Azure 포털의 기존 클라우드 서비스에 대한 참조가 있는지 확인하기 때문입니다.

그러나 오류 메시지에는 모든 프로젝트를 나열하는 것만으로 문제가있는 프로젝트는 언급되어 있지 않습니다.

그래서 각 클라우드 프로젝트를 마우스 오른쪽 단추로 클릭 한 다음 게시를 클릭하고 빨간색 십자가를 확인하지 마십시오.

enter image description here

관련 문제