简体   繁体   中英

How to customize “ASP.NET CORE (Full framework)” build definition template for a solution with multiple web apps and deploy each on Azure

I have a solution with 4 Asp.Net Core (full framework) web apps inside. How can you create the structure of the Artifacts Explorer shown in the image posted here by Donovan Brown if you create a new Build Definition using the VSO template "ASP.NET CORE (.NET Framework).

The template contains a Visual Studio Build (version 1*) task with MSBuildArguments "/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactstagingdirectory)\\WebApp.zip" /p:DeployIisAppPath="Default Web Site" "

This creates a single WebApp.zip with all the web apps in the solution.

I want to have a zip file for every web app in the solution so that I can create Release definitions for each web app using the Azure deployment teamplate.

Thank you

You can create packages of web apps by using publish profiles with the same name.

  1. Right click the project > Publish >Create a publish profile (Custom)
  2. Select Web Deploy Package
  3. Specify relative path in Package location (eg ..\\..\\a\\Web1 )
  4. Other settings
  5. After that, you can specify /p:DeployOnBuild=true /p:PublishProfile="[profile name]" in MSBuild Arguments of Visual Studio Build task.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM