How can I rename Publish Profile in Visual Studio 2017?
Visual Studio 2017 Version >= 15.3
In Visual Studio 2017 Version 15.3 you can rename the publish profile. Here are steps to rename a publish profile:
Click on Edit Publish Profile button (gear icon ) on Publish toolbar.
In the Publish page, from the drop-down that contains profiles, choose the profile that you want to rename.
In the Summary section OR Under the Actions dropdown () , Click Rename profile... link.
In the Rename Profile window, enter the new name and click Save button.
The profile name will be changed immediately and if you open the drop-down menu, you will see the new name for the profile.
If you are using a version lower than 15.3, then you can upgrade to 15.3 or read the next part of the answer.
Workaround for Visual Studio 2017 Version < 15.3
Publish profiles are .pubxml
files and Visual Studio 2017 shows a list of file names in Publish toolbar.
To change name of publish profile, you should change file name and then unload and reload project.
Here are the steps to rename publish profile:
- Go to Solution Explorer → Project → Properties → PublishProfiles
- Choose the file which you want to rename it and rename it.
- Right click on Project and choose Unload Project
- Right click on Project and choose Reload Project
When publishing a console app, the option is a bit hidden away: