使用TFS 2018 Update 3.2构建/发布.NET Core 3.x应用程序 [英] Build/Publish .NET Core 3.x application with TFS 2018 Update 3.2

查看:51
本文介绍了使用TFS 2018 Update 3.2构建/发布.NET Core 3.x应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用.NET Core 3.1的应用程序,但是在.NET Core Build和Publish任务中,下拉菜单仅提供'til 2.x版本.

I have an application that uses .NET Core 3.1 but in .NET Core Build and Publish tasks, the dropdown menu offers only 'til 2.x version.

我应该如何使用它们,或者采用什么解决方法?简单的CLI?

How am I supposed to use them or what workaround instead? Simple CLI?

预先感谢

@帕特里克.NET核心任务是这样吗?

@Patrick .NET Core Task is this right?

但是与.NET Core管道中已预先设置好的还原/生成/发布"相比,有什么不同?

But how should be that different compared to Restore/Build/Publish that are aldready set up in .NET Core pipeline?

如果是这样,我想我只需要使用我的自定义发布值来设置命令即可:

If that so, I guess I just need to set the command with my custom publish value:

dotnet publish myPath -c release -f netcoreapp3.0 --self-contained true -r win-x64

我说得对吗?

推荐答案

.NET Core Version不代表.这是Azure DevOps构建管道中的任务版本.

That's not stand for .NET Core Version. It's our task version in Azure DevOps build Pipeline.

任务已版本化,您必须指定主版本管道中使用的任务.这有助于防止新产品出现问题任务的版本已发布.

Tasks are versioned, and you must specify the major version of the task used in your pipeline. This can help to prevent issues when new versions of a task are released.

管道中的每个任务都有一个版本选择器,供您选择您想要的版本.

Each task in a pipeline has a Version selector to let you choose the version you want.

源链接:任务版本

根据您的TFS标签,似乎您正在使用私有代理.您可以选择在代理中手动预安装与.NET Core相关的环境/SDK.

According to your TFS tag, seems you are using private agent. You could choose to pre-install your .NET Core related environment/SDK in the agent manually.

如果要在管道中执行此操作,则应使用

If you want to do this during the pipeline, you should use Use .NET Core task

在构建或发布管道中使用此任务来获取特定的Internet或工具缓存中的.NET Core版本,并将其添加进入路径.

Use this task in a build or release pipeline to acquire a specific version of .NET Core from the Internet or the tools cache and add it to the PATH.

不确定所使用的TFS版本,其中可能不包含上述任务.您可以选择手动预安装代理上相关的.NET Core,或者下载任务代码的源并将程序包上传到TFS服务器,或者改用第三方扩展.

Not sure which TFS version you are using, which may do not contain above task. You could choose to manually pre-install .NET Core related on the agent or download source of task code and package upload to TFS server or use 3-rd party extension instead.

这篇关于使用TFS 2018 Update 3.2构建/发布.NET Core 3.x应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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