Dileep Kumar
Dileep Kumar

Reputation: 31

Can we publish an Asp.net web application using VSTS online continuous integration

I'm using VSTS online and having a web application. While doing Continuous Integration I'm able to build my project in the repository and able to apply triggers to build my app on every checkin done.

Steps used: 1. Get Source 2. NuGet Restore 3. Build Solution 4. Publish Artifact 5. Publish symbols 6. Copy publish artifact

In fourth step, my application is not getting published to the specified folder and while doing a release the artifact is empty and getting empty artifact error.

Upvotes: 0

Views: 238

Answers (1)

Marina Liu
Marina Liu

Reputation: 38116

First, you should adjust build task steps as:

1. Get Source 
2. NuGet Restore 
3. Build Solution 
4. Publish symbols 
5. Copy publish artifact 
6. Publish Artifact

Copy publish artifact task must ahead of Publish Artifact task, because step5 copy file to $(build.artifactstagingdirectory) directory, and step6 publish artifact from $(build.artifactstagingdirectory).

Second, for asp.net web application, the build results have no such directory **\bin\$(BuildConfiguration)\** (**\bin\Debug\** or **\bin\Release\**), so you should specify the contents of Copy file task as **\bin\** or the detail type of files.

enter image description here

Upvotes: 1

Related Questions