locked
ResolveAssembyReference error MSB4018 OutOfMemory Exception Problem RRS feed

  • Question

  • I am using VS2008 with SP1 to build a solution which includes managed c# code, unmanaged c++ code, and mixed mode code (built with /CLR switch). Mixed mode code bridges between the managed and unmanaged worlds, and consists of a dll built with /CLR option linked to a static lib consisting of a large body of legacy c++ native code. The managed c# project contains a reference to the project containing mixed mode code. Therein lies the problem. When the managed project is built ResolveAssemblyReference bombs out. I tried running MSBuild from command line and got the same result. Below is the output.

    I am running XP Pro on a dual core PC with 2GB RAM. Are there any MSBUILD debug switches which might help pinpoint the error? Thanks in advance

     Debug Any CPU ------
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018: The "ResolveAssemblyReference" task failed unexpectedly.
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018:    at System.Reflection.AssemblyName.nGetFileInformation(String s)
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018:    at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018:    at Microsoft.Build.Shared.AssemblyNameExtension.GetAssemblyNameEx(String path)
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018:    at Microsoft.Build.Tasks.SystemState.GetAssemblyName(String path)
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018:    at Microsoft.Build.Tasks.ReferenceTable.NameAssemblyFileReference(Reference reference, String assemblyFileName)
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018:    at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryFileItem(ITaskItem referenceAssemblyFile)
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018:    at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryItems(ITaskItem[] referenceAssemblyFiles, ITaskItem[] referenceAssemblyNames, ArrayList exceptions)
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018:    at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure(DependentAssembly[] remappedAssembliesValue, ITaskItem[] referenceAssemblyFiles, ITaskItem[] referenceAssemblyNames, ArrayList exceptions)
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018:    at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute(FileExists fileExists, DirectoryExists directoryExists, GetDirectories getDirectories, GetAssemblyName getAssemblyName, GetAssemblyMetadata getAssemblyMetadata, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, GetLastWriteTime getLastWriteTime)
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018:    at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute()
    11>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
    11>Done building project "CenterCordIMS.csproj" -- FAILED.
    12
    Tuesday, March 3, 2009 7:00 PM

All replies

  • Hello,

    Are the references for your projects correct or not?  Have you tried to reinstall VS?  

    Because this is a strange issue and we cannot reproduce now, you might also try to feedback it on our Connect portal site, however, our engineers need the details to reproduce this issue and investigate it, you can run msbuild with the /v:detailed switch to see the detailed information and pipe the output to a file and feedback with it, it would be most helpful if has a demo.

          https://connect.microsoft.com/VisualStudio/

    In your feedback, you can quote the URL to this thread, so that the whole conversation can be available. Every feedback submitted will be evaluated carefully by our engineers. They will let you know their comments further through that portal. It would be great if you can also paste the link to the submitted feedback here, so that other community members can see it as well.

    Thanks!


    Please mark the replies as answers if they help and unmark them if they provide no help.
    Monday, March 9, 2009 3:23 AM