I have Component Views and everything works fine in development but when I published I get the exception
"InvalidOperationException: The view 'Components/SomeComponentName/Default' was not found".
The thing is I have two previous Component Views that work fine both in development and when published. Later I added new Component Views so the problem is the previous ones get compiled when published while the new ones is not compiled to the ProjectName.Web.Views.dll but still works fine when debugging.
Project is running dotnet core 3.1

I found the problem: The views were added to the Remove ItemGroup in Web.csproj file, so I deleted those lines and then Included it in the other ItemGroup