使用TFS 2017构建和部署.NET核心2.0项目 [英] Build and deploy .NET core 2.0 projects using TFS 2017

查看:442
本文介绍了使用TFS 2017构建和部署.NET核心2.0项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我们已经安装了TFS 2017.在构建服务器上,我们安装了VS 2015。我们的开发人员安装了VS 2017,现在我们正在尝试构建.NET核心应用程序。这是我们第一次涉足.NET核心。本地构建的应用程序在VS 2017上是在开发人员计算机上安装的
但是当我们尝试构建代码作为CI构建的一部分时,构建失败。我们使用Visual Studio build来构建/打包解决方案,发布步骤将包和安装到目标服务器中。 

We have on-premise installation of TFS 2017. On the build server we have VS 2015 installed. Our developers have installed VS 2017 and now we are trying to build .NET core apps. This is our first foray into .NET core. The apps build locally as VS 2017 is installed on the developer machines but when we attempt to build the code as a part of CI builds the build fails. We use Visual studio build to build / package the solution and the release steps takes the package and installs into the the target servers. 

Trunk\xxxxxx.csproj (1, 1)
Trunk\xxxxxx.csproj(1,1): Error MSB4041: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.

我不知道这是因为我们没有安装visual studio 2017在我们的构建服务器上? 

I wonder is this because we don't have visual studio 2017 installed on our build server? 

我可以问一下使用TFS 2017构建/部署.NET核心2.0项目的推荐方法是什么?

Can I ask what is the recommended approach to building / deploying .NET core 2.0 projects using TFS 2017?


  • 安装VS 2017?我们已经在构建服务器上安装了VS 2015。 VS 2015和VS2017可以在构建服务器上并存,并且VS构建步骤会在2017年上升吗?


  • 或者我们应该在构建服务器上安装.NET core 2.0 SDK,然后使用命令行实用程序作为构建步骤的一部分,详见https://www.visualstudio.com/en-us / docs / build / apps / aspnet / ci / build-aspnet-core#qa如下所示
  • 或者我们是否应该开始使用MSBUILD而不是VS工作室构建并在builld服务器上安装MSBuild for VS 2017 - >  https://www.visualstudio。 com / downloads /#build-tools-for-visual-studio-2017如下所示

谢谢,

Venky

Venky V。,

推荐答案

Hi Venky,

Hi Venky,

感谢您在此发帖。

是的,您需要在TFS构建代理服务器上安装.netcore 2.0和  Visual Studio 2017。 .netcore项目是在VS 2017中创建的,因此当您在构建代理服务器上构建时,您还需要VS 2017和.netcore 2.0。

Yes, you need to install .netcore 2.0 and Visual Studio 2017 on TFS build agent server. The .netcore project is created in VS 2017, so when you build on build agent server, you also need VS 2017 and .netcore 2.0 on it.

您可以参考的另一个案例:
https://stackoverflow.com/questions/45993166/how-to-build-asp-net-core-2-app-in-tfs

Another case you could refer to: https://stackoverflow.com/questions/45993166/how-to-build-asp-net-core-2-app-in-tfs

祝你好运,


这篇关于使用TFS 2017构建和部署.NET核心2.0项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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