Hi, we are seeing an intermittent issue after introducing NuGetForUnity 4.5.0 into our Unity project.
Environment
- Unity: 6000.3.11f1 (mac)
- NuGetForUnity: 4.5.0
- Installed packages:
- MasterMemory 3.0.4
- MessagePack 3.1.4
Issue
On some team members’ machines, after restoring packages, Roslyn analyzer DLLs are imported with incorrect Unity PluginImporter settings.
For example, a DLL under:
NuGetPackages/InstalledPackages/MessagePackAnalyzer.3.1.4/analyzers/...
is imported as a normal managed plugin:
Any Platform is enabled
- Desktop platforms such as Windows/Linux/macOS are checked
- The
RoslynAnalyzer label is not assigned
The expected result is that these analyzer DLLs are not referenced by any platform and have the RoslynAnalyzer label.
Workaround
Deleting NuGetPackages/InstalledPackages/ and running restore again fixes the import settings.
Reproducibility
This has happened to multiple team members, but once fixed, it does not reproduce easily. I also cannot reproduce it consistently on my own machine, so we do not yet know the exact conditions.
Has anyone seen a similar issue where analyzer DLL import settings or labels are not applied correctly during restore?
Hi, we are seeing an intermittent issue after introducing NuGetForUnity 4.5.0 into our Unity project.
Environment
Issue
On some team members’ machines, after restoring packages, Roslyn analyzer DLLs are imported with incorrect Unity
PluginImportersettings.For example, a DLL under:
NuGetPackages/InstalledPackages/MessagePackAnalyzer.3.1.4/analyzers/...is imported as a normal managed plugin:
Any Platformis enabledRoslynAnalyzerlabel is not assignedThe expected result is that these analyzer DLLs are not referenced by any platform and have the
RoslynAnalyzerlabel.Workaround
Deleting
NuGetPackages/InstalledPackages/and running restore again fixes the import settings.Reproducibility
This has happened to multiple team members, but once fixed, it does not reproduce easily. I also cannot reproduce it consistently on my own machine, so we do not yet know the exact conditions.
Has anyone seen a similar issue where analyzer DLL import settings or labels are not applied correctly during restore?