Clickonce 설치 프로그램을 사용하여 Outlook 추가 기능을 배포하려고합니다. 거의 작동하는 배치 파일이 있지만 Windows XP에 설치하려고하면 "xml signature is not valid"오류가 발생합니다. XP가 SHA256 인증서 example으로 실패한다는 것은 꽤 잘 알려져 있습니다. 또한 Visual Studio 인터페이스를 사용하여 게시 할 때 Visual Studio 2013 용 업데이트 3에서이 문제를 해결하는 것으로 알려져 있습니다. 커맨드 라인에서 signtool이나 mage를 사용하여 동일한 수정을 어떻게 수행 할 수 있을지 궁금합니다. 다음은 Windows XP를 제외한 모든 작동 나의 현재의 배치 파일입니다 :이 스크립트에 많은 비틀기를 시도Visual Studio 업데이트 3처럼 Sha256 Cert for .NET 4.0 ClickOnce에 서명하는 방법
:: Build and publish
msbuild /target:clean,publish /property:MapFileExtensions=false /property:Configuration="Release" /property:ApplicationVersion="1.0.0.0" /property:InstallUrl="https://example.com" /property:UpdateEnabled="true" /property:UpdateMode="Foreground" /property:UpdateInterval="0" /property:UpdateIntervalUnits="days" /property:PublisherName="Example" /property:ProductName="Example Outlook Add-In" /property:FriendlyName="Example Outlook Add-In" /property:LoadBehavior="3" /property:BootstrapperEnabled="true" /property:IsWebBootstrapper="true"
:: Sign the exe
signtool sign /fd SHA1 /f "certificate.pfx" "publish\setup.exe"
:: Sign the application manifest
mage -sign "publish\Application Files\Example_1_0_0_0\Example.dll.manifest" -CertFile "certificate.pfx"
mage -update "publish\Application Files\Example_1_0_0_0\Example.dll.manifest" -CertFile "certificate.pfx" -algorithm sha1RSA
:: Sign the deployment manifests (there are 2 locations)
mage -update "publish\Application Files\Example_1_0_0_0\Example.vsto" -appmanifest "publish\Application Files\Example_1_0_0_0\Example.dll.manifest" -CertFile "certificate.pfx" -algorithm sha1RSA
mage -update "publish\Example.vsto" -appmanifest "publish\Application Files\Example_1_0_0_0\Example.dll.manifest" -CertFile "certificate.pfx" -algorithm sha1RSA
는 내가 들어 왔 곳이다. Visual Studio "지금 게시"버튼을 사용하여 동일한 인증서로 게시하면 모든 것이 잘 작동하지만, 자동화를 위해 명령 줄에서 작업하고 싶습니다.
음, 좋은 질문입니다. 아마도'procexp'를 실행하여 VS가 어떤 도구를 호출하고 있는지 (그리고 그들의 주장을) 정확히 볼 수있을 것입니다. – Cameron