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

[release/2.3] Fix Mvc.FunctionalTests referencing RazorPagesClassLibrary #59361

Open
wants to merge 1 commit into
base: release/2.3
Choose a base branch
from

Conversation

halter73
Copy link
Member

@halter73 halter73 commented Dec 7, 2024

This fixes the Mvc.FunctionalTests test failures involving RazorPagesClassLibrary on my local machine. It appears that while testing in the release/2.3 aspnetcore repo, Microsoft.NET.Sdk.Razor SDK does not bring in all the properties and targets from Microsoft.AspNetCore.Razor.Design and Microsoft.AspNetCore.Mvc.Razor.Extensions, so this PR manually imports them into the RazorPagesClassLibrary test project.

I got inspiration from ClassLibrary test project in the Razor.Design testassets. The main difference is that I manually set the _RazorTaskAssembly property to point inside the bin folder instead of letting it be derived solely from the _RazorMSBuildRoot like the _RazorToolAssembly.

I'm not sure why this difference is necessary, or why these changes are only needed now. That's why I'm opening this PR up as a draft so someone like @javiercn can determine if this makes sense, or if the test failures might be indicative of some build-time regression.

@halter73 halter73 requested a review from wtgodbe December 7, 2024 00:55
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Dec 7, 2024
@javiercn
Copy link
Member

@halter73 I imagine this only happens on the local repo, not on the built/published SDK?

It's unclear to mee too why this happens, the best suggestion that I have would be to get a binlog for release/2.1 and a binlog for release/2.3 and compare them to see what might have changed.

Other than that, if it only affects the builds within the repo, I think the change is fine.

@halter73 halter73 marked this pull request as ready for review December 11, 2024 19:54
@halter73 halter73 requested a review from javiercn as a code owner December 11, 2024 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants