Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReSharper: "The build could not be started. There are multiple projects in the solution at..."

When trying to run NUnit tests with ReSharper, the following message appears in a dialog box and the tests are not run:

The build could not be started. There are multiple projects in the solution at... <name of the csproj file>

I have this problem with Resharper 8.2.1 I have several projects in my solution. Most of the projects are class libraries. One of the projects is a Web Site (not project exactly). Another one is a Web Application. The Web Site and the Web Application projects are located in the same directory. The Web Site is set to be built only in the Release build.

I have this problem only in The Web Application project, when I try to run some embedded tests in this project. I do not have this problem in other (class library) projects.

The problem was in JetBrains' bug tracker, but was closed: https://youtrack.jetbrains.com/issue/RSRP-328627

Perhaps there some workaround?

Update: When I "Project -> Unload Project" on the Web Site, the problem disappears

like image 531
Andrej Adamenko Avatar asked Oct 28 '14 04:10

Andrej Adamenko


2 Answers

I had the same problem (also with 8.2), at least the same error when running my tests through the menu Resharper > Unit Tests > Run All Tests from Solution. But I found the following work around :

Right click on your unit testing project and select Run Unit Tests. this will start running all the tests from the project (from the resharper interface)

Alternatively you can set up you unit testing solution as start up project and from the Resharper menu choose > Unit Tests > Run Unit Tests

Of course you have to do it for each project that has unit tests, but I guess this is acceptable.

Remark: it seems to be a known bug of version 8.2 https://youtrack.jetbrains.com/issue/RSRP-411631 And that rolling back to 8.1 can fix the problem

Hope this helps.

like image 170
Wasabi Avatar answered Sep 20 '22 15:09

Wasabi


In my case this happened after running performance analysis (i.e. profiling) in Visual Studio.

As documented here, the solution was to remove these lines from the .sln file:

GlobalSection(Performance) = preSolution
    HasPerformanceSessions = true
EndGlobalSection}
like image 31
Matthew Strawbridge Avatar answered Sep 17 '22 15:09

Matthew Strawbridge