.NET SDK 6 Preview 7 generated file `ImplicitNamespaceImports.cs` contains error CS8773
See original GitHub issueGood morning,
I just tracked down a CI failure to a .NET SDK update. With dotnet v6.0.100-preview.7.21379.14
our whole build is failing with the repeated error:
...obj\Debug\net6.0\PowerShellEditorServices.Test.ImplicitNamespaceImports.cs(2,1):
error CS8773: Feature 'global using directive' is not available in C# 9.0. Please use language version 10.0 or greater.
This error did not show up last night, with the same build on the same code, but using dotnet v6.0.100-preview.6.21355.2
. The big difference seeming to be Preview 6 to Preview 7.
I looked at #19446, but we do not (as far as I can find) use any <Import Include=...>
statements in any of our .csproj
files.
We are explicitly using language version 9.0, so I will update us to 10.0 to work around this, but it seems like there may be an underlying and unintended change between the two previews?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (7 by maintainers)
Top Results From Across the Web
ImplicitNamespaceImports generated codefile ...
andschwa mentioned this issue on Aug 12, 2021 .NET SDK 6 Preview 7 generated file ImplicitNamespaceImports.cs contains error CS8773 #19702.
Read more >NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >Where are the using statements/directives in .NET 6
I just created a brand new .NET 6 web app and as I hover over the WebApplication class, I realized it stays in...
Read more >Untitled
.net 6 global using Web15 ian. 2022 · GlobalUsings.g.cs (2,1,2,29): error CS8773: Feature 'global using directive' is not available in C# 9.0.
Read more >Implicit Using Statements In .NET 6 - NET Core Tutorials
With Implicit Using statements, your code will have almost invisible using ... NET 6 is in preview, and is not currently available in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’ll be fixed in rc1 builds. For now you can disable the feature.
More information on the latest changes https://github.com/dotnet/sdk/issues/19521