Open japsuu opened 1 month ago
Created a minimal repro example: https://github.com/japsuu/MrAdvice-minimal-repro-211
Thank you for the detailed report. I need to check, but this looks like a problem from dnlib (the library we use to modify assemblies).
Yes, that was what I was thinking about too. When searching their repo with the exception I'm getting, only a single issue is found. It seems to partly relate to the issue I'm having: https://github.com/0xd4d/dnlib/issues/550
When building a solution with two projects (a console app and a class library), the build fails when the class library references MrAdvice version="2.16.0" and implements the following basic attribute:
ExampleAttribute.cs
inClassLibrary
:The console application project references the class library, and contains only the following code:
Program.cs
inConsoleApplication
:Fix 1
If the
const
field is removed from the ExampleAttribute, the build succeeds.Fix 2
Move the ExampleAttribute class from the class library to the console application project, and the build succeeds.
Additional Info
Target framework: .NET 8.0 on both projects
Full build log:
Possibly related: #201 and #140