Name: websdk
Owner: ASP.NET
Description: MSBuild tasks and targets required for publishing ASP.NET applications
Created: 2016-07-22 00:01:25.0
Updated: 2018-05-21 21:39:35.0
Pushed: 2018-05-21 21:39:34.0
Homepage: null
Size: 2374
Language: C#
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
ASP.NET websdk repo contains the tasks, targets and packages required to build and publish Web Applications.
The websdk repo contains code for the following packages
Project System package defines the following:
Publish package contains the tasks and targets to publish an ASP.NET core web application.
The following Publish methods are currently supported by the Publish package:
Publish CommandLine Usage:
using MSBuild (without a profile)
ild WebApplication.csproj /p:DeployOnBuild=true /p:PublishUrl="C:\deployedApp\newapp"
using dotnet (without a profile)
et publish WebApplication.csproj /p:PublishDir="C:\deployedApp\newapp"
Profile can be added to the following location in the project /Properties/PublishProfiles/
Using MSBuild (with a profile)
ild WebApplication.csproj /p:DeployOnBuild=true /p:PublishProfile=<FolderProfile>
Using dotnet (with a profile)
et publish WebApplication.csproj /p:PublishProfile=<FolderProfile>
Using MsBuild (with the default profile)
ild WebApplication.csproj /p:DeployOnBuild=true /p:WebPublishMethod=MSDeploy /p:MSDeployServiceURL=<msdeployUrl> /p:DeployIisAppPath=<IISSiteName> /p:UserName=<username> /p:Password=<DeploymentPassword> /p:PublishProfile=Default
Using dotnet (with the default profile)
et publish WebApplication.csproj /p:WebPublishMethod=MSDeploy /p:MSDeployServiceURL=<msdeployUrl> /p:DeployIisAppPath=<IISSiteName> /p:UserName=<username> /p:Password=<DeploymentPassword> /p:PublishProfile=Default
Profile can be added to the following location in the project /Properties/PublishProfiles/
Using MsBuild (with a profile)
ild WebApplication.csproj /p:DeployOnBuild=true /p:PublishProfile=<MsDeployProfile> /p:Password=<DeploymentPassword>
Using dotnet (with a profile)
et publish WebApplication.csproj /p:PublishProfile=<MsDeployProfile> /p:Password=<DeploymentPassword>
Using MsBuild (with the default profile)
ild WebApplication.csproj /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PublishProfile=Default
Using dotnet (with the default profile)
et publish WebApplication.csproj /p:WebPublishMethod=Package /p:PublishProfile=Default
Profile can be added to the following location in the project /Properties/PublishProfiles/
Using MsBuild (with a profile)
ild WebApplication.csproj /p:DeployOnBuild=true /p:PublishProfile=<MsDeployPackage>
Using dotnet (with a profile)
et publish WebApplication.csproj /p:PublishProfile=<MsDeployPackage>
l version="1.0" encoding="utf-8"?>
ject ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<PublishProvider>FileSystem</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<publishUrl>bin\Release\PublishOutput</publishUrl>
<DeleteExistingFiles>False</DeleteExistingFiles>
PropertyGroup>
oject>
l version="1.0" encoding="utf-8"?>
ject ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
ropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<PublishProvider>AzureWebSite</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>http://webappwithdb.azurewebsites.net</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<MSDeployServiceURL>webappwithdb.scm.azurewebsites.net:443</MSDeployServiceURL>
<DeployIisAppPath>webappwithdb</DeployIisAppPath>
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>$vramakwebappwithdb</UserName>
<Password>DeployPassword</Password>
PropertyGroup>
oject>
l version="1.0" encoding="utf-8"?>
ject ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
ropertyGroup>
<WebPublishMethod>Package</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<DesktopBuildPackageLocation>c:\DeployedApp\WebDeployPackage.zip</DesktopBuildPackageLocation>
<DeployIisAppPath>Default Web Site/WebAppWithDB</DeployIisAppPath>
PropertyGroup>
oject>
l version="1.0" encoding="utf-8"?>
ject ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
ropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<PublishProvider>AzureWebSite</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>http://webappwithdb.azurewebsites.net</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<MSDeployServiceURL>webappwithdb.scm.azurewebsites.net:443</MSDeployServiceURL>
<DeployIisAppPath>webappwithdb</DeployIisAppPath>
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>$vramakwebappwithdb</UserName>
<Password>DeployPassword</Password>
PropertyGroup>
temGroup>
<DestinationConnectionStrings Include="ShoppingCartConnection">
<Value>Data Source=tcp:dbserver.database.windows.net,1433;Initial Catalog=shoppingcartdbdb_db;User Id=appUser@dbserver;Password=password</Value>
</DestinationConnectionStrings>
ItemGroup>
temGroup>
<EFMigrations Include="ShoppingCartContext">
<Value>Data Source=tcp:dbserver.database.windows.net,1433;Initial Catalog=shoppingcartdbdb_db;User Id=efMigrationUser@dbserver;Password=password</Value>
</EFMigrations>
ItemGroup>
oject>
Sample to prevent files from being published:
mGroup>
<Content Update="wwwroot/images/*.svg" CopyToPublishDirectory="Never" />
emGroup>
Sample to skip specific folders and files during Web Deploy Publish:
mGroup>
<MsDeploySkipRules Include="CustomSkipFolder1">
<ObjectName>dirPath</ObjectName>
<AbsolutePath>wwwroot</AbsolutePath>
</MsDeploySkipRules>
<MsDeploySkipRules Include="CustomSkipFolder2">
<ObjectName>dirPath</ObjectName>
<AbsolutePath>wwwroot\\Content$</AbsolutePath>
</MsDeploySkipRules>
<MsDeploySkipRules Include="CustomSkipFile1">
<ObjectName>filePath</ObjectName>
<AbsolutePath>Views\\Home\\About.cshtml</AbsolutePath>
</MsDeploySkipRules>
<MsDeploySkipRules Include="CustomSkipFile2">
<ObjectName>filePath</ObjectName>
<AbsolutePath>Views\\Home\\About2.cshtml</AbsolutePath>
</MsDeploySkipRules>
emGroup>
Sample to Add Pre-Publish and Post-Publish extensibility:
arget Name="CustomActionsBeforePublish" BeforeTargets="BeforePublish">
<Message Text="Actions BeforePublish" Importance="high" />
Target>
arget Name="CustomActionsAfterPublish" AfterTargets="AfterPublish">
<Message Text="Actions AfterPublish" Importance="high" />
Target>