Assembly * pAssembly;
HRESULT hrProcessLibraryBitnessMismatch = S_OK;
- bool verifyingImageIsAssembly = false;
// We don't want to do a LoadFrom, since they do not work with ngen. Instead,
// read the metadata from the file and do a bind based on that.
fExplicitBindToNativeImage ? MDInternalImport_NoCache : MDInternalImport_Default);
}
-#if defined(FEATURE_WINDOWSPHONE)
- verifyingImageIsAssembly = true;
-#endif // FEATURE_WINDOWSPHONE
if (fExplicitBindToNativeImage && !pImage->HasReadyToRunHeader())
{
pImage->VerifyIsNIAssembly();
{
pImage->VerifyIsAssembly();
}
-
- verifyingImageIsAssembly = false;
// Check to make sure the bitness of the assembly matches the bitness of the process
// we will be loading it into and store the result. If a COR_IMAGE_ERROR gets thrown
}
EX_CATCH_HRESULT(hr);
- if (verifyingImageIsAssembly && hr != S_OK)
- {
- hr = NGEN_E_FILE_NOT_ASSEMBLY;
- }
- else if ( hrProcessLibraryBitnessMismatch != S_OK && ( hr == COR_E_BADIMAGEFORMAT || hr == HRESULT_FROM_WIN32(ERROR_BAD_EXE_FORMAT) ) )
+ if ( hrProcessLibraryBitnessMismatch != S_OK && ( hr == COR_E_BADIMAGEFORMAT || hr == HRESULT_FROM_WIN32(ERROR_BAD_EXE_FORMAT) ) )
{
hr = hrProcessLibraryBitnessMismatch;
}