Unity3D-NSubstitute icon indicating copy to clipboard operation
Unity3D-NSubstitute copied to clipboard

Disable auto reference of runtime assemblies

Open xoox opened this issue 4 years ago • 1 comments

When added by the UPM approach, NSubstitute assemblies will be referenced by all Unity assembly definitions. That's unnecessary because NSubstitute usually used by unit-test scripts.

Under the above situation, NSubstitute.dll is referenced by the exported main .csproj project. If sonar scanner is used to check C# code, the project will be treated as a test project, which will make the code scanning less useful.

To fix above concerns, This PR disables the Auto Reference options of runtime DLLs.

References

xoox avatar Sep 17 '21 10:09 xoox

This sounds useful indeed, as we just bumped into that the whole Castle namespace is used in runtime assemblies too, even though we would not need it there, just in our test assemblies.

lostlont avatar Oct 19 '22 13:10 lostlont