Reputation: 410
With the absolute plethora of configuration files, you'd think I could find this, but so far no luck.
I can publish to my cluster just fine. I right-click on the fabric project, and select publish. I then select the publish profile and I'm on my way.
The problem is that it always publishes the build as configured in the current drop-down menu for Build Configurations. When I used the "old fashioned" cloud services, the publish profile included a build configuration.
This is kind of a problem for me, because, while I don't make a mistake in selecting the publish profile, it's quite easy to forget to set the correct build configuration beforehand.
So, is there a way to select a publish profile designed for a specific build configuration?
I'm not looking to automatically pick a publish profile. What I want is, when I do pick a publish profile, that a specific build configuration is used for it.
Upvotes: 0
Views: 280
Reputation: 11470
No. You need to switch the local dev cluster from 1 to 5 nodes or v.v. and change the bld configuration accordingly.
I recommend you do not publish from VS to production cluster directly, but rely on a CI/CD pipeline instead. For example look at this document, that explains how to set up such a pipeline in Azure DevOps (VSTS). In the release pipeline definition, you'd specify which publish profile should be deployed.
Among many other advantages, using this approach allows you to collaborate on a solution, have reviews and tests on your code before it's committed, built and deployed. This lowers the chances of deploying incorrect artifacts to the cluster.
If you require the ability to publish from your dev box, look at using a PowerShell script to build and package your solution and deploy the application package.
Upvotes: 3