'How to suppress compiler errors within vctmp.cshtml files in Visual Studio?

Whenever I open a temporary cshtml file or compare the difference between the files, the compiler shows a bunch of errors. It's unable to resolve razor syntax due to a lack of context: enter image description here

My project does build despite these errors and I don't really care about errors in temporary files, but they are distracting and real errors get lost in the list. Is there any way to suppress or hide them specifically for the temp files?



Solution 1:[1]

You may have an error in the html file name or not created. Model error is because you didn't send a model for view. Read carefully the errors already present in all information error screen.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Cemil Arancak