Repository navigation
[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
|
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 |
vatsan-madhavan
left a comment
There was a problem hiding this comment.
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.
…ncesDuringMarkupCompilation'
|
The description has been updated to include the differences between this and the previous PR. Thanks. |
vatsan-madhavan
left a comment
There was a problem hiding this comment.
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.
…WinFX.targets Co-authored-by: Rainer Sigwald <[email protected]>
Co-authored-by: Rainer Sigwald <[email protected]>
…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: