Build/Publish .NET Core 3.x application with TFS 2018 Update 3.2

余生颓废 提交于 2020-06-01 06:53:46

问题


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.

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

Thanks in advance

@Patrick .NET Core Task is this right?

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

Am I right?


回答1:


That's the version of the task, not the version of .NET Core.




回答2:


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.

Source Link: Task versions

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

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.

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.



来源:https://stackoverflow.com/questions/60381518/build-publish-net-core-3-x-application-with-tfs-2018-update-3-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!