When I make the class library with VS2019, this does not happen and it works as expected.
Something does not seem right with the core library when creating a new class library either, I find I have to delete the nuget package and reinstall it for new projects to build correctly.
This is on the latest visual studio extension version.
Can you please show step by step. We just try quickly and not see any problem.
if project was created from extension 2.1.801 or earlier then yes, it could be happened, even opened in 2.1.802 because template config still in 2.1.801.
You also have to ensure when adding the .cs file that TinyCLR is also selected when adding to a TinyCLR project. As Gus mentioned if you inadvertently add a regular C# class file it will gum up the whole works.