VS 2022, MVC, .net 6.0.8 "type or namespace name not found is _cshtml.g.cs in generated code

172 views Asked by At

I keep getting

Error CS0246 The type or namespace name 'TuitionWaiverModel' could not be found (are you missing a using directive or an assembly reference?) LhuTuitionWaiver D:\OneDrive - Lock Haven University\TuitionWaiver\LHUTuitionWaiver\Microsoft.NET.Sdk.Razor.SourceGenerators\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator D:\OneDrive - Lock Haven University\TuitionWaiver\LHUTuitionWaiver\Microsoft.NET.Sdk.Razor.SourceGenerators\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Views_LhuTuitionWaiver_Index_cshtml.g.cs 504 Active

I have globally searched the entire computer and there are no corresponding _cshtml.g.cs to be found nore can I find the microsoft.net files.

I have deleted the obj and bin directories with VS closed then opened and built and still get the same result.

The tuitionwaivermodel is not even referenced in the index files other than in contexts.

These are the only errors I'm getting and am at a loss on how to fix other than deleting the obj and bin directories from other searched.

0

There are 0 answers