Repository navigation
Opt into IncludePackageReferencesDuringMarkupCompilation - #15465
Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
clairernovotny
left a comment
There was a problem hiding this comment.
I don't know where the right place in the SDK is for this, so I can't speak to that, but otherwise LGTM
dsplaisted
left a comment
There was a problem hiding this comment.
Normally I would put this in a .targets file, though it would need to come before Microsoft.WinFX.targets where it's defaulted to false.
Is it possible to add a test for the end-to-end scenario here, ie using source generators in a WPF project or one of the other scenarios this unblocks?
|
True, a targets file would make it easier for a user to disable it in their csproj if they wanted to. It should be possible to test for this. |
|
Note that testing this might require updating to a stage 0 version which has the WPF fix. |
@dsplaisted it looks like there isn't a 5.0.200 build that can be used for stage 0 that has all the changes. Specifically I'm looking at the latest 5.0.200 build locally (5.0.200-preview.21074.4) and it doesn't contain any of the changes from https://github.com/dotnet/wpf/pull/3846/files Edit: we haven't updated our wpf version since December 10th, the day before the WPF changes were merged: https://github.com/dotnet/sdk/blame/release/5.0.2xx/eng/Versions.props#L135 |
|
Test should pass when we get a build to use as stage 0 from this PR: #15492 |
|
I was confused about stage 0, I think we don't actually need a stage 0 round-trip, we just need the WPF update merged. |
|
@dsplaisted this is passing locally with the wpf update, are we good to merge once it's green? |
|
@sfoslund LGTM |
|
Thanks for merging @wli3! |
Just curious, if Microsoft.WinFX.targets is defaulting it to false, why not change make the change there to default to true instead of effectively doing that with the change here? |
The reason is that WPF is part of the runtime, ships in 5.0.2/5.0.3 and they can't change the default behavior there. The SDK is expected to change features (in a compatible way) from release to release, so we can flip the default here. WPF has an issue to make it on by default for .NET 6 here: dotnet/wpf#3974 |
Fixes #15395