Skip to content

.Net 8.0 fails to resolve method in embedded DLL #83753

Open
@MandiMan

Description

@MandiMan

.NET version

.NET SDK 8.0.100-preview.3.23165.21

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

No

Issue description

A .Net8.0 project failing with “System.MissingMethodException: 'Method not found” trying to access a DLL that is included as an embedded resource in a 3rd DLL.

Steps to reproduce

Repro Steps:

  1. Unzip and copy the files in Common.zip to VSError.zip
  2. Then build and run attached project “VSError”
  3. Click "button1" to have a pop-up box pop-up, then click the “OK” of the pop-up box

Actual result:
project failing with “System.MissingMethodException: 'Method not found” trying to access a DLL
image

Expected result:
Run successfully without error shows.

More info:

  1. Feedback source:https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1775813
  2. This issue does not repro on .NET Framework.
  3. This issue repro in .NET 8.0, .NET 7.0, .NET 6.0.
  4. “WinFormsApp1” is the .Net 6.0 project that has the issue (2nd MessageBox fails).
    “WindowsFormApp1” is the .Net Framework 4.7.2 program that works correctly.
    “ClassLibrary1” is the DLL with the embedded MySqlConnector that works in both programs
    “ClassLibrary2” is the DLL which inherits from Class1 and fails in .Net 6.0 (but works in Framwork 4.7.2)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions