Consolidate Razor compiler code into a single DLL #8400
Closed
Description
opened on Mar 7, 2023
Merge the following DLLs into one (Microsoft.CodeAnalysis.Razor.Compiler
):
Microsoft.AspNetCore.Razor.Language
(move into folderLanguage
)Microsoft.CodeAnalysis.Razor
(move into folderCSharp
)Microsoft.NET.Sdk.Razor.SourceGenerators
(move into folderSourceGenerators
)Microsoft.AspNetCore.Mvc.Razor.Extensions
(move into folderMvc
)
Merge tests into one project, as well (Microsoft.CodeAnalysis.Razor.Compiler.Tests
).
Roadmap:
- Transport
Microsoft.AspNetCore.Mvc.Razor.Extensions
v1 and v2 into SDK and makerzc.dll
tool use them. - Rename compiler assemblies #9129 to see whether anything breaks
- Use Razor with renamed compiler DLLs sdk#34928
- [release/8.0.2xx] Update dependencies from dotnet/razor sdk#36059
- [main] Update dependencies from dotnet/razor sdk#36041
- Use SDK with renamed Razor compiler DLLs aspnetcore#50369
- in Roslyn: Rename Razor compiler assemblies roslyn#69655
- Add IVT to a future unified razor test project roslyn#70485
- No longer needed as we removed the IVTs: Removing Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler roslyn#71024
- When IVTs are fixed in Roslyn, re-enable host outputs in Razor. Re-enable host outputs #9447
- Clean this up after merging of DLLs into one is complete.
-
Fixup runtime compilation which lives in aspnetcore.Runtime compilation is fixed to v6.0 of Razor. - Fixup roslyn, aspnetcore, and sdk repos when the update flows there (and again when the updated aspnetcore flows back into sdk), for example:
- https://github.com/dotnet/roslyn/blob/3630eb1758c131d0f359704a0e8cc874e109d269/src/VisualStudio/Core/Test/ProjectSystemShim/VisualStudioProjectTests/AnalyzerReferenceTests.vb#L212
- https://github.com/dotnet/aspnetcore/blob/0684c8aa38c6b9926bae3d901741a83c453dc413/eng/Dependencies.props#L16
- https://github.com/dotnet/sdk/blob/cfa6ec2353784e22171bc4539181a1a935e066e9/src/Tests/Microsoft.NET.Sdk.Razor.Tests/ScopedCssIntegrationTests.cs#L93
- Redo Move compiler code into the new project #8471 and when complete, redo the steps above - renaming the intermediate assemblies to the final one.
Old plan:
- Remove packages not flowing anywhere #8386
- Add skeleton of single compiler DLL #8395
- Move compiler code into the new project #8471
- Update VSIX on Roslyn side similarly to Add razor compiler EA assembly to VSIX roslyn#67501
- Update transports.
- Update runtime compilation in aspnetcore.
- Delete the old packages.
To allow servicing of the old compiler (branch `release/dev17.6`): Not needed, I think, since we have shims now (#8941)
- [17.6] Remove shared DLL dependency from Razor.Language #8594
- Take dependency on the old compiler in the main branch.
Note To service the old compiler: update the 17.6 branch, release new version of this old package, update main branch to consume that version of the old package, build and insert into VS.
See also:
Activity