我有一个 ppt2013 插件解决方案,其中安装了vsto,安装了vs 2017的开发人员机器。生成时,出现signFile错误。我已经安装
.Net framework 4.5.1 targeting pack
.Net framework 4.5.1 SDK
.Net framework 4.5.2 targeting pack
.Net framework 4.6 SDK
.Net framework 4.6 targeting pack
.Net framework 4.6.1 targeting pack
.Net framework 4.6.2 SDK
.Net framework 4.6.2 targeting pack
有人有解决这个错误的好主意吗?
> detail: D:\Program Files (x86)\Microsoft Visual
> Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(264,9):
> error MSB4018: The "SignFile" task failed unexpectedly. 8>D:\Program
> Files (x86)\Microsoft Visual
> Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(264,9):
> error MSB4018: System.InvalidOperationException: Exception of type
> 'System.InvalidOperationException' was thrown. 8>D:\Program Files
> (x86)\Microsoft Visual
> Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(264,9):
> error MSB4018: at
> Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.SignFileInternal(X509Certificate2
> cert, Uri timestampUrl, String path, Boolean
> targetFrameworkSupportsSha256, ResourceManager resources) 8>D:\Program
> Files (x86)\Microsoft Visual
> Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(264,9):
> error MSB4018: at
> Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.SignFile(String
> certThumbprint, Uri timestampUrl, String path, String
> targetFrameworkVersion) 8>D:\Program Files (x86)\Microsoft Visual
> Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(264,9):
> error MSB4018: at Microsoft.Build.Tasks.SignFile.Execute()
> 8>D:\Program Files (x86)\Microsoft Visual
> Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(264,9):
> error MSB4018: at
> Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
> 8>D:\Program Files (x86)\Microsoft Visual
> Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(264,9):
> error MSB4018: at
> Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
答案 0 :(得分:1)
我已解决此问题。SignFile安装不正确。enter image description here
直接双击SignFile来安装会导致问题。在Project中选择File,然后png的向导正确。
答案 1 :(得分:0)
您的项目目标是什么框架?似乎与here描述的问题类似。
请确保已安装相应的目标框架SDK,也可能需要安装.Net 4.0 SDK并重新启动PC才能再次构建项目。
另外:似乎您尚未安装.net 4.6.1 SDK,因此,如果可能,您可能还需要安装.net framework 4.6.1
SDK。转到Tools=>Get Tools and Features=>Individual Components
安装.net framework 4.6.1
SDK软件包。