0

How do you go about setting up the build / publish for an ASP.NET web site (not a compiled application).

I have a classic simple site with primarily static assets. The only reason for the site is an aspx page that is used for a contact form email.

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
JDBennett
  • 1,323
  • 17
  • 45

2 Answers2

1

Simple steps:

  1. Install IIS Web App Deployment Using WinRM extension if you want to deploy app to your web server
  2. Create new build definition with Asp.Net Build (PREVIEW) template (select ASP.NET Build PREVIEW template when create build definition)
  3. Add Windows Machine File Copy step to copy files to your web server

enter image description here

  1. Add WinRM-IIS Web App Management step to create or update web site in IIS

enter image description here

  1. Add WinRM-IIS Web App Deployment step to deploy app to web site (step 4)

enter image description here

You also can refer to this thread: Automated Deployement of ASP.Net MVC Website In IIS server with a Continuous Deployment

If you want to deploy app to azure, you can add Azure App Service Deploy step to deploy your app to azure (do not install previous extension and remove step 3, 4, 5)

You also can refer to this article: Deploy ASP.NET apps to Azure web apps

Community
  • 1
  • 1
starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53
0

What I was looking for was publishing a ASP.NET 2.0 Web Site (not an application that requires a build).

It ended up being pretty easy. I have mostly static files, but there is one aspx page for that is used for a contact form. I followed this solution but tweaked it a bit.

All I needed to do was add the npm and gulp task. My gulp task does as the answer suggests - copies all of my pertinent files to a folder called dist. From there, I copy everything from the dist directory to the $(Build.ArtifactStagingDirectory).

Then it is just a matter of publishing the $(Build.ArtifactStagingDirectory) to the server (a drop directory similar to the examples of building an MVC app).

I wired in the release for CI / CD.

Community
  • 1
  • 1
JDBennett
  • 1,323
  • 17
  • 45