visual-studiovisual-studio-2022defaultpublishprofile

Visual Studio 2022 - Multiple Publish Profiles - Publishing a file using context menu


In VS 2022, Right-clicking any file in my project (html, js.. et) it gives me an option to "Publish" it. I also have multiple profiles in under Properties>PublishProfiles.

If I publish entire project, it's simple.. I select the appropriate profile from Publish interface, but if I right click on any file and choose "Publish", it never asks me where to publish to. It just publishes and the output appears to be meaningless.. can't tell where it goes:

06:21:34:192    Preparing to publish files...
06:21:52:442    Using ID '1ddd2b24-0de2-489e-a3a8-19da405253af' for connections to the remote server.
06:21:53:460    Using ID '38d44861-870c-4738-a1e7-72ce9b352155' for connections to the remote server.
06:21:54:622    Your file(s) have been successfully published.

Is there an option to set default profile? How do I tell where my file is being published to and why does it show 2 IDs in the output?

Thanks!

Dug through all the menu options. Do not see an option to set default profile. Do not see an option to choose profile when deploying a single file via right-click.


Solution

  • No. It's not possible to set a "default" profile. It will always use the picked publish profile for the project (You change this by right-clicking the project and click "Publish...") when publishing specific files.