79509832

Date: 2025-03-14 17:33:05
Score: 0.5
Natty:
Report link

I found a temporary solution for this problem without reopen Visual Studio.

After creating the class, I have to press SaveAll button and I have to change Active Solution Configuration (If Debug than Release, if release than debug). Afterwards classes begin to be detected.

However, this action must be performed after each new class is created.

When I clicked the SaveAll button, I observed that it saved the code <Compile Include="Class1.cs" /> between the ItemGroup tags in the csproj file. I know this. But other projects don't need this action. It starts detecting the class as soon as you create it in other projects.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Melih