|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
Deploying an Application
The .NET Framework provides several basic features that make it easier to deploy a variety of applications. This includes ClickOnce deployment.
The following basic .NET Framework features help make deployment easier:
Controlled code sharing
Partially trusted code
For more information, see .NET Framework Deployment Features.
Deployment is the process by which you distribute a finished application or component to be installed on other computers. In Visual Studio, deployment can be done based on Microsoft Windows Installer technology or on ClickOnce technology. For more information, see Choosing a Deployment Strategy.
An application can be packaged as a single assembly, as a collection of assemblies, as cabinet (CAB) files, as a Microsoft Windows Installer 2.0 package, or as an installer package in another format. For more information, see Deployment Scenarios for .NET Framework Applications.
An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. Assemblies form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions, and they provide the common language runtime (CLR) with the information it must have to be aware of type implementations.
This table shows common deployment tasks.
Create an assembly
Sign an assembly with a strong name
Sign an assembly, but defer assigning a private key until a later time
Create a public/private key pair to use in creating a strong name
View binding information in the log file
Deploy a Windows Forms control
Deploy an application for COM access
Deploy a .NET Framework application
Versioning, which records the specific version of an assembly and the versions of dependent assemblies in the assembly's manifest, is performed only on assemblies with strong names. Strong-named assemblies have identifiers that consist of the assembly's identity plus a public key and a digital signature.
By default, the CLR attempts to locate and bind with the exact version of the assembly that the application was built with, although this behavior can be overridden by configuration file settings.
ClickOnce deployment enables you to publish Windows applications to a Web server or network file share for simplified installation. When you want to publish a Windows application to a network server, Visual Studio automatically generates the XML manifest files necessary for ClickOnce and publishes the application to the specified server.
ClickOnce applications are self-contained and install on a per-user basis, which means no administrative rights are required. Applications deployed using ClickOnce technology run with a limited set of permissions based on a security zone. For more information, see ClickOnce Deployment and Security.
ClickOnce applications can be self-updating; you can control when and how updates are deployed.
This table shows tasks associated with ClickOnce deployment.
Choose which ClickOnce deployment strategy (installing from the Web or a network share, installing from CD, or starting from the Web or a network share) to use with your application
Choose which ClickOnce update strategy to use with your application
Deploy a ClickOnce application
Choose whether to use a ClickOnce data directory, isolated storage, or other local files when reading and writing data
Discover what prerequisites must be met before successfully deploying an application
Specify an alternate location for deployment updates
Elevate a ClickOnce application's permission level on a client computer
Difficulties when you deploy applications by using ClickOnce may be caused by HTTP compression issues, manifest parsing issues, server configuration issues, and versioning issues. For more information, see Troubleshooting ClickOnce Deployments.
Microsoft Windows Installer technology creates installers that give you complete control over the installation process.
This table shows tasks associated with Windows Installer deployment.
Distribute files or applications on CD-ROM or other media
Create a new setup project or add an existing deployment project to a solution
Create a new .cab file for Web download or add an existing one to a solution
Create a merge module for a component
Deploy a Windows-based application to another computer
Create a custom action to send a user to a Web site following installation
Pass data to a dynamic property during installation using a custom action
Use a custom action to pre-compile an assembly during installation
Use a custom action to create a database during installation
Create a Web application that can be redirected to target a different XML Web service
Deploy files and applications to a Web server