- Make sure that Visual Studio is building the required Debug or Release version of your application. If necessary, change the
build configuration setting on the toolbar.
- Right-click the project in Solution Explorer and click
Publish.
The
Publish dialog box is displayed.
- If a profile does not already exist for the platform that your application targets, create one:
- Click
New Profile.
The
New Profile dialog box is displayed.
- Specify the folder where your application is to be published, then click
Save.
- If you are only publishing to one platform you don't need to change the default value in
Choose a folder.
- If you are going to be publishing to more than one platform, update the folder specified in
Choose a folder to specify a subfolder that identifies the target platform. For example, if you are publishing to 32-bit Windows you could
append "win-x86" to the file path.
- Give the profile a meaningful name:
- Click
.
The
Rename Profile dialog box is displayed.
- Specify a name that identifies the target platform, then click
Save.
- Specify the details of the application deployment:
- Click
Configure.
The
Profile Settings dialog box is displayed.
- Specify the details for the deployment:
- Select
Self-contained or
Framework Dependent in the
Deployment Mode list box.
- Select the required options from the other list boxes.
- Click
Save.
- Select the profile to publish, then click
Publish.
Note: You can also publish a .NET project using the
dotnet publish command. See
To publish a .NET project using the command line for more information.