Skip to content
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

Merged
merged 4 commits into from
Sep 16, 2021

Conversation

chsienki
Copy link
Contributor

@chsienki chsienki commented Sep 15, 2021

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 and ProvideBindingPath 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.

@chsienki chsienki marked this pull request as ready for review September 15, 2021 19:49
@chsienki chsienki requested a review from a team as a code owner September 15, 2021 19:49
@chsienki
Copy link
Contributor Author

@jmarolf @sharwell for review please :)

</XamlPropertyRule>
</ItemGroup>
<Target Name="EmitAssemblyVersion" BeforeTargets="CoreCompile">
<WriteLinesToFile File="$(BaseIntermediateOutputPath)\AssemblyVersion.g.cs"
Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor

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? 😉

Copy link
Contributor Author

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
@jmarolf jmarolf requested a review from drewnoakes September 15, 2021 21:59
@jmarolf
Copy link
Contributor

jmarolf commented Sep 15, 2021

@drewnoakes can you also take a look here?

Copy link
Contributor

@jmarolf jmarolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Member

@drewnoakes drewnoakes left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants