使用VSTS在Xamarin解决方案中单独构建Web应用程序后端 [英] Build separately a web app backend in a Xamarin solution using VSTS

查看:76
本文介绍了使用VSTS在Xamarin解决方案中单独构建Web应用程序后端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

获得了一个Xamarin解决方案,其中包括一个用于Web应用程序后端的项目. 尝试为Web应用程序后端设置单独的生成定义,以便将其部署到Azure应用程序服务.我们在Xamarin解决方案文件夹中有该API应用程序文件夹.

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.

当尝试手动映射以构建Web应用程序时,它尝试构建整个解决方案失败,而只能在我使用MSBuild任务并将其指向该文件夹中的csproj文件时构建该项目.

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. 使用/t:[项目名称] MSBuild自变量构建解决方案(例如,Visual Studio Build步骤;解决方案:*****.sln **; MSBuild自变量:/t:ConsoleApplication1 ;平台: $(BuildPlatform);配置:$(BuildConfiguration)))
  2. 直接为Visual Studio Build或MSBuild步骤/任务指定项目文件. (例如,Visual Studio Build;解决方案:[project file (csproj) path]; MSBuild参数:/p:OutputPath="bin\$(BuildConfiguration)\\"平台:$(BuildPlatform);配置:$(BuildConfiguration))
  1. Build solution with /t:[projectname] MSBuild arguments (e.g. Visual Studio Build step; Solution: *****.sln**; MSBuild Arguments: /t:ConsoleApplication1; Platform: $(BuildPlatform); Configuration: $(BuildConfiguration)))
  2. 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))

这篇关于使用VSTS在Xamarin解决方案中单独构建Web应用程序后端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆