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

Default to 'true' for unset properties owned by WPF #1300

Merged
merged 1 commit into from
Jul 17, 2019

Conversation

ryalanms
Copy link
Member

Default to 'true' for unset EnableDefaultPageItems and EnableDefaultApplicationDefinition in Microsoft.NET.Sdk.WindowsDesktop.props to allow MSBuild's CheckForDuplicateItems to provide a descriptive duplicate Page error. The check was previously no-op'd in the target due to unset properties.

Builds with duplicate Page items now fail with this error:

C:\Program Files\dotnet\sdk\3.0.100-preview8-013270\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.NET.Sdk.WindowsDesktop.targets(21,5): error NETSDK1022: Duplicate 'Page' items were included. The .NET SDK includes 'Page' items from your project directory by default. You can either remove these items from your project file, or set the 'EnableDefaultPageItems' property to 'false' if you want to explicitly include them in your project file. For more information, see https://aka.ms/sdkimplicititems. The duplicate items were: 'Themes\Generic.xaml' [I:\test\XSecControls\XSecControls.csproj]

Provides a better error message for #1264.

@ghost ghost requested review from vatsan-madhavan, rladuca and stevenbrix July 17, 2019 20:59
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Jul 17, 2019
@ghost ghost requested a review from SamBent July 17, 2019 20:59
@ryalanms ryalanms merged commit f85c653 into master Jul 17, 2019
@vatsan-madhavan vatsan-madhavan deleted the dev/ryalanms/error_on_duplication_page_items branch August 23, 2019 20:12
@ghost ghost locked as resolved and limited conversation to collaborators Apr 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants