1
votes

I am having an issue migrating from package.config and Nuget 2.7 to project.json and Nuget 3.3 using Teamcity. Here is what I used to have

Old way:

  • Package.config with several dependencies I had a nuget install build step in teamcity that would install the dependencies to the packages folder.
  • The project referenced the items in the package folder, so the MSBUILD step would then compile the project.

New way that isnt working

  • Project.json file that Visual Studio is able to restore and build the solution ok with. There is no packages folder(the new way it works I've read) and the dependencies are automatically added to the output.
  • I changed the Nuget install step to be a Nuget restore step. I see it reading the project.json file and it says installing package etc. but I never see it print successfully installed package.
  • The MSBuild step fails because it doesnt have the references to the packages

Do I even need the nuget install step anymore. I tried looking to see if I need the MSBUILD step to restore packages, but didn't find anything. I have it enabled in the solution.

1
hey, have you solved this issue?MistyK

1 Answers

1
votes

We have similar setup on our TC.

First of all you need Microsoft Build Tools 2015 14.0.23107.10 installed on build agent.

You can always get latest from Chocolatey Gallery

choco install microsoft-build-tools -y

To restore packages use the NuGet Installer build step

enter image description here

And make sure that your MSBuild step uses the latest version:

enter image description here