I am using Azure DevOps pipelines to build and deploy my applications. So far, I have only worked with single-projects that open in Visual Studio Code. Now I am trying to create builds for older .NET Framework Visual Studio solutions. The way we have always organized our Visual Studio Solutions is having a .Core project (referenced by each of the other application projects in the solution), and then one project per application (i.e., a Web app, one or more Console apps, and possibly some Windows Services). When I use VSBuild@1 to build my solution, it seems to build all projects in the solution, but it only seems to publish artifacts for the Web app project. Does anyone know the best practice for dealing with multi-application solutions such as mine in YAML pipelines? Basically, I want the build to generate an artifact for each application.
Question posted in Visual Studio Code
View the official documentation.
View the official documentation.
2
Answers
I ended up using separate MsBuild steps to build each project. Below is the complete pipeline I have so far, which will generate an artifact for my Web project, as well as an artifact for my ConsoleApp project. Any feedback as to any other issues is greatly appreciated. Note that I use a custom build number and I did not clean up the variables and/or their usage.
Julie explains a some what similar situation on her blog:
https://julie.io/writing/monorepo-pipelines-in-azure-devops/
The repos I have come across with multi project solutions and artifacts always have multiple yamls in them.
Furthermore publishing and using these artifacts are more a architectural choice with several options found here.
Edit
After reading your comment a manual solution could be copying the builds from every referenced project (in the example only one), but you are looking for a more automated way I guess: