1

every couple hours or so, when compiling my solution (fairly big one), i'm keep getting the following exception:

C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018: The "ResolveAssemblyReference" task failed unexpectedly. C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018: at System.Reflection.AssemblyName.nGetFileInformation(String s) C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018: at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile) C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018: at Microsoft.Build.Shared.AssemblyNameExtension.GetAssemblyNameEx(String path) C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018: at Microsoft.Build.Tasks.SystemState.GetAssemblyName(String path) C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.NameAssemblyFileReference(Reference reference, String assemblyFileName) C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryFileItem(ITaskItem referenceAssemblyFile) C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryItems(ITaskItem[] referenceAssemblyFiles, ITaskItem[] referenceAssemblyNames, ArrayList exceptions) C:\WINNT\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) C:\WINNT\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) C:\WINNT\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1353,9): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute() C:\WINNT\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) Done building project "Point.App.csproj" -- FAILED.

Does anyone has any idea how to fix this?

Thanks

4

2 回答 2

0

它似乎给您的错误是内存不足异常。内存异常不仅仅来自没有足够的内存。您可能会破坏堆栈,甚至内存已损坏或与主板不兼容,并遇到类似的情况。

现在我并不是说这是你的问题,只是需要看看。

您的项目、DLL 和其他文件是如何相关的?调试你的代码。这意味着摆脱所有错误和警告。一个接一个地取消链接文件,直到找到混乱的底部。从您的 DLL 开始,然后是项目,最后是您的其他文件。

于 2010-07-30T14:08:24.303 回答
-1

然后你可以尝试添加 true

到项目文件中没有条件的 PropertyGroup。对似乎有问题的所有项目文件执行此操作。

然后在VS中重新打开,看看是否避免了这个问题。

请参阅以下链接: https ://social.msdn.microsoft.com/Forums/vstudio/en-US/cdad1ba3-8c0a-4b3c-8259-83c7f7b5a98b/vs2008-systemoutofmemoryexception-s-just-keep-coming?forum=msbuild

于 2016-02-11T07:18:23.790 回答