Skip to content

Baseline tests should check for all possible extensions of not expected files #62752

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

Merged
merged 2 commits into from
Jul 17, 2025

Conversation

ilonatommy
Copy link
Member

@ilonatommy ilonatommy commented Jul 16, 2025

After #62593 renamed some template files, we could see additional files in templates structure. It could be visible only locally, in case the repository run template tests before and after the PR got in.

This revealed one issue with baseline tests: they would not fail, even if repository was creating a template with incorrect application structure, with three .csproj files instead of only one.

In the particular case of such rename, this behavior would not have been caught by the developer applying the change - for them, the additional dirs would not exist. This change does not aim at improving cleaning the repo from old assets. It is trying to fix possible other cases when we would have additional contents of extensions that we don't currently check for. Maybe there's a good reason we're not doing that. Currently, I don't see it, so I am posting this update.

Description

  • Tests: Baseline tests should check for all the types of "not expected" contents, regardless of extension. Skipping bin and obj dirs should stay.

Fixes #62746

@ilonatommy ilonatommy added this to the 10.0-preview7 milestone Jul 16, 2025
@Copilot Copilot AI review requested due to automatic review settings July 16, 2025 12:45
@ilonatommy ilonatommy added the area-blazor Includes: Blazor, Razor Components label Jul 16, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a regression in the template baseline tests by removing redundant file extension checks when determining which files to skip during template validation. The change specifically removes filtering for .csproj, .fsproj, .props, .sln, and .targets files, while preserving the exclusion of bin and obj directories.

  • Removes hardcoded file extension filters from baseline test logic
  • Maintains existing bin and obj directory exclusion patterns
  • Aligns with the stated goal of checking all "not expected" contents regardless of extension

@ilonatommy ilonatommy changed the title Fix templates - remove redundant .csproj Baseline tests should check for all possible extensions of not expected files Jul 16, 2025
@ilonatommy ilonatommy self-assigned this Jul 16, 2025
@ilonatommy ilonatommy merged commit 8bb2b20 into dotnet:main Jul 17, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blazor templates are broken
2 participants