-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CS0246 build errors on .NET 6.0.300 SDK #24
Comments
I also find it interesting that it only occurs with |
I just tried using this and IsExternalInit instead of importing the cs files myself and have the same problem. For me it works with neither SDK 6.0.100 nor 6.0.202 nor 6.0.300. Occasionally the CLI build will work, but VS 2022 is never able to build. |
Hey, I unfortunately had nowhere near enough time yet to thoroughly look into this, but I could also reproduce the error. The issue I'm having is that, from my point of view, the package itself is sound, i.e. the nuspec which is used to inject the files is, unless I'm missing something, looking the way it's supposed to. In any case, any help here investigating the issue is much appreciated ❤️! Maybe the issue is in this package/nuspec (in that case, any pointers as to what's wrong with the format will be very helpful). Or if you guys also believe that the issue is located on the outside, you might know where to raise an issue. |
I agree, it's most likely something in the tooling. Once we figure out what that is, most likely the best repo to report it to Microsoft on would be here https://github.com/dotnet/sdk |
Experimenting a bit. Turns out that it only fails when using I'll open an issue on the SDK repo and link here. |
I observed the failure in another smaller and simpler repo. Also, only when using |
Hey @mattjohnsonpint, I just want to quickly thank you for opening the issue on the .NET SDK repo and all the others for helping to provide additional information on this issue. I appreciate you guys a lot! |
I just merged #26 by @gtbuchanan and published the new package version 1.3.1 on NuGet. During my local tests the issue indeed seemed to be fixed (using .NET SDK 6.0.300). I will preemptively close this issue, but if someone still has any problems in this area even with the newer version, feel free to message me or simply reopen this issue. |
After installing the .NET 6.0.300 SDK, doing
dotnet build --no-incremental
on a project using this library gives errors such as:Minimal Reproduction
MyApp.csproj
Program.cs
Compile with
dotnet build --no-incremental
:Workaround
Install the previous 6.0.203 SDK, and force the project to use it by adding a
global.json
file with the following:Then the project builds just fine with
dotnet build --no-incremental
.This might be an upstream problem with .NET, but I haven't dug deep enough to figure out what it might be.
The text was updated successfully, but these errors were encountered: