SALES: 1-800-867-1380
Expand Minimize

Publish-AzureWebsiteProject

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Publish-AzureWebsiteProject

Publish a Visual Studio web project to a Microsoft Azure web site using WebDeploy.

Syntax

Parameter Set: Package
Publish-AzureWebsiteProject [[-Name] <String> ] [-Package] <String> [[-ConnectionString] <Hashtable> ] [-Slot <String> ] [ <CommonParameters>]

Parameter Set: ProjectFile
Publish-AzureWebsiteProject [[-Name] <String> ] [-ProjectFile] <String> [[-Configuration] <String> ] [[-ConnectionString] <Hashtable> ] [-Slot <String> ] [ <CommonParameters>]




Detailed Description

Publish a Visual Studio web project to a Microsoft Azure web site using WebDeploy. It can either take a WebDeploy package and publish directly, or take a Visual Studio web project, build the project and publish. It can also replace the connection strings in the Web.config during publish.

Parameters

-Configuration<String>

The configuration used to build the Visual Studio web application project.


Aliases

none

Required?

false

Position?

3

Default Value

Release

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ConnectionString<Hashtable>

The connection strings to use for the deployment.


Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

The web site name.


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Package<String>

The WebDeploy package folder for zip file of the Visual Studio web application project to be published.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ProjectFile<String>

The Visual Studio web application project to be published.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Slot<String>

The web site slot name.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

Build a Visual Studio web project with "Debug" configuration (meaning use Web.Debug.config) and publish to a Microsoft Azure Web Site using WebDeploy.


C:\PS>Publish-AzureWebsiteProject -Name site1 -ProjectFile .\WebApplication1.csproj -Configuration Debug

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

Publish a WebDeploy Pacakge .zip file to a Microsoft Azure Web Site using WebDeploy.


C:\PS>Publish-AzureWebsiteProject -Name site1 -Package .\WebApplication1.zip

-------------------------- EXAMPLE 3 --------------------------

Description

-----------

Publish a WebDeploy Pacakge folder to a Microsoft Azure Web Site using WebDeploy.


C:\PS>Publish-AzureWebsiteProject -Name site1 -Package .\WebApplication1

-------------------------- EXAMPLE 4 --------------------------

Description

-----------

Build a Visual Studio web project, overwrite the "DefaultConnection" connection string in Web.config and publish to a Microsoft Azure Web Site using WebDeploy.


C:\PS>Publish-AzureWebsiteProject -Name site1 -ProjectFile .\WebApplication1.csproj -ConnectionString @{ DefaultConnection = "my connection string" }

-------------------------- EXAMPLE 5 --------------------------

Description

-----------

Build a Visual Studio web project, overwrite the "DefaultConnection" connection string in Web.config and publish to a Microsoft Azure Web Site using WebDeploy. Notice that -DefaultConnection is a dynamic parameter which gets added by parsing Web.config.


C:\PS>Publish-AzureWebsiteProject -Name site1 -ProjectFile .\WebApplication1.csproj -DefaultConnection "my connection string"

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft