-
Notifications
You must be signed in to change notification settings - Fork 37
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
Remove explicit libraries #157
Conversation
I made sure that |
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.
Very interesting magic.
Tested using delete all bin obj directories
All works fine I think you need to delete the libs directory from the repo? |
Quality Gate passedIssues Measures |
Thanks @ScarletKuro |
This is a trick I found in DotNetInternals, specifically in the following file:
https://github.com/jjonescz/DotNetInternals/blob/main/src/RazorAccess/RazorAccess.csproj
This parts:
TryMudBlazor/src/Try.Core/Try.Core.csproj
Lines 4 to 5 in 3e0d59c
Seems to be a workaround to gain access to
internal
classes of razor compiler.It looks like this tool MSFT uses for testing purposes: https://lab.razor.fyi/.
To stay up-to-date with the correct assembly versions for the following packages:
Microsoft.CodeAnalysis.CSharp
Microsoft.CodeAnalysis.CSharp.Features
Microsoft.DotNet.Arcade.Sdk
Microsoft.Net.Compilers.Razor.Toolset
It’s recommended to periodically check the versions in Directory.Packages.props from the
DotNetInternals
While this approach may seem like a dirty workaround, it’s better than manually dragging and updating the
lib
folder ourselves. I couldn’t find an easier way to handle this, as the following packages do not seem to be included:Microsoft.AspNetCore.Mvc.Razor.Extensions
Microsoft.AspNetCore.Razor.Language
Microsoft.AspNetCore.Razor.Utilities.Shared
Microsoft.CodeAnalysis.Razor
Microsoft.Extensions.ObjectPool
Even in these nuget feeds:
TryMudBlazor/src/nuget.config
Lines 6 to 9 in 3e0d59c
So, I believe the magic comes from the
Microsoft.DotNet.Arcade.Sdk
reference.