Closed
Description
The MarshalingPInvokeScanner task doesn't see [DisableRuntimeMarshalling] attributes defined in any assembly except System.Runtime.dll (where the attribute is defined).
The problem is that this code:
does not take into account that the attribute's constructor will be a MethodReference when referencing a constructor defined in another assembly.
Repro:
- Clone https://github.com/rolfbjarne/marshalling-scanner (including submodules)
- Run
make disable-runtime-marshalling-attribute
This happens:
[...]
Assembly /Users/rolf/test/dotnet/marshalling-scanner/disable-runtime-marshalling-attribute/bin/Debug/net9.0/disable-runtime-marshalling-attribute.dll requires marshal-ilgen for method .Class1:DoSomething (first pass).
❌ Failed, because some assemblies are incompatible
make: *** [disable-runtime-marshalling-attribute] Error 1
Metadata
Metadata
Assignees
Type
Projects
Status
No status