Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

error the in razor.g.cs file, can't find in VS, can't find the _razor.g.cs file

I’m getting "; expected" error in my .razor file and in _razor.g.cs file,

In previous blazor versions I was finding these g.cs files in the solution folder, now I can’t find them there, and double clicking on the error message in VS doesn’t point me to anywhere (error message has no line number, the one for .g.cs has a line number), and I can’t find the problem.

Where are the _razor.g.cs files located now ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Edit the project file (.csproj) and add this:

<PropertyGroup>
    <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>   
</PropertyGroup>

The file will by default go to obj\debug\net6.0\generated\...

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading