VSTS hosted build fails after upgrading to VS2017

2019-05-15 22:22发布

问题:

I've upgraded asp.net core project (project.json) originally created in VS2015 to VS2017 MSBuild project format (.csproj).

Build definitions looks like this:

Restore, Build and Test build steps end up with follwong warning:

Project file(s) matching the specified pattern were not found.

Publish build step ends with following error:

MyProject.csproj' does not contain a project.json file

Is it because the hosted build agent was not updated yet? What can I do about it? When will it be?

回答1:

The latest update mentions that .NET Core tasks have been updated to support .csproj project system as well as project.json.

It's been more than 10 days since the announcement.However, there's a note at the top of the page

Note: The features discussed in this post will be rolling out over the next three weeks.

Your tenant might be updated in the near future.



回答2:

As mentioned by Liero, you need to update your builds to use the Hosted VS2017 queue by editing the defintion and setting this appropriately on the Options tab.