MSBuild 错误 MSB4018:“ResolveKeySource”任务意外失败
直到今天,它一直是一个干净的构建过程。检查了一些源文件,运行 Hudson,我得到了这些额外的编译器错误:
[exec](ResolveKeySource 目标)-> [exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7):错误 MSB4018:“ResolveKeySource”任务意外失败。 [exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): 错误 MSB4018: System.InvalidOperationException: 当应用程序未运行时显示模式对话框或表单UserInteractive 模式不是有效的操作。指定 ServiceNotification 或 DefaultDesktopOnly 样式以显示来自服务应用程序的通知。 [exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): 错误 MSB4018: 在 System.Windows.Forms.Form.ShowDialog(IWin32Window 所有者) [exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): 错误 MSB4018: 在 System.Windows.Forms.Form.ShowDialog() [exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): 错误 MSB4018: 在 Microsoft.Build.Tasks.ResolveKeySource.ResolveManifestKey() [exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): 错误 MSB4018: 在 Microsoft.Build.Tasks.ResolveKeySource.Execute() [执行] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): 错误 MSB4018: 在 Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket 存储桶, TaskExecutionMode howToExecuteTask、ITask 任务、Boolean&taskResult)
它似乎不会影响输出,因为我可以毫无意外地部署程序集。但是,我需要恢复构建输出的卫生状态。有什么想法可能会改变吗?这是使用 Visual Studio 2008 和 .NET 3.5 的情况。
TIA。
It has always been a clean build process till today. Checked in some source files, ran Hudson and I get these additional compiler errors:
[exec] (ResolveKeySource target) ->
[exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): error MSB4018: The "ResolveKeySource" task failed unexpectedly.
[exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): error MSB4018: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
[exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): error MSB4018: at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
[exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): error MSB4018: at System.Windows.Forms.Form.ShowDialog()
[exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): error MSB4018: at Microsoft.Build.Tasks.ResolveKeySource.ResolveManifestKey()
[exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): error MSB4018: at Microsoft.Build.Tasks.ResolveKeySource.Execute()
[exec] C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): error MSB4018: at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
It does not seem to affect output as I can deploy assemblies without incident. However, I need to restore sanitary state of build output. Any ideas what could have possibly changed? This is with Visual Studio 2008 and .NET 3.5.
TIA.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的构建过程会尝试提示您输入密码,可能是用于对程序集进行签名的证书或 .pfx。
由于 Hudson 作为系统服务运行,因此现在允许它与桌面交互并显示模式对话框。
要解决此问题,请将 Hudson 配置为作为用户帐户运行(在服务配置下)并将证书安装到该帐户的本地存储中。
Your build process is trying to prompt you for a password, possibly for a certificate or .pfx that is being used to sign your assemblies.
Since Hudson is running as a system service, it is now allowed to interact with the desktop and display a modal dialog.
To resolve this, configure Hudson to run as a user account (under the Services configuration) and install the certificate into the Local Store for that account.