DapperLib / DapperAOT

Build time tools in the flavor of Dapper
Other
357 stars 19 forks source link

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

Closed sonnemaf closed 10 months ago

sonnemaf commented 10 months ago

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

mgravell commented 10 months ago

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.

mgravell commented 10 months ago

Fixed in current