dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.07k stars 2.03k forks source link

Orleans + NuGet4 + ActivityDesigner causes OutOfMemoryException in VS15 #3042

Closed lmagyar closed 7 years ago

lmagyar commented 7 years ago

Steps to reproduce:

Instead of opening the designer, VS says:

System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
   at VSLangProj.Reference.get_PublicKeyToken()
   at Microsoft.VisualStudio.Activities.Helper.CreateAssemblyNameFromReference(Reference r)
   at Microsoft.VisualStudio.Activities.Helper.GetReferenceAssemblies(VSProject project)
   at Microsoft.VisualStudio.Activities.EditorPane.get_ReferencedAssemblies()
   at Microsoft.VisualStudio.Activities.EditorPane.ResetShadowCopyPath()
   at Microsoft.VisualStudio.Activities.EditorPane.CreateWorkflowDesignerInIsolatedMode()
   at Microsoft.VisualStudio.Activities.EditorPane.Microsoft.VisualStudio.Shell.Interop.IPersistFileFormat.Load(String fileName, UInt32 formatMode, Int32 readOnly)

Build results in 2 warnings:

I tried to investigate:

It seems to me, that it is related with Orleans and assembly loading, but have no clue how can it be related with NuGet4's PackageReference.

How could I investigate it deeper???

sergeybykov commented 7 years ago

@lmagyar From your description I get the impression this is a VS/VSIX bug. Have you tried the same in VS 2017 for a comparison?

lmagyar commented 7 years ago

I've tried it in VS 15, ie. VS 2017, only this has NuGet 4.x as I know. It's a bug, that shows itself only when Orleans.dll is loaded in NuGet4's PackageReference "environment" under VS15. It's only a hunch, that Orleans.dll itself contains something special. I try to investigate it deeper.

lmagyar commented 7 years ago

Reported it in VS FeedBack (https://developercommunity.visualstudio.com/content/problem/61637/vs-2017-outofmemoryexception-in-xaml-activity-desi.html), closing it here.

sergeybykov commented 7 years ago

Makes sense. Orleans.dll doesn't contain anything special that could interfere with VS, I don't think.