针对.NET核心平台项目的TFS构建服务器集成 [英] TFS Build Server Integration For .NET Core Platform Projects

查看:222
本文介绍了针对.NET核心平台项目的TFS构建服务器集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 

我们有一个安装了Visual Studio 2015 Update Package 3的构建服务器。



我们需要通过构建服务器和构建定义来构建.net核心项目。在搜索了如何为.net核心平台项目集成构建服务器之后, 我们了解到应安装Visual Studio 2017或Visual Studio 2017 Build 工具。
在一些论坛帖子中,据说TFS 2017设置是必须能够构建.net核心项目。


是对还是有任何替代解决方案对于此类问题,无需安装TFS 2017

b
$
我们在安装Visual Studio 2017后进行了构建构建服务器,并出现以下错误; 
$


错误MSB4041:项目的默认XML命名空间必须是MSBuild XML命名空间。如果项目是以MSBuild 2003格式创作的,请添加xmlns =" http://schemas.microsoft.com/developer/msbuild/2003"到< Project>元件。
如果项目是用旧的1.0或1.2格式编写的,请将其转换为MSBuild 2003格式。


我检查了 MyProjectName .csproj.user 文件,如下所示;



<?xml version =" 1.0" encoding =" utf-8"?>

< Project ToolsVersion =" 15.0" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003">

  < PropertyGroup>

  &NBSP; < NameOfLastUsedPublishProfile> FolderProfile< / NameOfLastUsedPublishProfile>

  < / PropertyGroup>

< / Project>


该项目是.Net Core 2.0项目。


您可以帮忙解决这个问题的可能解决方案吗?


提前致谢,


最好的问候..


解决方案

如果您使用TFS Build vNext而不是XAML构建,那么您只需从PowerShell中启动.NET Core命令行构建(dotnet构建)任务而不是使用VS Build任务。


您需要在构建代理上安装.NET Core 2.0 SDK。



Hi, 
We have a build server which has Visual Studio 2015 Update Package 3 installed.

We need to build a .net core project via build server with a build definition. After searching about how to integrate build server for .net core platform projects,  we learned that Visual Studio 2017 or Visual Studio 2017 Build Tools should be installed. In a few forum posts, it is said that TFS 2017 setup is a must to be able to build .net core projects.

Is it right or is there any alternative solution for this type of problem without having to install TFS 2017 ?

We made a build after installing Visual Studio 2017 on our build server, and got the following error; 

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.

I've checked the MyProjectName.csproj.user file, it is as follows;

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
  </PropertyGroup>
</Project>

The project is .Net Core 2.0 project.

Could you please help about the possible solution of this problem ?

Thanks in advance,

Best Regards..

解决方案

if you're using TFS Build vNext and not XAML build than you can just start the .NET Core command line build (dotnet build) from within a PowerShell task instead of using a VS Build task.

you need to install .NET Core 2.0 SDK on the build agent.


这篇关于针对.NET核心平台项目的TFS构建服务器集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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