-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Microsoft.Windows.SDK.NET.Ref package not referenced when targeting .NET 5.0 in .NET 9.0 RC.2 SDK #44705
Comments
I think this is intentional and due to the fact that the lowest TFM supported by the Windows SDK projections that are available for the .NET 9 SDK (see #41936) are for .NET 6. So on .NET 5 it's likely just not adding any references, because none would be compatible. Not to mention that .NET 5 is EOL, like you mentioned. Don't have permissions in this repo, but this should just be closed as by design 🙂 |
Thanks. I hit that when our end-to-end tests started to fail after moving to RC.2, but since it's EOL, we can remove .NET 5.0-specific tests. What I find a bit strange is that values in This means that This is in src/Installer/redist-installer/targets/GenerateBundledVersions.targets immediately below changes of I'd expect this use case to somehow fail instead of going through the build without any message and failing in the compiler. |
cc. @manodasanW, you'll probably have more context on those specific versions? |
This sounds like maybe it is a variant of #43795, but instead of |
@Sergio0694 The purpose of these tests is to test that we are able to load the assembly both as metadata and for execution in a supported runtime version (now .NET 8 and .NET 9). It would be nice if this is fixed. There's always a user somewhere who uses some obscure NuGet package which did not get it's target framework updated. |
Description
A simple project targeting e.g.
net5.0-windows10.0.17763.0
will fail to resolve UWP types likeWindows.Devices.Power.Battery
becauseMicrosoft.Windows.SDK.NET.Ref
references are not passed to C# compiler.This was working in RC.1.
Changing the target framework version to
net6.0-windows10.0.17763.0
resolves this problem..NET 5.0 is not supported, but is this intentional?
To Reproduce
net5.0-windows10.0.17763.0
or any other version of Win SDK as long as the target framework isnet5.0
.Windows.Devices.Power.Battery
.dotnet build
with .NET 9.0 RC2 (I tried with the 6th November nightly build and the behavior was the same).The text was updated successfully, but these errors were encountered: