I have converted a library to .NET Standard 2.0 to be a Razor Component library:
I changed the SDK type to Razor:
<Project Sdk="Microsoft.NET.Sdk.Razor">
and added the references to the Razor component libraries
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.8" />
</ItemGroup>
However when editing components I find the compilation process is failing. For example it fails to correctly map a @bind=.. attribute in a HTML tag and the Razor components don't seem to compile correctly.