Search Issue Tracker


Fixed in 2022.3.5f1, 2023.1.3f1, 2023.2.0a22



Found in




Issue ID




[General] "Warning CS8032 An instance of analyzer Unity.MonoScriptGenerator.MonoScriptInfoGenerator cannot be created" is printed in Error List when using Visual Studio 2022



Reproduction steps:
1. Open the attached project “CS8032_Warning”
2. Open Edit > Preferences > External Tools
3. Set External Script Editor to Microsoft Visual Studio 2022
4. In the Project window create a new C# Script
5. Open the newly created script
6. Observe the Error List

Expected result: There are no warnings
Actual result: Multiple CS8032 warnings are printed

Reproducible with: 2022.2.0a14, 2022.2.17f1, 2023.1.0b14, 2023.2.0a13
Not reproducible with: 2020.3.47f1, 2021.3.24f1, 2022.2.0a13

Reproducible on: Windows 10
Not reproducible on: macOS 13.3.1 (M1, Visual Studio for Mac 17.5.4 (build 8))

Warnings do not appear when using Rider or older Visual Studio versions
It might take a couple of seconds for Warnings to appear
Reproducible with newly created projects

Comments (8)

  1. Delande

    Feb 20, 2024 14:55

    I had a similar issue using Unity 2022.3.4f1. I managed to get rid of the errors by removing the Unity.SourceGenerators.dll and Unity.Properties.SourceGenerators.dll from the Data/Tools/Unity.SourceGenerators folder and copying over the same files from my Unity 2022.3.20f1 installation.

    Why did this work, your guess is as good as mine. The files are completely identical. I guess Visual Studio somehow messed something up (possibly with caching files?), and changing the files made it reinitialize them, or something. I might be talking out of my rear end here, but this fixed it for me and hopefully, it will help someone else.

    Backup the original files before you try this, just in case!

  2. F05F01

    Aug 08, 2023 15:44

    I have the same issue

    Unity 2022.3.4f1.0.14531
    Visual Studio Community 2022 version 17.6.5

    Any working solution?

  3. fabietto78

    Jul 12, 2023 11:11

    With the version Microsoft Visual Studio Community 2022 (64 bit) - Preview Version 17.7.0 Preview 3.0 the error no longer occurs.

  4. kaan0550

    Jun 26, 2023 04:35

    Same problem on 2022.3.3f1

  5. chunky_octopus

    Jun 16, 2023 15:27

    I have it with 2022.3.2f1 on Win11 and Rider 2019.3.4

  6. Jellyfish527

    Jun 04, 2023 20:50

    This issue is also present in 2022.3.0, using VS 2022 version 17.6.2, and the file that failed to load is present in the indicated folder. Here is the full error:
    Severity Code Description Project File Line Suppression State
    Warning CS8032 An instance of analyzer Unity.MonoScriptGenerator.MonoScriptInfoGenerator cannot be created from D:\Program Files\Unity\Editor\2022.3.0f1\Editor\Data\Tools\Unity.SourceGenerators\Unity.SourceGenerators.dll: Could not load file or assembly 'netstandard, Version=, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.. Assembly-CSharp D:\Program Files\Unity\Editor\2022.3.0f1\Editor\Data\Tools\Unity.SourceGenerators\Unity.SourceGenerators.dll 1 Active

  7. korlinga

    May 26, 2023 18:04

    I experienced the same symptom in 2022.2.19 using Visual Studio 2022 v17.6.1 on Windows 11 Pro

  8. Pvt-Noob

    May 23, 2023 09:19

    Same issue here. I checked the given path and the "missing" Unity.SourceGenerators.dll is there. I also tried starting VS with administrator privileges, doesn't work.

    Unity 2022.2.20 and Visual Studio 2022 17.6.0

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.