DapperLib/DapperAOT

CS9206 'An interceptor cannot be declared in the global namespace' compiler error after upgrading to .NET 8 RC2

sonnemaf opened this issue · 2 comments

Describe the bug

Code which ran perfectly with RC1 of .NET 8 does not compile any more. Getting CS9206 'An interceptor cannot be declared in the global namespace' compiler errors.

To Reproduce
Download the repository and compile the UsageLinker and UsageBenchmark projects. They don't build with RC2

Expected behavior
No error, worked fine with RC1

Screenshots
image

Additional context
Using Visual Studio 2022 Version 17.8.0 Preview 4.0

Yes, I need to update the deployed bits to reflect the most recent rules changes. We know all about this, though - just a timing thing; hard to coordinate when different net8 previews have radically different rules for what generators need to be allowed.

Fixed in current