-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Don't double import WinFX targets #2976
Conversation
Please don't merge this until discussion on dotnet/sdk#11606 has come to a decision whether it's the right thing to do. I suspect it won't be necessary. |
Typing from memory, please verify before acting on this information. When using WindowsDesktop SDK -
I'm not sure how this interacts with UseWpf==false && UseWindowsForms==false. My guess is that WinFx.props based supersedence would work irrespective of UseWpf/UseWindowsForms settings. When not using WindowsDesktop SDK,
This only matters when both UseWpf==false && UseWindowsForms==false. Setting either one without including the WindowsDesktop SDK is a warning state in the base NET.Sdk (which can be suppressed). The net is that I'm not sure why a further change is needed in the WindowsDesktop SDK. Whenever the WindowsDesktop SDK is imported, it effectively nullifies the effect of the NetFx copy of WinFx.targets. I can see the value of solving this in the base NET.Sdk though when neither WPF nor WinForms are in use by default, but NetFx copy of WinFX.targets comes into play anyway when MSBuildRuntimeType==Full. |
With the .NET Sdk's change I proposed, it'll make import optional but disabled by default.
In this PR, I just make sure that it's effectively disabled when using
They did. But I wanted to make it optional so that I can still use the inbox targets when needed. |
f1c1262
to
a25cd3e
Compare
Since dotnet/sdk#11606 seems close to being worked out, is this really needed any more? |
We have to ensure that only when WinFX targets from sdk is used, the NETFX WinFX targets gets disabled permanently. |
Why? I mean what’s the problem you are trying to solve? As far as I can tell the current situation is benign. |
The sdk PR solves the issue I'm facing. So, no problem there. Just as you said, even if we import both of them, the sdk version takes over. I'm just ensuring the correctness of the imports in this PR. That's all. This property have to be a toggle for both the imports. Like, when NETFX version is disabled, the sdk version is enabled and vice-versa. Both must not be enabled at the same time. |
Fair enough! |
If it's indeed an update from master, then can this be merged from master cleanly? @dotnet/wpf-developers PTAL, review and and consider for merging. There was much effort by @Nirmal4G, @dsplaisted, and myself across this PR and dotnet/sdk#11606 to get this in shape. @dotnet/dnceng why aren't the checks reporting success correctly for this PR ? |
They look correct to me. Was there a large delay between the build completing and the check reporting success? Or was there a delay between all the build legs completing and the build reporting it had finished? |
All Green for me too! I did resolve the conflicts a few days ago but forgot to push. That might be why the latest merge from master is few commits old from the current one. But there are no conflicts, so it's safe to merge. |
This. When I looked, all the individual checks were green at least for a couple of mins, yet the "dotnet-wpf CI" summary was showing "in-progress". A few seconds lag seems reasonable.... but if the status stayed that way throughout the amount of time it took me to compose my comment (not-very-short), take a couple screenshots, highlight them etc., then at least to me it looked non-responsive. |
Azdo builds have delays when reporting that an entire stage has finished, and then another delay when all stages have finished before it reports that a build has completed. This has to do with how the agents report a successful build and it can be frustrating. Additionally, there are also sometimes delays between a build finishing, and the GitHub checks reflecting it. We had another report of delays when running the checks, so there might have been a transient issue with the communication between AzDO and GitHub. I sent email to the AzDO experts to see if there was a known outage at any point this morning. |
Please merge this as soon as possible, the existing PRs are breaking this one. |
7431264
to
6808e0a
Compare
9644ee0
to
fd4d3c0
Compare
fd4d3c0
to
56b86a6
Compare
Respect EditorConfig preferences for whitespace and newlines
The MSBuild items & targets that were defined after the WinFX targets import doesn't depend on anything from the WinFX targets. So, it is safe and better to declare the import after those items and targets definitions.
When the SDK's implementation is being used.
Currently there's no way to properly switch between NETFX's and CoreCLR's WinFX targets. This adds an opt-out, just in case, if we want to use the NETFX's WinFX targets instead.
56b86a6
to
4105777
Compare
Thank you for fixing this, @Nirmal4G. |
Finally! 🥳 |
Don't import .NET Framework's WinFX targets, When the SDK's implementation is being used and vice versa.
Also, there's no straight forward way to switch between either
WinFX
targets as needed. This patch provides such mechanism throughImportFrameworkWinFXTargets
.Reason
We (and possibly many others like me) have a large set of NETCLR WPF projects that can't move to CoreCLR right now. I have recently converted them to sdk-style projects with the
WindowsDesktop
SDK which includes custom tasks that are meant for Full framework projects. We also have some silverlight projects to maintain and I recently converted them to sdk-style too. Seems they also need WinFX targets.So, to use the official
WindowsDesktop
, we want to switch between eitherWinFX
targets for our custom tasks to take effect. This patch is just allowing that. We're migrating our projects and tools to.NET
CoreCLR and it'll take some time. Until then, we need this ability to maintain our projects.Reference: dotnet/msbuild#4948