TypeLoadException when running the project with MemProfiler

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
Posts: 1
Joined: Wed Jan 10, 2018 10:25 pm

TypeLoadException when running the project with MemProfiler

Post by lucad83 » Wed Jan 10, 2018 10:36 pm

Good morning,
I'm trying to run the evaluation version of your product but I can't start my program through the profiler.

The program, which is a NetCore Console App, runs fine on its own, but as soon as I try to debug it with the profile, the first line of code hits the following Exception:
System.TypeLoadException: 'Could not load type System.CannotUnloadAppDomainException' from assembly 'System.Private.CoreLib, Version=, Culture=neutral,PublicKeyToken=7cec85d7bea7798e.

I am running Visual Studio Enterprise 15.5.3. on Windows 2012 R2 Standard.
dotnet version is 2.1.4.

Any ideas what might be going on? Thanks.

Andreas Suurkuusk
Posts: 1030
Joined: Wed Mar 02, 2005 7:53 pm

Re: TypeLoadException when running the project with MemProfi

Post by Andreas Suurkuusk » Thu Jan 11, 2018 2:15 pm

The CannotUnloadAppDomainException class is used internally by the dispose tracker, but it seems like it is not always available in .NET Core. We have not been able to reproduce this error, but we have modified the dispose tracker a bit and we no longer use the CannotUnloadAppDomainException class.

Can you download the latest build using the link below and see if it works better?

https://cdn.memprofiler.com/download/Me ... 5_5_71.exe
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests