9

我和我的团队经常出现这个错误,但是是随机的,我们不确定它为什么会这样。为了解决这个问题,我们要么构建解决方案几次,要么必须重新启动 Visual Studio (10)。这是我尝试构建时遇到的错误:

错误 5 “GenerateApplicationManifest”任务意外失败。
System.Runtime.InteropServices.COMException (0x8731F2​​30):来自 HRESULT 的异常:0x8731F2​​30
 在 System.Runtime.InteropServices.UCOMITypeInfo.ReleaseTypeAttr(IntPtr pTypeAttr)
 在 Microsoft.Build.Tasks.Deployment.ManifestUtilities.ComImporter..ctor(字符串路径,OutputMessageCollection outputMessages,字符串 outputDisplayName)
 在 Microsoft.Build.Tasks.Deployment.ManifestUtilities.FileReference.ImportComComponent(字符串路径,OutputMessageCollection outputMessages,字符串 outputDisplayName)
 在 Microsoft.Build.Tasks.GenerateApplicationManifest.AddIsolatedComReferences(ApplicationManifest 清单)
 在 Microsoft.Build.Tasks.GenerateApplicationManifest.BuildApplicationManifest(ApplicationManifest 清单)
 在 Microsoft.Build.Tasks.GenerateApplicationManifest.OnManifestLoaded(清单清单)
 在 Microsoft.Build.Tasks.GenerateManifestBase.BuildManifest()
 在 Microsoft.Build.Tasks.GenerateManifestBase.Execute()
 在 Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
 在 Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost、TaskLoggingContext taskLoggingContext、TaskHost taskHost、ItemBucket 存储桶、TaskExecutionMode howToExecuteTask、Boolean& taskResult)

谢谢你的帮助!

4

1 回答 1

2

I had run into a similar issue and found that it was because one of my assembly's path was too long. I don't really understand why in some cases it may work for you, and in others it doesn't though, so it may be something else, but never hurts to check it out.

I believe the maximum length is 260 characters.

于 2012-07-17T20:40:23.247 回答