Skip to content

System.InvalidCastException on "CustomAttributeWriteFailedException" #55

@Symbai

Description

@Symbai

Tried latest release .NET Framework version:

[Fail] [Program] Cpp2IL.Core.Exceptions.DllSaveException: Fatal Exception writing DLL F: \test\cpp2il_out\System.Xml.dll ---> 
Cpp2IL.Core .Exceptions.TypeWriteFailedException: Failed to write type System.Xml.Schema.XmlSchema due to an exception ---> 
Cpp2IL.Core.Exceptions.PropertyWriteFailedException: Failed to write property System.Xml.Schema.XmlSchemaForm System.Xml.Schema.XmlSchema :: AttributeFormDefault () due to an exception ---> 
Cpp2IL.Core.Exceptions.CustomAttributeWriteFailedException: Failed to write custom attribute System.ComponentModel.DefaultValueAttribute with arguments 0 of type System.Xml.Schema.XmlSchemaForm due to an exception --- > System.InvalidCastException: The specified cast is invalid.
   at Mono.Cecil.SignatureWriter.WriteCustomAttributeElement (TypeReference type, CustomAttributeArgument argument)
   for Mono.Cecil.SignatureWriter.WriteCustomAttributeConstructorArguments (CustomAttribute attribute)
   at DMD <Mono.Cecil.MetadataBuilder :: GetCustomAttributeSignature> (MetadataBuilder this, CustomAttribute attribute)
   --- End of internal exception stack monitoring ---
   at DMD <Mono.Cecil.MetadataBuilder :: GetCustomAttributeSignature> (MetadataBuilder this, CustomAttribute attribute)
   at Mono.Cecil.MetadataBuilder.AddCustomAttributes (ICustomAttributeProvider owner)
   at DMD <Mono.Cecil.MetadataBuilder :: AddProperty> (MetadataBuilder this, PropertyDefinition property)
   --- End of internal exception stack monitoring ---
   at DMD <Mono.Cecil.MetadataBuilder :: AddProperty> (MetadataBuilder this, PropertyDefinition property)
   at Mono.Cecil.MetadataBuilder.AddProperties (TypeDefinition type)
   at DMD <Mono.Cecil.MetadataBuilder :: AddType> (MetadataBuilder this, TypeDefinition type)
   --- End of internal exception stack monitoring ---
   at DMD <Mono.Cecil.MetadataBuilder :: AddType> (MetadataBuilder this, TypeDefinition type)
   at Mono.Cecil.MetadataBuilder.AddTypes ()
   at Mono.Cecil.MetadataBuilder.BuildTypes ()
   at Mono.Cecil.MetadataBuilder.BuildModule ()
   at Mono.Cecil.MetadataBuilder.BuildMetadata ()
   with Mono.Cecil.ModuleWriter.Write (ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
   with Mono.Cecil.ModuleWriter.WriteModule (ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
   at Cpp2IL.Core.Cpp2IlApi.SaveAssemblies (String toWhere, List`1 assemblies) in /home/runner/work/Cpp2IL/Cpp2IL/Cpp2IL.Core/Cpp2IlApi.cs:line 363.
   --- End of internal exception stack monitoring ---
   at Cpp2IL.Core.Cpp2IlApi.SaveAssemblies (String toWhere, List`1 assemblies) in /home/runner/work/Cpp2IL/Cpp2IL/Cpp2IL.Core/Cpp2IlApi.cs:line 367.
   at Cpp2IL.Program.MainWithArgs (Cpp2IlRuntimeArgs runtimeArgs) in /home/runner/work/Cpp2IL/Cpp2IL/Cpp2IL/Program.cs:line 290.
   at Cpp2IL.Program.Main (String [] args) in /home/runner/work/Cpp2IL/Cpp2IL/Cpp2IL/Program.cs:line 216.

Binary files can be found here: djkaty/Il2CppInspector#197

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions