Build Web API project publishing in Visual Studio Team Services (was VS Online)

I created a VS assembly definition in Team Services. The build succeeds when I queued it, and also displays the DLL for all the projects in the solution, except for the service level that I created using Web Api2.

when I load artifacts from a drag location, I have folders containing DLLs for the data layer, business layer and other supporting projects. What I don't have is a core service level DLL that I can install on my IIS.

Here is a screenshot of my posting settings.

enter image description here

What can i skip?

+5
source share
2 answers

It seems that you are using the default settings to define the assembly. With these settings, the contents for the Copy Files task is "** \ bin \ $ (BuildConfiguration) **", while the api web project does not have a configuration configuration folder. Therefore, he cannot find the files for the web api project. To copy these files, add another Copy Files task and configure the settings as follows: enter image description here

If you need deployment files for the project, you need to set the assembly definition as follows:

  • Add the arguments /p:DeployOnBuild=true;OutDir="$(build.artifactstagingdirectory)" for the Visual Studio Build step.
  • Delete the Copy Files step.
  • Set the publishing path to $(build.artifactstagingdirectory)\\_PublishedWebsites for the Publish Build Artifacts step.

Then you should get the deployment files in the drop folder.

+11
source

Open Configuration Manager in VisualStudio and make sure that the WebAPI project is enabled for the configuration (Debug, Release, etc.) that you are building.

enter image description here

0
source

Source: https://habr.com/ru/post/1242009/


All Articles