Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Visual Studio doesn't recognize generated source code (Roslyn)

Discussion in 'Code Editors & IDEs' started by ITR, Jun 1, 2023.

  1. ITR

    ITR

    Joined:
    Apr 7, 2015
    Posts:
    21
    I'm using the manual on Roslyn Analyzers, and I have it working in the editor, but visual studio marks the namespace and class name as missing. (Compiler Error CS0246)

    Does anybody know how to fix this? I remember reading a similar thread mentioning this problem, but I'm unable to find it again.
     
  2. ITR

    ITR

    Joined:
    Apr 7, 2015
    Posts:
    21
    Found the post

    I think the issue was that the manual doesn't say you need the SourceGenerator label on the dll too.