9
votes

My team and I get this error often but random and we're not sure why it does this. To get around it we either build the solution a couple of times of have to restart Visual Studio (10). Here's the error i have when i try to build :

Error 5 The "GenerateApplicationManifest" task failed unexpectedly.
System.Runtime.InteropServices.COMException (0x8731F230): Exception from HRESULT: 0x8731F230
 at System.Runtime.InteropServices.UCOMITypeInfo.ReleaseTypeAttr(IntPtr pTypeAttr)
 at Microsoft.Build.Tasks.Deployment.ManifestUtilities.ComImporter..ctor(String path, OutputMessageCollection outputMessages, String outputDisplayName)
 at Microsoft.Build.Tasks.Deployment.ManifestUtilities.FileReference.ImportComComponent(String path, OutputMessageCollection outputMessages, String outputDisplayName)
 at Microsoft.Build.Tasks.GenerateApplicationManifest.AddIsolatedComReferences(ApplicationManifest manifest)
 at Microsoft.Build.Tasks.GenerateApplicationManifest.BuildApplicationManifest(ApplicationManifest manifest)
 at Microsoft.Build.Tasks.GenerateApplicationManifest.OnManifestLoaded(Manifest manifest)
 at Microsoft.Build.Tasks.GenerateManifestBase.BuildManifest()
 at Microsoft.Build.Tasks.GenerateManifestBase.Execute()
 at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
 at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)

Thanks for your help!

1
Does your solution have a mixture of C++ and .NET projects, and do your .NET projects use any COM components that are being built? Here are a few things to try: - You could try setting the maximum number of parallel projects builds to 1. - Try building your solution with the command line (i.e. MSBUILD) to see if you get the same behaviour - Close All Designer Tabs and ToolBox before building - CSmith
Is one of your projects being exposed for ComInterop? If so, it could be that a process is holding on to the type library reference from when you have been running the solution locally (i.e. debugging in VS). It may be worth ensuring that all the processes that are using that COM object (possibly external apps you may have used CREATEOBJECT in) are not running. - Duncan Howe
Try this link it seems like this person has the same problem as you: Visual Studio - chandhooguy
@chandhooguy, what we got here is a related COMException, not a PathTooLongException - Claudiu Constantin

1 Answers

2
votes

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.