diff options
author | Koundinya Veluri <kouvel@microsoft.com> | 2015-11-10 10:35:30 -0800 |
---|---|---|
committer | Koundinya Veluri <kouvel@microsoft.com> | 2015-11-11 11:43:28 -0800 |
commit | 6a617fbd6296352fa1041bdf5efe02da1a41b9a7 (patch) | |
tree | 78a8b5a79f085abc1548667221ff252bb20c639a /src/binder/inc | |
parent | 077d5cb53bf9c0339cca6e2dc64e1d523987098d (diff) | |
download | coreclr-6a617fbd6296352fa1041bdf5efe02da1a41b9a7.tar.gz coreclr-6a617fbd6296352fa1041bdf5efe02da1a41b9a7.tar.bz2 coreclr-6a617fbd6296352fa1041bdf5efe02da1a41b9a7.zip |
Fix a couple of issues involving assembly loading
Fixes #1740
- After an assembly is loaded through a custom load context, when its dependencies are being loaded and the dependencies are in an app folder but not on the TPA list, don't search app paths when using the TPA binder, and instead use the default binder for the dependent assembly to load dependencies through the same custom AssemblyLoadContext.
Fixes #1187
- In the AssemblyName created by AssemblyLoadContext.GetAssemblyName(), don't initialize the CodeBase property since it's not in the exposed surface area for .NET Core. If the AssemblyName is passed to Assembly.Load(), note that regardless of the path sent to GetAssemblyName(), default search orders are still used to load the assembly by name. A custom AssemblyLoadContext would need to be used to control where an assembly is loaded from.
- Fixed a couple of error messages that mentioned phone
Diffstat (limited to 'src/binder/inc')
-rw-r--r-- | src/binder/inc/assemblybinder.hpp | 6 | ||||
-rw-r--r-- | src/binder/inc/clrprivbindercoreclr.h | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/binder/inc/assemblybinder.hpp b/src/binder/inc/assemblybinder.hpp index 81d42964ca..4ca0c4f18c 100644 --- a/src/binder/inc/assemblybinder.hpp +++ b/src/binder/inc/assemblybinder.hpp @@ -47,6 +47,7 @@ namespace BINDER_SPACE /* in */ PEAssembly *pParentAssembly, /* in */ BOOL fNgenExplicitBind, /* in */ BOOL fExplicitBindToNativeImage, + /* in */ bool excludeAppPaths, /* out */ Assembly **ppAssembly); static HRESULT BindToSystem(/* in */ SString &systemDirectory, @@ -128,6 +129,7 @@ namespace BINDER_SPACE static HRESULT BindByName(/* in */ ApplicationContext *pApplicationContext, /* in */ AssemblyName *pAssemblyName, /* in */ DWORD dwBindFlags, + /* in */ bool excludeAppPaths, /* out */ BindResult *pBindResult); // See code:BINDER_SPACE::AssemblyBinder::GetAssembly for info on fNgenExplicitBind @@ -137,14 +139,17 @@ namespace BINDER_SPACE /* in */ PathString &assemblyPath, /* in */ BOOL fNgenExplicitBind, /* in */ BOOL fExplicitBindToNativeImage, + /* in */ bool excludeAppPaths, /* out */ BindResult *pBindResult); static HRESULT BindLocked(/* in */ ApplicationContext *pApplicationContext, /* in */ AssemblyName *pAssemblyName, /* in */ DWORD dwBindFlags, + /* in */ bool excludeAppPaths, /* out */ BindResult *pBindResult); static HRESULT BindLockedOrService(/* in */ ApplicationContext *pApplicationContext, /* in */ AssemblyName *pAssemblyName, + /* in */ bool excludeAppPaths, /* out */ BindResult *pBindResult); static HRESULT FindInExecutionContext(/* in */ ApplicationContext *pApplicationContext, @@ -154,6 +159,7 @@ namespace BINDER_SPACE static HRESULT BindByTpaList(/* in */ ApplicationContext *pApplicationContext, /* in */ AssemblyName *pRequestedAssemblyName, /* in */ BOOL fInspectionOnly, + /* in */ bool excludeAppPaths, /* out */ BindResult *pBindResult); static HRESULT Register(/* in */ ApplicationContext *pApplicationContext, diff --git a/src/binder/inc/clrprivbindercoreclr.h b/src/binder/inc/clrprivbindercoreclr.h index 2aa1283448..38e43f706c 100644 --- a/src/binder/inc/clrprivbindercoreclr.h +++ b/src/binder/inc/clrprivbindercoreclr.h @@ -70,7 +70,8 @@ public: HRESULT BindAssemblyByNameWorker( BINDER_SPACE::AssemblyName *pAssemblyName, - BINDER_SPACE::Assembly **ppCoreCLRFoundAssembly); + BINDER_SPACE::Assembly **ppCoreCLRFoundAssembly, + bool excludeAppPaths); //========================================================================= // Internal implementation details |