MSBuild error MSB4018: The "ResolveKeySource" task failed unexpectedly
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.Win开发者_开发技巧dows.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.
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.
精彩评论