Publish for Non Web Projects using MSBuild

VENKATESH 21 Reputation points
2022-04-13T15:00:33.613+00:00

I have a VS 2019 solution which has C# Console Application, Windows Application and Web Application projects. For all these projects, we have added a Publish Profile (say FolderProfile) based on File System Protocol. From VS Dev Command line, we use msbuild to build the solution where we have a Directory.Build.props file which has a property (say OutputLocation) to publish the artifacts from all the projects with subfolders specified in the publish profile. When we run msbuild with the following args, we can see published output only from the web application projects, but not from the windows or console application projects.

msbuild MySln.sln -t:clean,build /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderPublish

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,211 questions
{count} votes