-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analzyers will not be loaded due to errors #644
Comments
This seems to be exclusive to Unity 2023. Rolling back to Unity 2022.3.9, removes the problem. |
This also seems to affect Unity 6000.x. See Cysharp/MemoryPack#275 for an example of where this is happening. |
Interesting, is there's a known workaround at all? |
None that I'm aware of. 😞 |
Unity documentation here https://docs.unity3d.com/Manual/roslyn-analyzers.html says: Your source generator must use Microsoft.CodeAnalysis 3.8 to work with Unity. I think all these packages are using much newer version and are thus not supported by Unity. Even if it seems they work in earlier Unity versions there is no guarantee they will work correctly. |
I can imagine the the new editor vs runtime assembly compatibility level setting could be the cause, did you try setting both to netstandard 2? |
Alas, no dice. Problem persists with both API and editor assemblies set to .NET Standard 2.1 (tested in 6000.0.2f1, attempting to install MemoryPack). |
Would it be possible to an add option to ignore analyzers from packages? Not ideal I know, but if they don't work in newer versions of Unity, but the actual package does it should only be the developer experience that's affected? As it stands this seems to be blocking me from upgrading past 2022 unnecessarily? |
@CDTR-MattConroy I found the error. Basically the whole analyzer dll re-configuring process was skipped. I fixed it in #646 and tested it with unity |
Installing various packages that come with analyzers produce the following errors:
Tried deleting the restored packages and restoring again, and restarting Unity to no avail.
The text was updated successfully, but these errors were encountered: