We have set up an internal NuGet server and added that server into the package manager settings to publish our dependencies to our local dev machines. Now we want to use the new TFS 2015 Build system to build our solution.
at the start of the build NuGet.exe restore is called passing in the solution file as seen in the log file:
C:\Program Files\Microsoft Team Foundation Server 14.0\Build\agent\worker\tools\NuGet.exe` restore "D:\TfsData\Build\_work\a8a26a03\Source Code...etc\mySolution.sln" -NonInteractive
next line in the log is the error
##[error]Unable to find version '1.0.0.5' of package 'com.bmico.models.lookup'
Which is a package on my internal server?
How do I tell TFS Build 2015 to use my internal package repository as well as the publicly available one?
In root of your repository add file 'nuget.config'
and content of file like where you use nuget.org and network share where you have your's nuget fiels.
<configuration>
<packageSources>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
<add key="YoursNuGet" value="\\YourServerNugetShare\YourNuGets" />
</packageSources>
</configuration>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With