问题
Got a Xamarin solution which includes a project for a web app backend. Trying to set up a separate build definition for the web app backend so that it deploys to Azure app service. We have that API app folder inside the Xamarin solution folder.
When trying manual mapping to build the web app it fails as it tries to build the whole solution while it should only build that project as I used MSBuild task and pointed it to the csproj file in that folder.
How can we get that specific folder to build separately?
回答1:
There are two ways to just build a project:
- Build solution with /t:[projectname] MSBuild arguments (e.g. Visual Studio Build step; Solution: *****.sln**; MSBuild Arguments: /t:ConsoleApplication1; Platform:
$(BuildPlatform);
Configuration:$(BuildConfiguration)
)) - Specify the project file directly for Visual Studio Build or MSBuild step/task. (e.g. Visual Studio Build; Solution:
[project file (csproj) path];
MSBuild Arguments:/p:OutputPath="bin\$(BuildConfiguration)\\"
Platform:$(BuildPlatform);
Configuration:$(BuildConfiguration))
来源:https://stackoverflow.com/questions/42897988/build-separately-a-web-app-backend-in-a-xamarin-solution-using-vsts