2017-05-04 1 views
0

Windows 7 컴퓨터에서 Visual Studio 2017을 사용하여 Azure ARM 템플릿을 배포 할 때 두 번째 템플릿을 배포 한 후에 만 ​​나타나는 Executable script code found in signature block이라는 오류가 발생하기 시작했습니다. 나는이 오류를 언급 한 몇 가지 출처를 찾았지만 Visual Studio를 닫고 다시 열지 않아도 실제 솔루션으로는 받아 들일 수없는 해결책을 찾지 못했습니다. 나는 전체 배포 로그 아래에 포함했습니다서명 블록 오류에 실행 파일 코드가 있음

17:40:53 - The following parameter values will be used for this operation: 
17:40:53 -  AZTemplateTestName: AZTemplateTest-AppService 
17:40:53 -  AZTemplateTestSkuName: S1 
17:40:54 - Build started. 
17:40:54 - Project "AZTemplateTest.deployproj" (StageArtifacts target(s)): 
17:40:54 - Project "AZTemplateTest.deployproj" (ContentFilesProjectOutputGroup target(s)): 
17:40:54 - Done building project "AZTemplateTest.deployproj". 
17:40:54 - Done building project "AZTemplateTest.deployproj". 
17:40:54 - Build succeeded. 
17:40:54 - Launching PowerShell script with the following command: 
17:40:54 - 'C:\Users\username\documents\visual studio 2017\Projects\AZTemplateTest-Test\AZTemplateTest-Test\bin\Debug\staging\AZTemplateTest\Deploy-AzureResourceGroup.ps1' -StorageAccountName '' -ResourceGroupName 'AZTemplateTest-Test-2' -ResourceGroupLocation 'eastus' -TemplateFile 'C:\Users\username\documents\visual studio 2017\Projects\AZTemplateTest-Test\AZTemplateTest-Test\bin\Debug\staging\AZTemplateTest\azuredeploy.json' -TemplateParametersFile 'C:\Users\username\documents\visual studio  2017\Projects\AZTemplateTest-Test\AZTemplateTest-Test\bin\Debug\staging\AZTemplateTest\azuredeploy.parameters.json' -ArtifactStagingDirectory '.' -DSCSourceFolder '.\DSC' 
17:40:54 - [ERROR] At line:1 char:2337 
+ $UI = 'VS-'; if (!(Test-Path 'C:\Users\username\AppData\Roaming\Windows Azure P ... 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Executable script code found in signature block. 

더 흥미로운 부분은 내가 C:\Users\username\AppData\Roaming에 맞는 유일한 폴더를 이동하는 경우 Windows Azure P의 패턴이 Windows Azure Powershell 것입니다. 그 폴더 안에 존재하는 유일한 것은 AzureDataCollectionProfile.json이며 Azure 데이터 수집을 선택하거나 선택 해제 한 경우에만 들어 있습니다. 해당 파일 및/또는 폴더를 삭제하려고해도 결과는 동일하게 유지됩니다. 완전히 만든 프로젝트 재건 동일한 결과

  • 프로젝트를 청소 같은 결과
  • , 동일한 결과를 새 프로젝트를

    • :

      나는 또한 해결책을 찾는 희망에 다음을 시도했습니다

  • +0

    psversion 3에 오셨습니까 ?? PS 버전을 알려주십시오. –

    +0

    버그에 빠졌다고 생각합니다. 한 가지 해결 방법은 VS를 통하지 않고 직접 PowerShell 스크립트를 호출하는 것입니다. 이 비틀기를 사용하세요. [TWEAK] (https://github.com/pester/Pester/commit/92f94357bbce01caded6f3b3cfddbcb528f56436) –

    +0

    @RanadipDutta 예, V3입니다. – jak119

    답변

    0

    이것은 Win7의 PowerShell 3에서 알려진 문제이며 PowerShell을 업그레이드하는 유일한 방법입니다.