-
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
NETSDK1221 warning for wpftmp.csproj projects #44605
Comments
@KirillOsenkov Adding @jjonescz. Are you doing anything special? Is there a reason that NuGetPackageRoot #43119 brought in this warning |
It could be because I'm using VS 17.11.5 with the rc2 SDK. Have you tried building a WPF project targeting net472 with that combination? |
@jjonescz ping me on Teams if you're having trouble reproducing. |
That looks like a mismatched combination. Can you use VS 17.12 instead?
Yes, WPF is a known problematic scenario where NuGetPackageRoot isn't set. See the following in #43016:
We already discussed this under the issue it seems: #43016 (comment) Note that this is just a warning so it should be suppressible. @marcpopMSFT I believe we knew and discussed this WPF scenario is broken when we were introducing the warning. I don't know if someone is looking at solving this inside WPF? Or should we try to suppress this warning for the problematic WPF inner build? |
The problem is that builds that were fine a month ago will suddenly be not fine after installing the 9.0 SDK. People also have warnings as errors set. We need to have a higher bar for compat, we can't be breaking users builds like this. |
definitely need to add a check for wpftmp |
@jjonescz We should definitely try to avoid the warning in this situation for WPF if we can as customers see warnings as errors and as Kyrill noted, are suddenly broken if they update in a way as to get torn. Can we do this in the SDK or should this be in the WPF side? Seems like suppressing the automatic Roslyn package when NuGetPackageRoot is not set will handle a broader set of cases (ie in case any other situations end up with that unset)? CC @pchaurasia14 @baronfel @jaredpar for visibility. |
Depends on what you mean by "avoid the warning". We can probably suppress it if we detect we are in wpftmp build. Solving the empty NuGetPackageRoot problem would likely require some work on WPF side, I haven't investigated that.
So are you saying we should just remove the warning? Because that's exactly why we added it - to avoid customers being in a torn state without noticing. We already aren't using the automatic Roslyn package when NuGetPackageRoot is empty (we can't), we are just not silent about it. |
Opened a PR for this here: #44688
I realized this is from a task defined in .NET Framework targets (C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets), I assume those are hard/impossible to change? |
I vaguely recall there being a long-term issue to get WPF or someone to move away from framework targets and into netcore targets - does that ring a bell for anyone (@marcpopMSFT? @rainersigwald?). If that was done we might have more flexibility to change things. |
That's it exactly - thank you Rainer! |
Fixed in 9.0.2xx for this class of projects since the customer has no workaround. |
There's a new warning when building WPF projects targeting net472 using desktop msbuild.exe /r:
This is a breaking change and is potentially urgent, cc @marcpopMSFT
The text was updated successfully, but these errors were encountered: