Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

[WIP] Collectible Assemblies and AssemblyLoadContext #8677

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
73e0b05
Add FeatureCollectibleALC and FEATURE_COLLECTIBLE_ALC define
xoofx Dec 21, 2016
7277c9e
Make BINDER_SPACE::Assemby::GetBinder public
xoofx Dec 21, 2016
a684502
Change from static_cast to reinterpret_cast
xoofx Dec 21, 2016
0ead976
Cleanup AssemblySpec to use a single method to lookup with a new argu…
xoofx Dec 21, 2016
ed1e48b
Add AppDomain::RemoveNativeImageDependency, RemoveFileFromCache, Remo…
xoofx Dec 21, 2016
8700f0b
Add lock for AppDomain::FindCachedAssembly, add lock for other methods
xoofx Dec 26, 2016
9e8502d
Add method GetKey to the iterator of PtrHashMap
xoofx Dec 26, 2016
c98620f
Try to use the BindingContext from the spec before using the one pass…
xoofx Dec 26, 2016
3d4aea0
Add support for collectible AssemblyLoadContext
xoofx Dec 26, 2016
193f43a
Revert "Add lock for AppDomain::FindCachedAssembly, add lock for othe…
xoofx Dec 26, 2016
3fbb577
Remove invalid word in a comment in mscorlib.h
xoofx Dec 26, 2016
fc230d6
Fix an issue in AssemblyLoadContext.cs where a underlying m_pNativeAs…
xoofx Dec 27, 2016
c144e65
Declare AppDomain::RemoveFileFromCache as GC_TRIGGERS as the underlyi…
xoofx Dec 27, 2016
82236db
Make sure to register an assembly to a LoaderAllocator just once it i…
xoofx Dec 27, 2016
175919a
An AssemblyLoaderAllocator could be created without any assemblies lo…
xoofx Dec 27, 2016
450cce1
Use DestroyWeakHandle instead
xoofx Dec 27, 2016
586c496
Move SetBinderToRelease to the SetupContext
xoofx Dec 27, 2016
9e7eeb3
Switch DestroyContext to an instance method. Transfer switch to GCX_C…
xoofx Dec 27, 2016
9e55d70
Use DestroyShortWeakHandle instead of DestroyWeakHandle
xoofx Dec 27, 2016
df223c1
Make collectible ALC optional (wip)
xoofx Dec 27, 2016
0cc6d4d
Change method DestroyContext to PrepareForLoadContextRelease and Rele…
xoofx Dec 27, 2016
0fcfbb7
Rename method CLRPrivBinderAssemblyLoadContext::SetBinderToRelease to…
xoofx Dec 27, 2016
b730cfc
Fix compilation error with LoaderAllocator constructor
xoofx Dec 27, 2016
1e34b7d
Add better support for the case IsCollectible in AssemblyLoadContext.cs
xoofx Dec 27, 2016
e4b17c6
Add proper ALC public signature to mscorlib/model.xml
xoofx Dec 28, 2016
ad97104
Fix bug in Unload for collectible ALC
xoofx Dec 28, 2016
af24afe
Rename UnloadInternal to UnloadCollectible
xoofx Dec 28, 2016
b2c0a2e
Try to fix compilation on MacOSX with VPTR_UNIQUE_OVERRIDE
xoofx Dec 28, 2016
46b113f
Merge remote-tracking branch 'github-origin/master' into collectible-…
xoofx Dec 28, 2016
204bb85
Improve unloading process
xoofx Dec 28, 2016
b84cb07
Don't remove explictely from the contextToUnload, as the previous loc…
xoofx Dec 28, 2016
3761429
Throw an exception when trying to Unload multiple times
xoofx Dec 28, 2016
021ff8e
Add comments
xoofx Dec 28, 2016
100f96e
Simplify code when creating a DomainAssembly from a collectible LoadA…
xoofx Dec 29, 2016
c1464f7
Move the termination of the LoaderAllocator from Assembly::Terminate …
xoofx Dec 29, 2016
44e0f51
Cleanup comments in LoaderAllocator::GCLoadCollectors
xoofx Dec 29, 2016
594668c
Fix an issue when multiple DomainAssemblies from the same LoaderAlloc…
xoofx Dec 29, 2016
c2b428d
If the LoaderAllocator is Collectible, we need to mark the Module as …
xoofx Dec 29, 2016
c3dfee1
Add #ifdef FEATURE_COLLECTIBLE_ALC
xoofx Dec 30, 2016
76be9e9
Add missing #ifdef FEATURE_COLLECTIBLE_ALC in AssemblyLoadContext.cs
xoofx Dec 30, 2016
9aef1e7
Use localized exception messages in AssemblyLoadContext
xoofx Dec 30, 2016
7aa1d01
Fix last missing #ifdef FEATURE_COLLECTIBLE_ALC
xoofx Dec 30, 2016
1ad89ed
Don't allocate regular static handles for collectible assemblies
xoofx Jan 2, 2017
78c1e2c
Try to fix compilation errors on clang/OSX with errors related to `ov…
xoofx Jan 3, 2017
63993c5
Make AssemblyLoadContext API exposing new collectible API but impleme…
xoofx Jan 5, 2017
9e1dc35
Make Finalizer declared in model.xml. Keep private OnUnloadingStatic …
xoofx Jan 6, 2017
6464f58
Change from NotSupportedException to InvalidOperationException
xoofx Jan 6, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -560,6 +560,7 @@ add_subdirectory(src/pal/prebuilt/inc)

add_subdirectory(src/debug/debug-pal)

add_definitions(-DFEATURE_COLLECTIBLE_ALC)
if(WIN32)
add_subdirectory(src/gc/sample)
endif()
Expand Down
1 change: 1 addition & 0 deletions clr.coreclr.props
Expand Up @@ -60,6 +60,7 @@
<FeatureCominteropUnmanagedActivation>true</FeatureCominteropUnmanagedActivation>
<FeatureCominteropWinRTManagedActivation>true</FeatureCominteropWinRTManagedActivation>
<FeatureHostAssemblyResolver>true</FeatureHostAssemblyResolver>
<FeatureCollectibleALC>true</FeatureCollectibleALC>
<FeatureLazyCOWPages Condition="('$(TargetArch)' == 'i386') or ('$(TargetArch)' == 'arm')">true</FeatureLazyCOWPages>
<FeatureLegacyNetCFDbgHostControl>true</FeatureLegacyNetCFDbgHostControl>
<FeatureRandomizedStringHashing>true</FeatureRandomizedStringHashing>
Expand Down
2 changes: 2 additions & 0 deletions clr.defines.targets
Expand Up @@ -43,6 +43,7 @@
<CDefines Condition="'$(FeatureFusion)' == 'true'">$(CDefines);FEATURE_FUSION</CDefines>
<CDefines Condition="'$(FeatureHijack)' == 'true'">$(CDefines);FEATURE_HIJACK</CDefines>
<CDefines Condition="'$(FeatureHostAssemblyResolver)' == 'true'">$(CDefines);FEATURE_HOST_ASSEMBLY_RESOLVER</CDefines>
<CDefines Condition="'$(FeatureCollectibleALC)' == 'true'">$(CDefines);FEATURE_COLLECTIBLE_ALC</CDefines>
<CDefines Condition="'$(FeatureImpersonation)' == 'true'">$(CDefines);FEATURE_IMPERSONATION</CDefines>
<CDefines Condition="'$(FeatureIncludeAllInterfaces)' == 'true'">$(CDefines);FEATURE_INCLUDE_ALL_INTERFACES</CDefines>
<CDefines Condition="'$(FeatureInteropDebugging)' == 'true'">$(CDefines);FEATURE_INTEROP_DEBUGGING</CDefines>
Expand Down Expand Up @@ -156,6 +157,7 @@
<DefineConstants Condition="'$(FeatureExceptionNotifications)' == 'true'">$(DefineConstants);FEATURE_EXCEPTION_NOTIFICATIONS</DefineConstants>
<DefineConstants Condition="'$(FeatureFusion)' == 'true'">$(DefineConstants);FEATURE_FUSION</DefineConstants>
<DefineConstants Condition="'$(FeatureHostAssemblyResolver)' == 'true'">$(DefineConstants);FEATURE_HOST_ASSEMBLY_RESOLVER</DefineConstants>
<DefineConstants Condition="'$(FeatureCollectibleALC)' == 'true'">$(DefineConstants);FEATURE_COLLECTIBLE_ALC</DefineConstants>
<DefineConstants Condition="'$(FeatureHosting)' == 'true'">$(DefineConstants);FEATURE_HOSTING</DefineConstants>
<DefineConstants Condition="'$(FeatureIdentityReference)' == 'true'">$(DefineConstants);FEATURE_IDENTITY_REFERENCE</DefineConstants>
<DefineConstants Condition="'$(FeatureImpersonation)' == 'true'">$(DefineConstants);FEATURE_IMPERSONATION</DefineConstants>
Expand Down
2 changes: 2 additions & 0 deletions compileoptions.cmake
Expand Up @@ -14,6 +14,8 @@ if (CLR_CMAKE_PLATFORM_UNIX)
if(CLR_CMAKE_PLATFORM_DARWIN)
# We cannot enable "stack-protector-strong" on OS X due to a bug in clang compiler (current version 7.0.2)
add_compile_options(-fstack-protector)
# Disable warning when overrides are not consistent (should remove this once the codebase is consistent with overrides)
add_compile_options(-Wno-inconsistent-missing-override)
else()
add_compile_options(-fstack-protector-strong)
endif(CLR_CMAKE_PLATFORM_DARWIN)
Expand Down
75 changes: 74 additions & 1 deletion src/binder/clrprivbinderassemblyloadcontext.cpp
Expand Up @@ -203,6 +203,17 @@ HRESULT CLRPrivBinderAssemblyLoadContext::FindAssemblyBySpec(
return E_FAIL;
}

#ifdef FEATURE_COLLECTIBLE_ALC

HRESULT CLRPrivBinderAssemblyLoadContext::GetLoaderAllocator(LoaderAllocator **pLoaderAllocator)
{
_ASSERTE(pLoaderAllocator != NULL);
*pLoaderAllocator = m_pAssemblyLoaderAllocator;
return S_OK;
}

#endif // FEATURE_COLLECTIBLE_ALC

//=============================================================================
// Creates an instance of the AssemblyLoadContext Binder
//
Expand All @@ -212,9 +223,17 @@ HRESULT CLRPrivBinderAssemblyLoadContext::FindAssemblyBySpec(
/* static */
HRESULT CLRPrivBinderAssemblyLoadContext::SetupContext(DWORD dwAppDomainId,
CLRPrivBinderCoreCLR *pTPABinder,
UINT_PTR ptrAssemblyLoadContext,
#ifdef FEATURE_COLLECTIBLE_ALC
LoaderAllocator* pLoaderAllocator,
void* loaderAllocatorHandle,
#endif
UINT_PTR ptrAssemblyLoadContext,
CLRPrivBinderAssemblyLoadContext **ppBindContext)
{
#ifdef FEATURE_COLLECTIBLE_ALC
_ASSERTE(pLoaderAllocator != NULL);
#endif

HRESULT hr = E_FAIL;
EX_TRY
{
Expand All @@ -240,6 +259,16 @@ HRESULT CLRPrivBinderAssemblyLoadContext::SetupContext(DWORD dwAppDomainId,
// AssemblyLoadContext instance
pBinder->m_ptrManagedAssemblyLoadContext = ptrAssemblyLoadContext;

#ifdef FEATURE_COLLECTIBLE_ALC
// Link to LoaderAllocator, keep a reference to it
VERIFY(pLoaderAllocator->AddReferenceIfAlive());
pBinder->m_pAssemblyLoaderAllocator = pLoaderAllocator;
pBinder->m_loaderAllocatorHandle = loaderAllocatorHandle;

#if !defined(DACCESS_COMPILE) && !defined(CROSSGEN_COMPILE)
((AssemblyLoaderAllocator*)pLoaderAllocator)->RegisterBinder(pBinder);
#endif
#endif // FEATURE_COLLECTIBLE_ALC
// Return reference to the allocated Binder instance
*ppBindContext = clr::SafeAddRef(pBinder.Extract());
}
Expand All @@ -251,9 +280,53 @@ HRESULT CLRPrivBinderAssemblyLoadContext::SetupContext(DWORD dwAppDomainId,
return hr;
}

#ifdef FEATURE_COLLECTIBLE_ALC
void CLRPrivBinderAssemblyLoadContext::PrepareForLoadContextRelease(INT_PTR ptrManagedStrongAssemblyLoadContext)
{
CONTRACTL
{
GC_NOTRIGGER;
THROWS;
MODE_COOPERATIVE;
SO_TOLERANT;
}
CONTRACTL_END;

// Replace the weak handle with a strong handle
// in order to be able to callback the managed method AssemblyLoadContext.Unloading safely
OBJECTHANDLE handle = reinterpret_cast<OBJECTHANDLE>(m_ptrManagedAssemblyLoadContext);
OBJECTHANDLE strongHandle = reinterpret_cast<OBJECTHANDLE>(ptrManagedStrongAssemblyLoadContext);
DestroyShortWeakHandle(handle);
m_ptrManagedAssemblyLoadContext = reinterpret_cast<INT_PTR>(strongHandle);

// We cannot delete the binder here as it is used indirectly when comparing assemblies with the same binder
// It will be deleted when the LoaderAllocator will be deleted
// But we can release the LoaderAllocator as we are no longer using it here
m_pAssemblyLoaderAllocator->Release();
m_pAssemblyLoaderAllocator = NULL;

// Destroy the strong handle to the LoaderAllocator in order to let it reach its finalizer
DestroyHandle(reinterpret_cast<OBJECTHANDLE>(m_loaderAllocatorHandle));
m_loaderAllocatorHandle = NULL;
}
#endif // FEATURE_COLLECTIBLE_ALC

CLRPrivBinderAssemblyLoadContext::CLRPrivBinderAssemblyLoadContext()
{
m_pTPABinder = NULL;
}

#ifdef FEATURE_COLLECTIBLE_ALC
void CLRPrivBinderAssemblyLoadContext::ReleaseLoadContext()
{
VERIFY(m_ptrManagedAssemblyLoadContext != NULL);

// This method is called to release the strong handle on the managed AssemblyLoadContext
// once the Unloading event has been fired
OBJECTHANDLE handle = reinterpret_cast<OBJECTHANDLE>(m_ptrManagedAssemblyLoadContext);
DestroyHandle(handle);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DestroyContext implementation (earlier) assumes that m_ptrManagedAssemblyLoadContext is a weak handle while this one does not? How is this consistency being maintained (or what are invariants here)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, DestroyContext switched m_ptrManagedAssemblyLoadContext from a weak to a strong handle.
This method is called later by AssemblyLoaderAllocator::OnUnloading to actually let the managed AssemblyLoadContext to be finalized (if necessary).

Maybe we should rename these methods DestroyContext and ReleaseManagedAssemblyLoadContext to better reflect their actual behavior

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree - the naming update, and comments, would be helpful here. I would suggest DestroyContext to be something like PrepareForLoadContextRelease and ReleaseManagedAssemblyLoadContext to be ReleaseLoadContext (so that, in future, additional cleanup can be added that is not related to managed instance).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partially fixed by commit 0cc6d4d (comments may have to be improved)

m_ptrManagedAssemblyLoadContext = NULL;
}
#endif // FEATURE_COLLECTIBLE_ALC

#endif // defined(FEATURE_HOST_ASSEMBLY_RESOLVER) && !defined(DACCESS_COMPILE) && !defined(CROSSGEN_COMPILE)
10 changes: 5 additions & 5 deletions src/binder/inc/assembly.hpp
Expand Up @@ -139,6 +139,11 @@ namespace BINDER_SPACE
static PEKIND GetSystemArchitecture();
static BOOL IsValidArchitecture(PEKIND kArchitecture);

inline ICLRPrivBinder* GetBinder()
{
return m_pBinder;
}

#ifndef CROSSGEN_COMPILE
protected:
#endif
Expand Down Expand Up @@ -197,11 +202,6 @@ namespace BINDER_SPACE
_ASSERTE(m_pBinder == NULL || m_pBinder == pBinder);
m_pBinder = pBinder;
}

inline ICLRPrivBinder* GetBinder()
{
return m_pBinder;
}

#if !defined(FEATURE_FUSION)
friend class ::CLRPrivBinderCoreCLR;
Expand Down
56 changes: 52 additions & 4 deletions src/binder/inc/clrprivbinderassemblyloadcontext.h
Expand Up @@ -17,7 +17,29 @@ namespace BINDER_SPACE
class AssemblyIdentityUTF8;
};

class CLRPrivBinderAssemblyLoadContext : public IUnknownCommon<ICLRPrivBinder>
class AppDomain;

#ifdef FEATURE_COLLECTIBLE_ALC

class Object;
class Assembly;
class LoaderAllocator;

class DECLSPEC_UUID("68220E65-3D3F-42E2-BAD6-2D07419DAB5E") ICollectibleAssemblyLoadContext : public IUnknown
{
public:
STDMETHOD(GetLoaderAllocator)(
/* [retval][out] */ LoaderAllocator** pLoaderAllocator) = 0;
};

#endif // FEATURE_COLLECTIBLE_ALC

class CLRPrivBinderAssemblyLoadContext :
#ifndef FEATURE_COLLECTIBLE_ALC
public IUnknownCommon<ICLRPrivBinder>
#else // !FEATURE_COLLECTIBLE_ALC
public IUnknownCommon<ICLRPrivBinder, ICollectibleAssemblyLoadContext>
#endif // FEATURE_COLLECTIBLE_ALC
{
public:

Expand Down Expand Up @@ -45,14 +67,35 @@ class CLRPrivBinderAssemblyLoadContext : public IUnknownCommon<ICLRPrivBinder>
/* [out] */ HRESULT *pResult,
/* [out] */ ICLRPrivAssembly **ppAssembly);

#ifdef FEATURE_COLLECTIBLE_ALC

//=========================================================================
// IAssemblyLoadContext functions
//-------------------------------------------------------------------------
STDMETHOD(GetLoaderAllocator)(
/* [retval][out] */ LoaderAllocator** pLoaderAllocator);

#endif // FEATURE_COLLECTIBLE_ALC

public:
//=========================================================================
// Class functions
//-------------------------------------------------------------------------

static HRESULT SetupContext(DWORD dwAppDomainId, CLRPrivBinderCoreCLR *pTPABinder,
UINT_PTR ptrAssemblyLoadContext, CLRPrivBinderAssemblyLoadContext **ppBindContext);

static HRESULT SetupContext(DWORD dwAppDomainId,
CLRPrivBinderCoreCLR *pTPABinder,
#ifdef FEATURE_COLLECTIBLE_ALC
LoaderAllocator* pLoaderAllocator,
void* loaderAllocatorHandle,
#endif
UINT_PTR ptrAssemblyLoadContext,
CLRPrivBinderAssemblyLoadContext **ppBindContext);

#ifdef FEATURE_COLLECTIBLE_ALC
void PrepareForLoadContextRelease(INT_PTR ptrManagedStrongAssemblyLoadContext);
void ReleaseLoadContext();
#endif

CLRPrivBinderAssemblyLoadContext();

inline BINDER_SPACE::ApplicationContext *GetAppContext()
Expand Down Expand Up @@ -80,6 +123,11 @@ class CLRPrivBinderAssemblyLoadContext : public IUnknownCommon<ICLRPrivBinder>
CLRPrivBinderCoreCLR *m_pTPABinder;

INT_PTR m_ptrManagedAssemblyLoadContext;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldnt these fields be under #ifdef FEATURE_COLLECTIBLE_ALC?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm actually maybe no, the field is used indirectly through GetManagedAssemblyLoadContext() which was already there before collectible ALC.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was referring to the loadAllocator fields below :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Errata, fixed by commit c3dfee1

#ifdef FEATURE_COLLECTIBLE_ALC
LoaderAllocator* m_pAssemblyLoaderAllocator;
void* m_loaderAllocatorHandle;
#endif
};

#endif // defined(FEATURE_HOST_ASSEMBLY_RESOLVER) && !defined(DACCESS_COMPILE) && !defined(CROSSGEN_COMPILE)
Expand Down
7 changes: 7 additions & 0 deletions src/mscorlib/model.xml
Expand Up @@ -1051,6 +1051,9 @@
</Type>
<Type Name="System.Runtime.Loader.AssemblyLoadContext" condition="FEATURE_HOST_ASSEMBLY_RESOLVER">
<Member Name="#ctor" />
<Member Name="#ctor(System.Boolean)" Condition="FEATURE_COLLECTIBLE_ALC"/>
Copy link
Member

@kouvel kouvel Jan 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New public APIs can't be conditioned here either since System.Runtime.Loader type-forwards AssemblyLoadContext to System.Private.CoreLib. Also, you shouldn't need anything here that would not be in the contract for System.Runtime.Loader, so all the private/internal stuff can be omitted.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit 63993c5 should fix this.

<Member Name="Finalize" Condition="FEATURE_COLLECTIBLE_ALC"/>
<Member MemberType="Property" Name="IsCollectible" Condition="FEATURE_COLLECTIBLE_ALC"/>
<Member MemberType="Property" Name="Default" />
<Member Name="GetAssemblyName(System.String)" />
<Member Name="GetLoadContext(System.Reflection.Assembly)" />
Expand All @@ -1063,8 +1066,12 @@
<Member Name="Resolve(System.IntPtr,System.Reflection.AssemblyName)" />
<Member Name="ResolveUsingResolvingEvent(System.IntPtr,System.Reflection.AssemblyName)" />
<Member Name="ResolveUnmanagedDll(System.String,System.IntPtr)" />
<Member Name="OnUnloadingStatic(System.IntPtr)" Condition="FEATURE_COLLECTIBLE_ALC"/>
<Member Name="OnUnloading" />
<Member Name="LoadUnmanagedDll(System.String)" />
<Member Name="LoadUnmanagedDllFromPath(System.String)" />
<Member Name="Unload" Condition="FEATURE_COLLECTIBLE_ALC"/>
<Member Name="UnloadCollectible" Condition="FEATURE_COLLECTIBLE_ALC"/>
<Member Name="GetLoadedAssemblies" />
<Member Name="get_Default" />
<Member Name="SetProfileOptimizationRoot(System.String)" />
Expand Down
6 changes: 6 additions & 0 deletions src/mscorlib/src/System.Private.CoreLib.txt
Expand Up @@ -2011,6 +2011,12 @@ AppDomain_AppBaseNotSet = The ApplicationBase must be set before retrieving this
#if FEATURE_HOST_ASSEMBLY_RESOLVER
AppDomain_BindingModelIsLocked = Binding model is already locked for the AppDomain and cannot be reset.
Argument_CustomAssemblyLoadContextRequestedNameMismatch = Resolved assembly's simple name should be the same as of the requested assembly.
AssemblyLoadContext_Constructor_CannotInstantiateWhileUnloading = Cannot instantiate an AssemblyLoadContext while the AppContext is unloading
#if FEATURE_COLLECTIBLE_ALC
AssemblyLoadContext_Unload_CannotUnloadIfNotCollectible = Cannot Unload a non collectible AssemblyLoadContext
AssemblyLoadContext_Unload_AlreadyUnloaded = This instance is already being unloaded
AssemblyLoadContext_Verify_NotUnloading = This instance is being unloaded and LoadFromXXX methods can no longer be used
#endif
#endif // FEATURE_HOST_ASSEMBLY_RESOLVER
;
; XMLSyntaxExceptions
Expand Down