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

BuildAnalysis does not work with new .NET 6 WPF projects #518

Open
1 of 2 tasks
hailedev opened this issue Jan 23, 2023 · 3 comments
Open
1 of 2 tasks

BuildAnalysis does not work with new .NET 6 WPF projects #518

hailedev opened this issue Jan 23, 2023 · 3 comments
Assignees
Labels
bug Something isn't working NuGet Related to functionality distributed through a NuGet package XAML-Analysis Relates to XAML Analysis functionality
Milestone

Comments

@hailedev
Copy link

Describe the bug

When the RapidXaml.BuildAnalysis package is installed into a project created from the .NET 6 WPF Application template the analysis executable is not run when the application is built

How can this be reproduced?

  1. Open Visual Studio 2022, create a new project and select the WPF Application template, select all default options in the wizard
  2. Add the RapidXaml.BuildAnalysis package to the solution
  3. In the xaml file add a tag which would generate a warning such as a TextBlock with a hardcoded string
  4. Build the solution

Expected result: a warning is generated in the build output

Have created a video to demo the problem below

bandicam.2023-01-23.12-16-38-101.mp4

Which version of Visual Studio are you using?

  • 2019
  • 2022

Project Type

WPF

@hailedev hailedev added the bug Something isn't working label Jan 23, 2023
@hailedev
Copy link
Author

This looks to be because EnableDefaultItems is enabled in the project template. You need to update the csproj file to disable it and then explictly add in the xaml files

@mrlacey mrlacey self-assigned this Jan 23, 2023
@mrlacey mrlacey added this to the 1.0 milestone Jan 23, 2023
@mrlacey mrlacey added XAML-Analysis Relates to XAML Analysis functionality NuGet Related to functionality distributed through a NuGet package labels Jan 23, 2023
@mrlacey
Copy link
Owner

mrlacey commented Jan 23, 2023

Yes, this is due to the way that files to analyze are identified.
Now I know you're hitting this issue, I'll bump it up the priority list.

Note, this also affects MAUI apps too :(

@mrlacey
Copy link
Owner

mrlacey commented Jan 23, 2023

x-Ref: #408

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working NuGet Related to functionality distributed through a NuGet package XAML-Analysis Relates to XAML Analysis functionality
Projects
None yet
Development

No branches or pull requests

2 participants