Closed girshfeld closed 4 years ago
What are you trying to do? I guess, it is automated run inspectcode in some build agent?
For Unity 2019.2+, I have just added entry point to do this
https://github.com/van800/com.unity.ide.rider/commit/f781bf2df0b03f8249f10e3c62cb499362dac335
It would become available with Rider package 2.0.8.
For older Unity versions it is a bit complicated. Rider EditorPlugin contains CsprojAssetPostprocessor and SlnAssetPostprocessor, which change generated csproj and sln files to ensure dotnetframework target pack is not required to be installed. Normally EditorPlugin should not be pushed to vcs. https://github.com/JetBrains/resharper-unity/blob/32e336d21a55688654670c142165f09aab7f0e0f/unity/EditorPlugin/AssetPostprocessors/CsprojAssetPostprocessor.cs#L15 https://github.com/JetBrains/resharper-unity/blob/32e336d21a55688654670c142165f09aab7f0e0f/unity/EditorPlugin/AssetPostprocessors/SlnAssetPostprocessor.cs#L13
If you want those post-processors to do work, you need
if (UnityUtils.IsInBatchModeAndNotInRiderTests)
return contents;
This code changed a bit in Rider 2020.3 and with 2020.3, you may just pass -riderIntegrationTests
commandline param.
For Rider 2020.2, you'd need to recompile your own version of EditorPlugin.
Let me know if that works for you.
We have to use mac for building game for ios. So we use mac mini build agents for all build (ios, android, testing) for unifications.
We stick with Unity 2018.4 for some time because it is LTS. I can copy rider plugin into project befor build, so there no need to commitit vcs. So I'll try to make it work.
I made it work with Rider Plugin EAP 2020.3 and flag -riderIntegrationTests
.
EditorPlugin is added to project on build agent by build script. I hope with Unity 2019.x I will can skip this step.
Thank you!
Follow instructions from https://github.com/JetBrains/resharper-unity/issues/536
As a result tools will not see .net runtime and will show compile errors logs.txt
Opening project in unity and rider not in batch mode fixes the issue and inspections starts working
Versions: