How to set .runsettings in JetBrains Rider and MSTest
Asked Answered
I

1

8

How can I set .runsettings for MsTest in JetBrains Rider?

I tried File | Settings | Build, Execution, Deployment | Unit Testing | MSTest and choose the .runsettings file in Test Settings but this has no effect.

Irade answered 27/6, 2019 at 9:2 Comment(2)
What is your Rider version? Did you try to open your test project in Visual Studio? Please check if your .DotSettings file contains the following: <s:Boolean x:Key="/Default/Environment/UnitTesting/MsTestProvider/UseTestRunConfigFromMetadataFile/@EntryValue">True</s:Boolean>. If it does, change it to false. Or you can do it via VisualStudio: go to "ReSharper | Options | Tools | Unit Testing | Test Frameworks | MsTest -> Test Settings" and switch it to "Use specific test setting file" instead of "Use .runconfig/.testsettings selected in VS UI", then save settings.Delmerdelmor
I use Rider 2019.1.2. And yes after I change the property to false in "C:\Users\%USER_HOME%\.Rider2019.1\config\resharper-host\GlobalSettingsStorage.DotSettings" it works fine.Irade
D
8

The location may have changed since the original question, but I've found it here:

JetBrains Rider > Preferences... > Build, Execution, Deployment > Unit Testing > MSTest

You may have a checkbox Enable MSTest support which you can check (although seems to be removed in latest Rider version) and there's also a path to your test settings file in the Test Settings box.

enter image description here

Deherrera answered 15/12, 2020 at 15:47 Comment(2)
There is not such a choice in Rider. Neither in VS with Resharper Extension.Footrope
The menu item is still there for me (Rider 2020.3.2) and the test settings area is still there for me but the checkbox is no longer there. I've added a picture to the answer.Deherrera

© 2022 - 2024 — McMap. All rights reserved.