FUSION_E_REF_DEF_MISMATCH "The located assembly's manifest definition with name '%1' does not match the assembly reference."
FUSION_E_PRIVATE_ASM_DISALLOWED "Assembly '%1' is required to be strongly named."
FUSION_E_INVALID_NAME "The given assembly name, '%1', was invalid."
- FUSION_E_CACHEFILE_FAILED "Failed to add file to AppDomain cache."
FUSION_E_APP_DOMAIN_LOCKED "The requested assembly version conflicts with what is already bound in the app domain or specified in the manifest."
IDS_EE_HASH_VAL_FAILED "Hash validation failed for file or assembly '%1'."
CORSEC_E_INVALID_PUBLICKEY "The public key for assembly '%1' was invalid."
<Comment> The given assembly name was invalid. </Comment>
</HRESULT>
-<HRESULT NumericValue="0x80131052">
- <SymbolicName>FUSION_E_CACHEFILE_FAILED</SymbolicName>
- <Message>"Failed to add file to AppDomain cache."</Message>
- <Comment> Failed to add file to AppDomain cache </Comment>
-</HRESULT>
-
<HRESULT NumericValue="0x80131053">
<SymbolicName>FUSION_E_APP_DOMAIN_LOCKED</SymbolicName>
<Message>"The requested assembly version conflicts with what is already bound in the app domain or specified in the manifest."</Message>
MSG_FOR_URT_HR(FUSION_E_REF_DEF_MISMATCH) "The located assembly's manifest definition does not match the assembly reference."
MSG_FOR_URT_HR(FUSION_E_PRIVATE_ASM_DISALLOWED) "A strongly-named assembly is required."
MSG_FOR_URT_HR(FUSION_E_INVALID_NAME) "The given assembly name was invalid."
- MSG_FOR_URT_HR(FUSION_E_CACHEFILE_FAILED) "Failed to add file to AppDomain cache."
MSG_FOR_URT_HR(FUSION_E_APP_DOMAIN_LOCKED) "The requested assembly version conflicts with what is already bound in the app domain or specified in the manifest."
MSG_FOR_URT_HR(COR_E_LOADING_REFERENCE_ASSEMBLY) "Reference assemblies cannot be loaded for execution."
MSG_FOR_URT_HR(COR_E_AMBIGUOUSIMPLEMENTATION) "Ambiguous implementation found."
#define FUSION_E_REF_DEF_MISMATCH EMAKEHR(0x1040)
#define FUSION_E_PRIVATE_ASM_DISALLOWED EMAKEHR(0x1044)
#define FUSION_E_INVALID_NAME EMAKEHR(0x1047)
-#define FUSION_E_CACHEFILE_FAILED EMAKEHR(0x1052)
#define FUSION_E_APP_DOMAIN_LOCKED EMAKEHR(0x1053)
#define COR_E_LOADING_REFERENCE_ASSEMBLY EMAKEHR(0x1058)
#define COR_E_AMBIGUOUSIMPLEMENTATION EMAKEHR(0x106a)
CASE_HRESULT(COR_E_APPDOMAINUNLOADED)
CASE_HRESULT(COR_E_CANNOTUNLOADAPPDOMAIN)
CASE_HRESULT(MSEE_E_ASSEMBLYLOADINPROGRESS)
- CASE_HRESULT(FUSION_E_CACHEFILE_FAILED)
CASE_HRESULT(FUSION_E_REF_DEF_MISMATCH)
CASE_HRESULT(FUSION_E_PRIVATE_ASM_DISALLOWED)
CASE_HRESULT(FUSION_E_INVALID_NAME)
#ifndef DACCESS_COMPILE
-BOOL AppDomain::AddFileToCache(AssemblySpec* pSpec, PEAssembly * pPEAssembly, BOOL fAllowFailure)
+BOOL AppDomain::AddFileToCache(AssemblySpec* pSpec, PEAssembly * pPEAssembly)
{
CONTRACTL
{
}
CONTRACTL_END;
- {
- GCX_PREEMP();
- DomainCacheCrstHolderForGCCoop holder(this);
-
- // !!! suppress exceptions
- if(!m_AssemblyCache.StorePEAssembly(pSpec, pPEAssembly) && !fAllowFailure)
- {
- // TODO: Disabling the below assertion as currently we experience
- // inconsistency on resolving the Microsoft.Office.Interop.MSProject.dll
- // This causes below assertion to fire and crashes the VS. This issue
- // is being tracked with Dev10 Bug 658555. Brought back it when this bug
- // is fixed.
- // _ASSERTE(FALSE);
-
- EEFileLoadException::Throw(pSpec, FUSION_E_CACHEFILE_FAILED, NULL);
- }
- }
+ GCX_PREEMP();
+ DomainCacheCrstHolderForGCCoop holder(this);
- return TRUE;
+ return m_AssemblyCache.StorePEAssembly(pSpec, pPEAssembly);
}
BOOL AppDomain::AddAssemblyToCache(AssemblySpec* pSpec, DomainAssembly *pAssembly)
// The binder does a re-fetch of the
// original binding spec and therefore will not cause inconsistency here.
// For the purposes of the resolve event, failure to add to the cache still is a success.
- AddFileToCache(pPrePolicySpec, result, TRUE /* fAllowFailure */);
+ AddFileToCache(pPrePolicySpec, result);
if (*ppFailedSpec != pPrePolicySpec)
{
- AddFileToCache(pPostPolicySpec, result, TRUE /* fAllowFailure */ );
+ AddFileToCache(pPostPolicySpec, result);
}
}
}
// Failure to add simply means someone else beat us to it. In that case
// the FindCachedFile call below (after catch block) will update result
// to the cached value.
- AddFileToCache(pSpec, result, TRUE /*fAllowFailure*/);
+ AddFileToCache(pSpec, result);
}
else
{
BOOL IsCached(AssemblySpec *pSpec);
#endif // DACCESS_COMPILE
- BOOL AddFileToCache(AssemblySpec* pSpec, PEAssembly *pPEAssembly, BOOL fAllowFailure = FALSE);
+ BOOL AddFileToCache(AssemblySpec* pSpec, PEAssembly *pPEAssembly);
BOOL RemoveFileFromCache(PEAssembly *pPEAssembly);
BOOL AddAssemblyToCache(AssemblySpec* pSpec, DomainAssembly *pAssembly);
#include "../binder/inc/assemblybindercommon.hpp"
#include "../binder/inc/applicationcontext.hpp"
-static VOID ThrowLoadError(AssemblySpec * pSpec, HRESULT hr)
-{
- CONTRACTL
- {
- THROWS;
- MODE_ANY;
- GC_TRIGGERS;
- }
- CONTRACTL_END;
-
- StackSString name;
- pSpec->GetDisplayName(0, name);
- EEFileLoadException::Throw(name, hr);
-}
-
HRESULT AssemblySpec::Bind(AppDomain *pAppDomain, BINDER_SPACE::Assembly** ppAssembly)
{
CONTRACTL
#endif // _DEBUG
}
-void DECLSPEC_NORETURN PEImage::ThrowFormat(HRESULT hrError)
-{
- CONTRACTL
- {
- GC_TRIGGERS;
- THROWS;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- EEFileLoadException::Throw(m_path, hrError);
-}
-
-
//may outlive PEImage
PEImage::IJWFixupData::IJWFixupData(void *pBase)
: m_lock(CrstIJWFixupData),
static BOOL CompareImage(UPTR image1, UPTR image2);
static BOOL CompareIJWDataBase(UPTR base, UPTR mapping);
- void DECLSPEC_NORETURN ThrowFormat(HRESULT hr);
-
public:
class IJWFixupData
{
DEFINE_EXCEPTION(g_IONS, FileLoadException, true,
COR_E_FILELOAD,
- FUSION_E_CACHEFILE_FAILED,
FUSION_E_INVALID_NAME,
FUSION_E_PRIVATE_ASM_DISALLOWED,
FUSION_E_REF_DEF_MISMATCH,
internal const int STG_E_PATHNOTFOUND = unchecked((int)0x80030003);
internal const int CTL_E_PATHNOTFOUND = unchecked((int)0x800A004C);
internal const int CTL_E_FILENOTFOUND = unchecked((int)0x800A0035);
- internal const int FUSION_E_CACHEFILE_FAILED = unchecked((int)0x80131052);
internal const int FUSION_E_INVALID_NAME = unchecked((int)0x80131047);
internal const int FUSION_E_PRIVATE_ASM_DISALLOWED = unchecked((int)0x80131044);
internal const int FUSION_E_REF_DEF_MISMATCH = unchecked((int)0x80131040);
HResult = errorCode
};
}
- case HResults.FUSION_E_CACHEFILE_FAILED:
case HResults.FUSION_E_INVALID_NAME:
case HResults.FUSION_E_PRIVATE_ASM_DISALLOWED:
case HResults.FUSION_E_REF_DEF_MISMATCH:
public const int COR_E_EXCEPTION = unchecked((int)0x80131500);
public const int COR_E_FILELOAD = unchecked((int)0x80131621);
- public const int FUSION_E_CACHEFILE_FAILED = unchecked((int)0x80131052);
public const int FUSION_E_INVALID_NAME = unchecked((int)0x80131047);
public const int FUSION_E_PRIVATE_ASM_DISALLOWED = unchecked((int)0x80131044);
public const int FUSION_E_REF_DEF_MISMATCH = unchecked((int)0x80131040);
{
[Theory]
[InlineData(HResults.COR_E_FILELOAD)]
- [InlineData(HResults.FUSION_E_CACHEFILE_FAILED)]
[InlineData(HResults.FUSION_E_INVALID_NAME)]
[InlineData(HResults.FUSION_E_PRIVATE_ASM_DISALLOWED)]
[InlineData(HResults.FUSION_E_REF_DEF_MISMATCH)]