I have a command-line client written C# targeting .net core 2.2 (not an asp.net core, just a command-line app).
I'm trying to distribute that application to a group of servers using Azure DevOps pipelines.
Unfortunately, I cannot get the Visual Studio build action to create a complete package.
To deploy using the locally compiled package, I create a publish "Folder" profile that works fine. I hoped to be able to tell the action to do the same and copy the result to the Artifact Staging directory but, unfortunately, it does not seems to work.
I'm using the following MSBuild arguments:
/p:SkipInvalidConfigurations=true /p:DeployOnBuild=true /p:PublishProfile="FolderProfile"
The profile is defined as such:
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.2</TargetFramework>
<PublishDir>..\ClientPublish\</PublishDir>
<SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>
</PropertyGroup>
</Project>
From what I can see in the compilation log, the "DeployOnBuild" parameter is simply ignored and the application is never deployed.
What am I doing wrong ?
Edit
Here is a screenshot of my most recent attempt using a deployment profile:
Copy file: And artifact publish:
Alternatively, I tried it like this after disabling the file copy task: