Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Visual Studio won't compile

Discussion in 'Code Editors & IDEs' started by Kriest, Nov 8, 2021.

  1. Kriest

    Kriest

    Joined:
    Feb 28, 2018
    Posts:
    4
    Recently i upgraded my Unity project to version 2021.2.1f (+ HDRP 12.1), everything works fine in het Unity editor, it compiles and i can run my game. But when i try to compile the code in Visual Studio it fails to compile; i get a 100 errors:

    upload_2021-11-8_19-6-33.png

    I've tried to 'regenerate project files' but this doesnt make a difference.

    When i create a new clean project (also HDRP) it does compile in visual studio. In my converted project, Unity automatically adds a .csproj named 'Unity.RenderPipelines.HighDefinition.Runtime', this is the project giving the errors;

    Any advice/suggestions? Thnx :)
     
  2. Kriest

    Kriest

    Joined:
    Feb 28, 2018
    Posts:
    4
    I was using the assets AmplifyImposters & ShaderGraphExtensions which were the reason the not compiling projects were opened in visual studio, i removed the assets and this fixed the errors.