1
votes

We are trying to build a .Net Core project in TFS team build. We have VS 2015, Preview Tools 2 and .Net Core 1.1 on the build machine.

From within Visual Studio on that machine, it builds fine.

If we go into the project directory and run dotnet-publish from the command line, it works fine.

From within team build, we get the dreaded dotnet props can't be found error.

I am using global.json in my project.

Any trick to getting team build to work?

1
Which build are you using XAML build or vNext build?PatrickLu-MSFT
Can you share the build logs?Eddie Chen - MSFT

1 Answers

0
votes

You could also use Command line task in your build definition. First restore Nuget Package with

Build your ASP.NET Core project and publish the output to a folder.

  • Tool: dotnet
  • Arguments: publish -c $(BuildConfiguration) -o $(Build.ArtifactStagingDirectory)
  • Advanced, Working folder: Folder in which the project.json file (for projects created with VS 2015) or .csproj file (for projects created with VS 2017) exists.

More details please refer this similar tutorial Build your ASP.NET Core app. Also take a look at this similar question: Visual studio team services build .net core 1.1