Rider 2020.2 mstest v2 not requiring VS

Hi, my favourite part about Rider 2020.2 was that i don't need Visual studio to run MSTestV2 any more, according to the release notes:

"MSTest v2 tests can now be run without Visual Studio installed."

But now I still get the error that i need to add a path to a licensed visual studio to run my tests. What am i missing?

I did a clean install of Rider 2020.2 and i've tried creating a new core project and new mstestv2 project to just try this feature out without but rider does not recognize the tests tagged with mstest syntax as tests at all. 

I have installed the latest mstest.framework and mstest.testadapter from nuget aswell. 

So my question: What stepts do i need to do to make Rider 2020.2 run MSTest v2 without visual studio installed?

 

/Pontus

0
6 comments

Hello Pontus,

I must say that MSTest unit testing should just work in Rider 2020.2 without any additional steps. Just create a new .NET Core Unit Test Project with type MSTest via File -> New, build it and run the tests in Unit Tests tool window (View -> Tool Windows -> Unit Tests).

If you don't see any tests in the Unit Tests tool window after you build your solution, please provide the following information for further investigation:

  1. OS version, for example, Windows 10 or Mac OS X 10.8
  2. JetBrains Rider version: Help -> About
  3. MSBuild version and type that Rider is using: Settings -> Build, Execution, Deployment -> Toolset and Build -> Use MSBuild version
  4. .NET Core version
  5. Also, a sample solution where the issue reproduces would be very much appreciated

Thanks in advance!

0

Hi! 

I did not get it to work with the .net core unit test project, sorry.

To Answer your questions: 

  1. Windows 10
  2. JetBrains Rider 2020.2
    Build #RD-202.6397.244, built on August 10, 2020

    Subscription is active until January 21, 2021
    Runtime version: 11.0.7+10-b944.20 amd64
    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
    .NET Framework 4.0.30319.42000
    Windows 10 10.0
    GC: ParNew, ConcurrentMarkSweep
    Memory: 1466M
    Cores: 4
    Registry: debugger.new.debug.tool.window.view=true, ide.tree.horizontal.default.autoscrolling=false, performance.watcher.sampling.interval.ms=200, ide.borderless.tab.caption.in.title=false, ide.tooltip.showAllSeverities=true, show.diff.preview.as.editor.tab=true, light.edit.file.open.enabled=false, performance.watcher.unresponsive.interval.ms=1000, search.everywhere.settings=true, show.diff.preview.as.editor.tab.with.single.click=true, parameter.info.max.visible.rows=10, ide.win.file.chooser.native=true, vcs.log.show.diff.preview.as.editor.tab=true, search.everywhere.pattern.checking=false, ide.tooltip.initialDelay=0, ide.require.transaction.for.model.changes=false, ide.debug.in.title=true, rdclient.asyncActions=false
    Non-Bundled Plugins: com.microsoft.vso.idea, Abc.MoqComplete.Rider
  3. MSBuild version 16 (Autodetected by Rider: Dotnet/Sdk/3.1.301)
  4. Project: netcoreapp3.1, TestProject: netcoreapp3.1, consoleApp: netcoreapp3.1 ( installed version: dotnet --version: 3.1.301)
  5. https://github.com/PontusAfa/RiderMSTest The sample project just contains a small project with a function, a test project, and a console app to execute the function to see that the project actually compiles and runs. No problem on my side except, of course, no tests can be run. 

Thank you for your help.

/Pontus

0

Hi Pontus,

Thanks for the information! Unfortunately, I didn't manage to reproduce your problem. Everything works fine for me. Could you please reproduce it on your machine, collect Rider logs via Help -> Collect Logs and attach the archive to a new Support request? A screenshot of an error message would also be appreciated. 

Thank you!

0

For anyone who has a similar problem. We've found out that MSTest support was disabled in the user's settings. Previously, Rider had a checkbox for it, but in v2020.2 it is hidden in internal mode.

Here are the steps to enable MSTest support:

  1. Turn on internal mode as described here: https://rider-support.jetbrains.com/hc/en-us/articles/207327910-How-to-run-JetBrains-Rider-in-Internal-Mode
  2. Go to File | Settings | Build, Execution, Deployment | Unit Testing | MSTest -> and turn on Enable MSTest support
0

In Rider 2021.3.2 Enable MSTest support was enabled by default. Still not working.

0

Jaanus Udam, could you please clarify what exactly not working? Can you add an error message if any, a screenshot? Thank you in advance!

0

Please sign in to leave a comment.