79120817

Date: 2024-10-24 07:33:55
Score: 1
Natty:
Report link

This was happening because I tried to save some time and copied some cshtml files into my models folder and then renamed them changing the file type to C#. The issue was that the build action in the file properties did not change.

Incorrect build action in file properties

In order to resolve the issue, the build action needed to be changed to "C# compiler"

Correct build action in file properties

This results in colour formatting and intellisense being restored and the class being accessible for reference from other classes.

Text formatting restored

Reasons:
  • Probably link only (1):
  • No code block (0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: YungDeiza