Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify private nuget package source in msbuild 15.0 command line?

Is it possible to specify private nuget feed server while using msbuild 15.0 in vs 2017? The current powershell command I am using is following:

&$msbuild /t:restore /tv:15.0 /t:Rebuild /p:Configuration=Release

This is by default fetching only nuget.org's feed.

like image 939
Aathira Avatar asked May 22 '18 12:05

Aathira


People also ask

What is the URL for NuGet package source?

The service index location for nuget.org is https://api.nuget.org/v3/index.json .


1 Answers

How to specify private nuget package source in msbuild 15.0 command line?

If you want to restore the nuget package only from the specify private nuget package source, you could use the property RestoreSources to specify private source:

msbuild /t:restore /p:RestoreSources=xxx /tv:15.0 /t:Rebuild /p:Configuration=Release

Check the restore target for some more details.

like image 73
Leo Liu-MSFT Avatar answered Sep 20 '22 15:09

Leo Liu-MSFT