-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Convert Razor to use Reference #4954
Conversation
src/Razor/Razor.Design/test/testassets/ClassLibrary/ClassLibrary.csproj
Outdated
Show resolved
Hide resolved
The build is failing with,
I'm not sure why. It works fine when I do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only noticed one minor thing - see below
The NU1100 error is caused by this file: https://github.com/aspnet/AspNetCore/blob/ajbaaska/convert-reference/src/Razor/Razor.Design/test/testassets/Directory.Build.props. It isn't importing restore sources.
<ProjectReferenceProvider Include="rzc" ProjectPath="$(RepositoryRoot)src\Razor\Razor.Tools\src\rzc.csproj" /> | ||
<ProjectReferenceProvider Include="dotnet-razorpagegenerator" ProjectPath="$(RepositoryRoot)src\Razor\RazorPageGenerator\src\dotnet-razorpagegenerator.csproj" /> | ||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Razor" ProjectPath="$(RepositoryRoot)src\Razor\Razor\src\Microsoft.AspNetCore.Razor.csproj" /> | ||
<ProjectReferenceProvider Include="Microsoft.NET.Sdk.Razor" ProjectPath="$(RepositoryRoot)src\Razor\Sdk.Razor\src\Microsoft.NET.Sdk.Razor.csproj" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess is that <Reference Include="Microsoft.NET.Sdk.Razor" />
won't work in this reference system. ProjectReferences don't flow build assets, like targets and tasks. My hunch is that any projects still this in aspnet/AspNetCore will need to replace the package ref with <Sdk Name="Microsoft.NET.Sdk.Razor" />
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But there is no <Reference Include="Microsoft.NET.Sdk.Razor" />
anywhere in Razor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do see a bunch of <Project Sdk="Microsoft.NET.Sdk.Razor">...</Project>
. Does that still work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, <Project Sdk="Microsoft.NET.Sdk.Razor">
is functionally the same as <Project><Sdk Name="Microsoft.NET.Sdk.Razor">
.
These are the references I had in mind:
- https://github.com/aspnet/AspNetCore/blob/13ae0057fbb11fd84fcee8fca46ebc1b2d7c1e6a/src/Identity/src/UI/Microsoft.AspNetCore.Identity.UI.csproj#L26
- https://github.com/aspnet/AspNetCore/blob/13ae0057fbb11fd84fcee8fca46ebc1b2d7c1e6a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj#L17
There are probably more.
You don't have to address these in this PR, btw. Just made the note as it's something we'll need to address when we convert Identity and others. cc @JunTaoLuo
8c97ab2
to
50c8211
Compare
It passed 🙌 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 nice work! Two minor things to fix, then
50c8211
to
ccb6a1f
Compare
Commit migrated from dotnet/aspnetcore@b079041488f0
No description provided.