編譯.net項目時,出現無法找到清單簽署憑證的狀況,用方法3解決了。用方法1和2隻能順利編譯,但不能發布。
最直接有效方法是1,2和1效果一樣只不過是處理的步驟多幾步:
1.工程->屬性->簽名->為ClickOnce清單簽名
2.用記事本開啟對應csproj檔案。將
<SignManifests>true</SignManifests>改為
<SignManifests>false</SignManifests>.
3.在vs2005中出現“無法在憑證存放區區中找到清單簽署憑證”,解決辦法是用記事本開啟項目的.csproj檔案,刪除類似以下xml就能順利通過編譯了
<ManifestCertificateThumbprint>B531F2CF222748C5E29308FC2247704827D1EA8C</ManifestCertificateThumbprint>
<ManifestKeyFile>xxxx_TemporaryKey.pfx</ManifestKeyFile>
<GenerateManifests>true</GenerateManifests>
<SignManifests>true</SignManifests>
<PublishUrl>D:\xxx\bin\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<CreateWebPageOnPublish>false</CreateWebPageOnPublish>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<BootstrapperEnabled>true</BootstrapperEnabled>
出現以上原因可能是:clickone自動產生的認證到期了(有效期間只有一年,且不能修改延長),
若是重建新的認證用戶端自動更新將失敗。你可以在程式發布前自己產生認證,把時間延長個若干年。採用MakeCert.exe等工具稍加改動即可