Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

172 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Which version of Roslyn analyzers should I use with Unity?

This repository provides compatibility information for Roslyn analyzers and source generators with different Unity versions.

Unity uses specific versions of Microsoft.CodeAnalysis.CSharp, which means not all analyzer versions work with all Unity versions. This repository helps you find the right analyzer version for your Unity project.

Supported Unity Versions

Unity version Microsoft.CodeAnalysis.CSharp version
Unity 6000.5 4.10 (the official manual still states 4.3)
Unity 6000.0 4.3 (stated in Manual: Create and use a source generator)
Unity 2022.3.12f1 4.3 (backported)
Unity 2022.2 4.1
Unity 2021.2 3.9 (stated "3.8" in Manual: Roslyn analyzers and source generators)
Unity 2020.2 3.5

Note

Microsoft.CodeAnalysis.CSharp version included in the Unity editor is checked using tools/check-unity-roslyn-version.ps1.

Analyzer Compatibility

Check the markdown files in this repository for compatibility information on specific analyzers:

Want to use an analyzer not listed here?

You can add a new analyzer or update version information by following these steps:

  1. Fork this repository
  2. Run the workflow in your fork:
    • Go to Actions > Check Roslyn Analyzer Versions
    • Click Run workflow
    • Enter the NuGet package ID (e.g., Microsoft.Unity.Analyzers)
    • Click Run workflow
  3. The workflow will push a branch and display a URL. Click the URL to create a Pull Request to this upstream repository.

About

Compatibility information for Roslyn analyzers and source generators with different Unity versions

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Sponsor this project

Contributors

Languages