Skip to content

Conversation

@nowsprinting
Copy link
Contributor

When NUnit.Analyzers were registered; they only worked up to v3.3 on Unity, but now they support up to v3.9.

v3.10 and later are for NUnit4 and are therefore excluded.

@bdovaz
Copy link
Owner

bdovaz commented Oct 6, 2025

How do you know that? The readme file in the repository still says:

If your Unity project is made by Unity 2021.2 or later, then use NUnit.Analyzers v3.3 (v3.4 or later of the analyzers does not work with Unity).

https://github.com/nunit/nunit.analyzers

@nowsprinting
Copy link
Contributor Author

I added this note at the time when the Unity manual page did not include the supported Roslyn version.
nunit/nunit.analyzers#489

I'm planning to submit a PR to change this.

@bdovaz
Copy link
Owner

bdovaz commented Oct 7, 2025

I added this note at the time when the Unity manual page did not include the supported Roslyn version. nunit/nunit.analyzers#489

I'm planning to submit a PR to change this.

I mean, how do you know that NUnit.Analyzers <= 3.9 works with Unity? Because you've tested it yourself?

@nowsprinting
Copy link
Contributor Author

how do you know that NUnit.Analyzers <= 3.9 works with Unity? Because you've tested it yourself?

Yes, I tried in Unity 6000.0.50f1.

Additionally, the latest version of NUnit.Analyzers, v4.10, use Microsoft.CodeAnalysis.CSharp v3.11.0, so this should also work with Unity 6.

see: https://github.com/nunit/nunit.analyzers/blob/master/src/nunit.analyzers/nunit.analyzers.csproj
see also: https://docs.unity3d.com/Manual/create-source-generator.html

@bdovaz bdovaz merged commit ca1151b into bdovaz:master Oct 7, 2025
3 checks passed
@nowsprinting nowsprinting deleted the nunitanalyzers_3_9 branch October 8, 2025 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants