-
Notifications
You must be signed in to change notification settings - Fork 256
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
Update component debugger to work for VS 2022 #896
Conversation
</XamlPropertyRule> | ||
</ItemGroup> | ||
<Target Name="EmitAssemblyVersion" BeforeTargets="CoreCompile"> | ||
<WriteLinesToFile File="$(BaseIntermediateOutputPath)\AssemblyVersion.g.cs" |
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.
🤢This is unpleasant, but required for the rules. It seems overkill to make it a generator, but I'm considering writing one to handle the whole rule injection which would remove a lot of the ceremony needed here.
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 would prefer a source generator here. Nerdbank.GitVersioning might allow this to be automated without a source generator or project file changes.
@AArnott does NB.GV support setting the AssemblyVersion via the project file instead of the normal approach of automatically determining it from the repo history?
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.
No. NB.GV will steamroll any AssemblyVersion
property you set with the discovered version.
If you wrote build authoring to execute your target in between GenerateAssemblyVersionInfo
and GetBuildVersion
then you could rewrite that property. But that strikes me as making your car float instead of building a boat.
Have you considered letting NB.GV do its thing? 😉
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.
Updated to use a SG
- Make version info be a generator - Use ProvideCodeBase instead
@drewnoakes can you also take a look here? |
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.
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.
Looks good to me.
Update the component debugger to work in the new launch profiles format introduced in VS2022. See https://github.com/dotnet/project-system/blob/main/docs/repo/property-pages/how-to-add-a-new-launch-profile-kind.md for reference.
Removes the old user control, and writing code which is now handled by the rule file (
ComponentDebuggerLaunchProfile.xaml
). Adds rule exporting andProvideBindingPath
so that VS can find the rule and apply it to matching projects.Tested on VS2022 using an existing
launchsettings.json
and confirmed projects show the new UI, and can add/remove as needed.