Closed CDTR-MattConroy closed 5 months ago
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 https://github.com/Cysharp/MemoryPack/issues/275 for an example of where this is happening.
Interesting, is there's a known workaround at all? I've had this issue intermittently on Unity 2022, but restarting the Editor always seemed to clear it out.
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?
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 2023.2.20f1
and the package AWSSDK.S3.3.7.308.7
.
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.