-
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
[release/5.0] Support Source Generators in WPF projects #3846
Conversation
* Include generated NuGet props and targets from outer WPF parent project in generated temp project * Add condition and cleanup generated NuGet props and targets after compilation of temp project * Move BuildEngine global properties to project properties
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/MarkupCompiler/PathInternal.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets
Outdated
Show resolved
Hide resolved
Can this fix #811 ? Looks like it can fix the source code nuget packages that package by SourceYard: https://github.com/dotnet-campus/SourceYard Thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seem to recall that this PR was merged, then reverted, and is now being brought back. If this recollection is correct, then perhaps an explanation about what went wrong, and how the problem has been remedied in this version (besides providing an opt-out) would be a helpful to incorporate in the description.
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets
Outdated
Show resolved
Hide resolved
…ncesDuringMarkupCompilation'
The description has been updated to include the differences between this and the previous PR. Thanks. |
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/MarkupCompiler/PathInternal.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The question about the glob-pattern looks interesting and should be resolved before merging - maybe it's nothing; and a few maintainability nits best taken care of now. otherwise looks good.
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets
Outdated
Show resolved
Hide resolved
...PresentationBuildTasks/Microsoft/Build/Tasks/Windows/CreateTemporaryTargetAssemblyProject.cs
Outdated
Show resolved
Hide resolved
...PresentationBuildTasks/Microsoft/Build/Tasks/Windows/CreateTemporaryTargetAssemblyProject.cs
Outdated
Show resolved
Hide resolved
...PresentationBuildTasks/Microsoft/Build/Tasks/Windows/CreateTemporaryTargetAssemblyProject.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets
Outdated
Show resolved
Hide resolved
…WinFX.targets Co-authored-by: Rainer Sigwald <raines@microsoft.com>
Co-authored-by: Rainer Sigwald <raines@microsoft.com>
…kupCompilation. Rename GenerateTemporaryTargetAssembly task. Add comment on porting source for GetRelativePath implementation.
42c75cf
to
563463d
Compare
…d new temporary assembly compilation paths in to a single task
@rainersigwald: Thank you for reviewing. I believe all the design suggestions were accommodated here. Everything has been consolidated in to a single task and target. |
…around, and make implicit SDK imports explicit.
d6f0eea
to
ee91876
Compare
…udePackageReferencesDuringMarkupCompilation.
ee90c5e
to
c55043d
Compare
ec3228e
to
a23664d
Compare
This was approved by .NET Tactics today for 5.0.2. Thanks. |
[release/5.0] Support source generators in WPF projects (#3846) [5.0.2 servicing]
[release/5.0] Support source generators in WPF projects (#3846) [5.0.2 servicing]
[release/5.0] Support Source Generators in WPF projects
This feature requires applications to opt-in by explicitly setting a property in their project file. Otherwise, the existing GenerateTemporaryTargetAssembly code is executed.
This PR brings the changes from master to release/5.0:
Original PR:
The source generator samples now work in WPF applications:
A single property turns on the new PackageReference support
(IncludePackageReferencesDuringMarkupCompilation = true)
and enables the new behavior. By default, the unmodified GenerateTemporaryTargetAssembly code is called, the old path.There was an incomplete change previously committed and reverted. The new change includes: