Reputation: 1403
I have a Service Fabric project with multiple services. When i try to deploy it, i get the following error:
The active solution configuration is not configured to build or deploy the Service Fabric Application Project. This can happen if the solution configuration is not configured to build/deploy the x64 platform which the project requires.
Upvotes: 20
Views: 10413
Reputation: 39089
Another possible cause: The name you pass to RegisterServiceAsync
is already in use by another service deployed on that cluster (copy-paste-error?).
Upvotes: 0
Reputation: 176
The problem is caused by an incorrect project-type GUID in the .sln file. The line stating:
Project("{guid}") = "YourCode.Tests", ...
will have the wrong guid on it.
This happened for me when upgrading MSTest projects from .NET Framework to .NET 5.0.
Easiest solution is to go into Visual Studio Configuration Manager, and change the Configuration dropdown on the affected project from Debug to Release and then back to Debug again. You will see that the project guid is changed in the SLN file to match the project type and it will start working.
Upvotes: 2
Reputation: 1403
Possible cause 1:
Check in the Configuration Manager
for the proper platforms to be set for the projects(x64
is required for Service Fabric
). For me that was already correct.
Possible cause 2:
Still in Configuration Manager
, check if you have multiple Project contexts for which you can Deploy and all check boxes are unchecked. If yes, select the project you want to deploy and then try deploying again.
Possible cause 3:
Make sure the project(s) you have set to Deploy is(are) Set As Startup Project(s)
. And in Configuration Manager
the checkboxes Build and Deploy are ticked for this project.
Upvotes: 63
Reputation: 6921
The Service Fabric project has to be set as startup project and it's configuration has to look like below: Service Fabric project(right click) >>> Properties >>> Configuration Manager
Upvotes: 5