Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
To make a ClickOnce application available to users, you need to publish the app to a file share or path, FTP server, or removable media. You can publish the application by using the Publish Wizard. Extra publishing properties are available in the Publish page of the Project Designer. For more information, see Publishing ClickOnce applications.
Before you run the Publish Wizard, you should set the publishing properties appropriately. For example, you can designate a key to sign your ClickOnce application in the Signing page of the Project Designer. For more information, see Secure ClickOnce applications.
When you install multiple versions of an application by using ClickOnce, the installation moves earlier versions of the application into a folder named Archive, in the publishing location that you specify. Archiving earlier versions in this manner keeps the installation directory clear of folders from the earlier version.
Note
The dialogs and menus you see might differ from the UI described in this article, depending on your active settings or edition. To change your settings, select Import and Export Settings on the Tools menu. For more information, see Reset all settings.
Publish to file share or path
In Solution Explorer, select the application project.
On the Build menu, select either Publish Projectname or Publish Selection, which opens the Publish Wizard.
Note
In ClickOnce for .NET Core 3.1 and .NET 5 or later, you set deployment properties using the Publish tool instead of the Publish wizard and the Publish page of the Project Designer. For more information, see Deploy a .NET Windows application using ClickOnce and ClickOnce for .NET.
In the Where do you want to publish the application? page of the Publish Wizard, enter a valid FTP server address or a valid file path by using one of the formats shown, and then select Next.
In the How will users install the application? page, select the location for user installation of the application:
To enable user installation from a web site, select From a Web site. Enter a URL that corresponds to the file path entered in the previous step. This option is typically used to specify an FTP address as the publishing location. Direct download from FTP isn't supported, so you have to enter a URL for this option.
To enable user installation directly from the file share, select From a UNC path or file share. Enter a UNC path or file share that corresponds to the file path entered in the previous step. This option is for publishing locations of the form c:\deploy\myapp or \\server\myapp.
To enable user installation From a CD-ROM or DVD-ROM, follow the steps in the next section.
Select Next to continue.
In the Will the application be available offline? page, select the appropriate option:
To allow the application to run when the user is disconnected from the network, select Yes, this application is available online or offline. Visual Studio adds an application shortcut on the Start menu.
To run the application directly from the publish location, select No, this application is only available online.
Select Next to continue.
To publish the application with your settings, select Finish.
Visual Studio displays the publishing progress in the status notification area.
Publish to CD-ROM or DVD-ROM
In Solution Explorer, right-click the project and select Properties, which opens the Project Designer.
In the Project Designer, select the Publish tab, and then select Publish Wizard.
In the Where do you want to publish the application? page of the Publish Wizard, enter a valid FTP server address or a valid file path by using one of the formats shown, and then select Next.
In the How will users install the application? page, select From a CD-ROM or DVD-ROM, and then select Next.
Note
You can configure the installation to run automatically when the user inserts the CD-ROM into the drive.
If you distribute your application on CD-ROM, you can provide updates from a web site. In the Where will the application check for updates? page, select an update option:
To enable the application check for updates, select The application will check for updates from the following location. Enter the post location for the updates, such as a file location, web site, or FTP server.
For no application check for updates, select The application will not check for updates.
Select Next to continue.
To publish the application with your settings, select Finish.
Visual Studio displays the publishing progress in the status notification area.
Note
After publishing completes, use a CD/DVD rewriter to copy the files from the Where do you want to publish the application? location to the CD-ROM or DVD-ROM media.
Configure automatic installation
When you enable user installation from a CD-ROM or DVD-ROM, you can configure the process to run automatically when the user inserts the CD-ROM into the drive.
In the Project Designer, select the Publish tab.
Select Options, which opens the Publish Options wizard.
In the Publish Options wizard, select the Deployment tab.
Select the For CD installations, automatically start Setup when CD is inserted option.
To apply the change, select OK.
In the Project Designer, select the Publish tab.
Select Options, which opens the Publish Options wizard.
Select the For CD installations, automatically start Setup when CD is inserted option.
To apply the change, select OK.