Skip to content

Reference type in public field causes TypeLoadException for Com Interop #47849

@BickelLukas

Description

@BickelLukas

Description

I am using a VB6 Library through COM Interop.
Everything works fine until the class contains a reference type as a public field.
This causes the program to throw a System.TypeLoadException: 'The Signature is incorrect' as soon it is launched.

VB6 Code:

Public Settings As clsSettings

as soon as the class containing that line gets used within the project it crashes.

Configuration

.NET Version: 5.0.102
OS: Windows 10 19042.746
Architecture: x64 (but app is built for x86 for Com interop)

Regression?

The same library can be used from .NET Framework without a Problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions