Connected the style file via "Add > Existing item > Add link"
<ItemGroup>
<Content Include="..\WebApplication2\wwwroot\css\site2.css" Link="wwwroot\css\site2.css">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
Added to _Layout.cshtml
<link rel="stylesheet" href="~/css/site2.css"/>
The problem is that when building in the wwwroot folder, I see a file with styles, but in the browser this file is empty and, accordingly, the style is not loaded. Link to the source code: https://github.com/Slogg/WebAppStyleLinkTest In project WebApplication3, I connect style site2.css from project WebApplication2