ASP.net core System.OutOfMemoryException was thrown

-2

Every time i'm trying to run the project i'm getting the System.OutOfMemoryException was thrown. It was running fine on the same system before. I'm using the dnx451 and visual studio update 3. Things I've tried so far

  1. Restarted the visual studio and the system as well.
  2. Clean, rebuilt and restore packages and dependencies.
  3. cleared Temp and restarted and followed the two steps above.
  4. Tried setting the architecture to 64 before it was x86.

enter image description here

How can i find where exactly this error is occurring.Here is the Stack Trace

System.IO.FileLoadException: Could not load file or assembly 'ExampleProject' or one of its dependencies. General Exception (Exception from HRESULT: 0x80131500)
File name: 'ExampleProject' ---> System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Dnx.Compilation.DesignTime.DesignTimeHostCompiler.d__6.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Microsoft.Dnx.Compilation.DesignTime.DesignTimeHostProjectCompiler.CompileProject(CompilationProjectContext projectContext, Func`1 referenceResolver, Func`1 resourcesResolver)
   at Microsoft.Dnx.Compilation.LibraryExporter.<>c__DisplayClass17_0.b__0(CacheContext ctx)
   at Microsoft.Dnx.Compilation.Caching.CacheExtensions.<>c__DisplayClass0_0`1.b__0(CacheContext ctx)
   at Microsoft.Dnx.Compilation.Caching.Cache.CreateEntry(Object k, Func`2 acquire)
   at Microsoft.Dnx.Compilation.Caching.Cache.<>c__DisplayClass5_0.b__0()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at Microsoft.Dnx.Compilation.Caching.Cache.Get(Object key, Func`2 factory)
   at Microsoft.Dnx.Compilation.Caching.CacheExtensions.Get[T](ICache cache, Object key, Func`2 factory)
   at Microsoft.Dnx.Compilation.LibraryExporter.ExportProject(ProjectDescription project, String aspect)
   at Microsoft.Dnx.Compilation.LibraryExporter.GetExport(LibraryDescription library, String aspect)
   at Microsoft.Dnx.Compilation.LibraryExporter.GetExport(String name, String aspect)
   at Microsoft.Dnx.Compilation.CompilationEngine.LoadProject(Project project, FrameworkName targetFramework, String aspect, IAssemblyLoadContext loadContext, AssemblyName assemblyName)
   at Microsoft.Dnx.Runtime.Loader.ProjectAssemblyLoader.Load(AssemblyName assemblyName, IAssemblyLoadContext loadContext)
   at Microsoft.Dnx.Runtime.Loader.ProjectAssemblyLoader.Load(AssemblyName assemblyName)
   at Microsoft.Dnx.Host.LoaderContainer.Load(AssemblyName assemblyName)
   at Microsoft.Dnx.Host.DefaultLoadContext.LoadAssembly(AssemblyName assemblyName)
   at Microsoft.Dnx.Runtime.Loader.AssemblyLoaderCache.GetOrAdd(AssemblyName name, Func`2 factory)
   at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadAssemblyImpl(AssemblyName assemblyName)
   at Microsoft.Dnx.Runtime.Loader.LoadContext.ResolveAssembly(Object sender, ResolveEventArgs args)
   at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
---> (Inner Exception #0) System.InvalidOperationException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Dnx.Compilation.DesignTime.DesignTimeHostCompiler.d__6.MoveNext()<---

   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Microsoft.AspNet.Hosting.Startup.StartupLoader.FindStartupType(String startupAssemblyName, IList`1 diagnosticMessages)
   at Microsoft.AspNet.Hosting.Internal.HostingEngine.EnsureStartup()
   at Microsoft.AspNet.Hosting.Internal.HostingEngine.EnsureApplicationServices()
   at Microsoft.AspNet.Hosting.Internal.HostingEngine.BuildApplication()

.NET Framework Clr version 4.0.30319.42000   |   DNX x86 version 1.0.0-rc1-16231   |   Microsoft.AspNet.Hosting version 1.0.0-rc1-15988   |   Windows 10.0 
c#
visual-studio-2015
asked on Stack Overflow Oct 24, 2018 by piyush sanadhya • edited Oct 24, 2018 by piyush sanadhya

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0