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

Fix WPF application framework re-enable bug #9256

Merged

Conversation

haileymck
Copy link
Contributor

@haileymck haileymck commented Sep 7, 2023

Fixes AB#1882665

When you disable and then re-enable "Application Framework" in VB WPF projects, it adds
<ApplicationDefinition Include="Application.xaml" /> to the project file, which is already implicitly declared and causes the build to fail. This PR removes this ApplicationDefinition when the property is re-enabled.

Note that this change leaves empty <ItemGroup /> in the project file because the ItemGroups is a readonly collection available by MSBuild

Microsoft Reviewers: Open in CodeFlow

@haileymck haileymck requested a review from a team as a code owner September 7, 2023 20:48
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. Left some thoughts. The only critical one is the file naming, though the case-insensitivity could also be important.

@drewnoakes drewnoakes added the Feature-Project-Properties-Designer The new project property pages which replace the legacy AppDesigner label Sep 7, 2023
@tmeschter
Copy link
Contributor

When you disable and then re-enable "Application Framework" in VB WPF projects, it adds
to the project file, which is already implicitly declared and causes the build to fail.

Is it implicitly defined in C# as well?

@adamint
Copy link
Member

adamint commented Sep 19, 2023

@haileymck is this still in-progress or has it been shelved?

@haileymck
Copy link
Contributor Author

@haileymck is this still in-progress or has it been shelved?

going to convert to draft

@haileymck haileymck marked this pull request as draft September 25, 2023 17:50
@haileymck haileymck marked this pull request as ready for review October 13, 2023 22:57
@haileymck haileymck requested a review from drewnoakes October 13, 2023 22:58
@haileymck haileymck merged commit d564ccb into dotnet:main Oct 24, 2023
5 checks passed
@ghost ghost added this to the 17.9 milestone Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Project-Properties-Designer The new project property pages which replace the legacy AppDesigner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants