Excel VSTO ClickOnce从Apache服务器安装抛出一个错误“dll.manifest,有一个不同于清单中指定的计算散列”。
首先,我意识到这个问题之前已经被问了很多次了。 我已经回顾了无数的解决scheme,但没有一个解决了我的错误。
所以我有一个已发布的ClickOnce Excel加载项,安装时从本地目录(所以在相同的文件夹,而不是从一个网站寻找.vsto)将安装罚款。 不过,我希望我的加载项从我的服务器检查更新,因此我将安装path设置为http:// [subdomain]。[domain] .com / exceladdin /。
我把我的文件放在一个git目录中,并把它们推送到我的远程仓库。 然后我把修改到我的Apache2服务器(“setup.exe”,“.vsto”和“应用程序文件”文件夹都在public / exceladdin目录中)。 然后我重新启动我的Apache2服务器。
当我从Internet Explorer访问.vsto时,它开始安装,但是随后出现以下消息:
Name: From: http://<subdomain>.<domain>.com/exceladdin/<filename>.vsto ************** Exception Text ************** System.Deployment.Application.InvalidDeploymentException: Application manifest has either a different computed hash than the one specified or no hash specified at all. ---> System.Deployment.Application.InvalidDeploymentException: File, <filename>.dll.manifest, has a different computed hash than specified in manifest. at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, Hash hash) at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, HashCollection hashCollection) at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath) --- End of inner exception stack trace --- at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout) at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
如果我下载setup.exe并运行它,则会发生完全相同的情况。
我正在使用的东西:
-
Visual Studio 2013用于创build和发布加载项
-
GitHub为我的远程存储库
-
Apache2来运行我的服务器
我做过的事情/试图解决这个问题:
-
根据这个设置MIME.types
-
清理我的构build/解决scheme,删除obj和bin文件夹,然后重新发布文件
-
使用法师和MageUI来根据这个辞职清单
-
我还用自定义testing证书签署了我的加载项
我一直在试图解决这个问题,所以任何疑难解答提示将非常感谢!
提前致谢
问题与Github有关,它正在改变我的文件,从而导致哈希码不匹配。
为了解决这个问题,我遵循这个教程,并添加了一个.gitattributes文件
*.vsto binary *.deploy binary *.manifest binary
让Github不要更改我的文件。