Answered by:
Appdomain is not supporting in .net core 3.1

Question
-
Appdomain is not supporting in .net core 3.1 when i migrated .net web application to .net core 3.1
how to omplement appdomain in core 3.1
Rakesh Singh
Tuesday, March 17, 2020 5:20 AM
Answers
-
Hi,
I haven't used it yet but apparently the AssemblyLoadContext ( https://docs.microsoft.com/en-us/dotnet/core/dependency-loading/understanding-assemblyloadcontext ) is what you are supposed to use for dynamic loading of assemblies.
A bit more background info
"App Domains
Why was it discontinued? AppDomains require runtime support and are generally quite expensive. While still implemented by CoreCLR, it’s not available in .NET Native and we don’t plan on adding this capability there.
What should I use instead? AppDomains were used for different purposes. For code isolation, we recommend processes and/or containers. For dynamic loading of assemblies, we recommend the new
AssemblyLoadContext
class."from : https://devblogs.microsoft.com/dotnet/porting-to-net-core
Hope this helps,
Here to learn and share. Please tell if an answer was helpful or not at all. This adds value to the answers and enables me to learn more.
About me- Edited by KeesDijk Tuesday, March 17, 2020 7:41 AM
- Proposed as answer by Alberto PoblacionMVP Tuesday, March 17, 2020 3:32 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Wednesday, March 25, 2020 7:39 AM
Tuesday, March 17, 2020 7:41 AM -
Appdomains exist in .NET Core but they cannot be used for process isolation like they did in .NET Framework. You have to rewrite your app. The guidelines recommend using separate physical processes for app isolation and AssemblyLoadContext for plugin architectures that don't need isolation.
There is no workaround. You have to change your app.
Michael Taylor http://www.michaeltaylorp3.net
- Proposed as answer by Alberto PoblacionMVP Tuesday, March 17, 2020 3:32 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Wednesday, March 25, 2020 7:39 AM
Tuesday, March 17, 2020 2:12 PM
All replies
-
ASP.NET Core can be discussed at he ASP.NET forums.
http://forums.asp.net/
Tuesday, March 17, 2020 5:38 AM -
Hi,
I haven't used it yet but apparently the AssemblyLoadContext ( https://docs.microsoft.com/en-us/dotnet/core/dependency-loading/understanding-assemblyloadcontext ) is what you are supposed to use for dynamic loading of assemblies.
A bit more background info
"App Domains
Why was it discontinued? AppDomains require runtime support and are generally quite expensive. While still implemented by CoreCLR, it’s not available in .NET Native and we don’t plan on adding this capability there.
What should I use instead? AppDomains were used for different purposes. For code isolation, we recommend processes and/or containers. For dynamic loading of assemblies, we recommend the new
AssemblyLoadContext
class."from : https://devblogs.microsoft.com/dotnet/porting-to-net-core
Hope this helps,
Here to learn and share. Please tell if an answer was helpful or not at all. This adds value to the answers and enables me to learn more.
About me- Edited by KeesDijk Tuesday, March 17, 2020 7:41 AM
- Proposed as answer by Alberto PoblacionMVP Tuesday, March 17, 2020 3:32 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Wednesday, March 25, 2020 7:39 AM
Tuesday, March 17, 2020 7:41 AM -
Appdomains exist in .NET Core but they cannot be used for process isolation like they did in .NET Framework. You have to rewrite your app. The guidelines recommend using separate physical processes for app isolation and AssemblyLoadContext for plugin architectures that don't need isolation.
There is no workaround. You have to change your app.
Michael Taylor http://www.michaeltaylorp3.net
- Proposed as answer by Alberto PoblacionMVP Tuesday, March 17, 2020 3:32 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Wednesday, March 25, 2020 7:39 AM
Tuesday, March 17, 2020 2:12 PM