Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"System.IO.FileLoadException", "System.IO.FileNotFoundException" & "System.TypeLoadException" #20906

Closed
KristinXie1 opened this issue Apr 5, 2017 · 6 comments
Assignees
Milestone

Comments

@KristinXie1
Copy link

In UWP F5 tests, lots of tests failed with "System.IO.FileLoadException : Could not load file or assembly XXX" or "System.IO.FileNotFoundException : Could not load file or assembly XXX" or "System.TypeLoadException : Could not load type XXX"

Examples:
System.IO.FileSystem.AccessControl.Tests
https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fuwp~2F/build/20170405.01/workItem/System.IO.FileSystem.AccessControl.Tests

@KristinXie1
Copy link
Author

Closed issue: dotnet/buildtools#1092

@KristinXie1
Copy link
Author

Following test failed with "System.IO.FileLoadException":
DataContractSerializerTests/DCS_BasicRoundtripDCRVerifyWireformatScenarios

Message:

System.IO.FileLoadException : Could not load file or assembly 'http:\\/\\/Microsoft.ServiceModel.Samples' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
    ---- System.IO.FileLoadException : The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Stack Trace:

at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName)
   at SerializationTestTypes.WireFormatVerificationResolver.ResolveName(String typeName, String typeNamespace, Type declaredType, DataContractResolver KTResolver) in E:\A\_work\82\s\corefx\src\System.Runtime.Serialization.Xml\tests\SerializationTestTypes\DataContractResolverLibrary.cs:line 165
   at System.Runtime.Serialization.XmlObjectSerializerContext.ResolveDataContractFromDataContractResolver(XmlQualifiedName typeName, Type declaredType)
   at System.Runtime.Serialization.XmlObjectSerializerContext.ResolveDataContractFromKnownTypes(String typeName, String typeNs, DataContract memberTypeContract, Type declaredType)
   at System.Runtime.Serialization.XmlObjectSerializerContext.IsKnownType(DataContract dataContract, Type declaredType)
   at System.Runtime.Serialization.XmlObjectSerializerContext.IsKnownType(DataContract dataContract, Dictionary`2 knownDataContracts, Type declaredType)
   at System.Runtime.Serialization.KnownTypeDataContractResolver.TryResolveType(Type type, Type declaredType, DataContractResolver knownTypeResolver, XmlDictionaryString& typeName, XmlDictionaryString& typeNamespace)
   at SerializationTestTypes.WireFormatVerificationResolver.TryResolveType(Type dcType, Type declaredType, DataContractResolver KTResolver, XmlDictionaryString& typeName, XmlDictionaryString& typeNamespace) in E:\A\_work\82\s\corefx\src\System.Runtime.Serialization.Xml\tests\SerializationTestTypes\DataContractResolverLibrary.cs:line 145
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.ResolveType(Type objectType, Type declaredType, XmlDictionaryString& typeName, XmlDictionaryString& typeNamespace)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteResolvedTypeInfo(XmlWriterDelegator writer, Type objectType, Type declaredType)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteTypeInfo(XmlWriterDelegator writer, DataContract contract, DataContract declaredContract)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiType(XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle objectTypeHandle, Type objectType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle, Type declaredType)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContextComplex.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
   at WriteCharlieToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract )
   at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContextComplex.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
   at WriteWireformat1ToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract )
   at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter writer, Object graph)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(Stream stream, Object graph)
   at DataContractSerializerTests.SerializeAndDeserialize[T](T value, String baseline, DataContractSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) in E:\A\_work\82\s\corefx\src\System.Runtime.Serialization.Xml\tests\DataContractSerializer.cs:line 2927
   at DataContractSerializerTests.DCS_BasicRoundtripDCRVerifyWireformatScenarios() in E:\A\_work\82\s\corefx\src\System.Runtime.Serialization.Xml\tests\DataContractSerializer.cs:line 2897
----- Inner Stack Trace -----
   at System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)
   at System.Reflection.AssemblyName..ctor(String assemblyName)
   at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

Detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fdesktop~2Fcli~2F/build/20170426.01/workItem/System.Runtime.Serialization.Xml.ReflectionOnly.Tests/analysis/xunit/DataContractSerializerTests~2FDCS_BasicRoundtripDCRVerifyWireformatScenarios

@KristinXie1
Copy link
Author

@tijoytom-zz
Copy link
Contributor

@JiayiLi1 Can please break this down to multiple issues , now it says the exception is from different test execution. Right now i am not sure if this comes from Serialization test or not?

@danmoseley
Copy link
Member

Can't make much of this. We need new issues if any remain.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the UWP6.0 milestone Jan 31, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants