Nuget:如何在v3 api版本中使用本地存储库?

时间:2018-12-04 06:59:12

标签: nuget nuget-server

我在nuget restore命令上出现nu1101错误:

NU1101: Unable to find package 
Microsoft.VisualStudio.Web.CodeGeneration.Tools. No packages 
exist with this id in source(s): MyFeedName

我阅读了nuget docs上的文档,并假定在我的本地存储库中没有api版本。

本地存储库路径:http://tfs.company.local:18099/integration/nuget

Nuget.Server版本:v3.1.2.0 Nuget.exe:4.9.1

  1. 如何明确指定api版本?
  2. 这是需要还是其他问题?

完整日志:

Committing restore...
2018-12-03T11:10:59.4412250Z   Assets file has not changed. 
Skipping assets file writing. Path: 
c:\Build1\_work\1\s\path_to_proj\project.assets.json
2018-12-03T11:10:59.4412250Z   Restore completed in 99,04 ms for c:\Build1\_work\1\s\path_to_proj\MyProj.csproj.
2018-12-03T11:10:59.5818631Z     GET 
http://tfs.company.local:18099/folder/nuget/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Tools'&semVerLevel=2.0.0
2018-12-03T11:10:59.6130986Z     OK http://tfs.company.local:18099/folder/nuget/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Tools'&semVerLevel=2.0.0 43ms
2018-12-03T11:10:59.8631019Z   NU1101: Unable to find package Microsoft.VisualStudio.Web.CodeGeneration.Tools. No packages exist with this id in source(s): MyFeedName
2018-12-03T11:10:59.9256161Z   Value cannot be null.
2018-12-03T11:10:59.9256161Z   Parameter name: path
2018-12-03T11:10:59.9884904Z ## 
[error]Support\AutoBuild\path\PublishWeb.xml(141,5): Error 
MSB3073: The command ""c:\Build1\externals\nuget\nuget.exe" 
restore "c:\Build1\_work\1\s\path_to_proj\MyProj.csproj" - 
recursive" exited with code 1.
 2018-12-03T11:10:59.9884904Z c:\Build1\_work\1\s\Support\AutoBuild\BuildScript\PublishWeb.xml(141,5): error MSB3073: The command ""c:\Build1\externals\nuget\nuget.exe" restore "c:\Build1\_work\1\s\path_to_proj\MyProj.csproj" -recursive" exited with code 1.
2018-12-03T11:10:59.9884904Z Done Building Project       


"c:\Build1\_work\1\s\Support\AutoBuild\BuildScript\PublishWeb.xml " (default targets) -- FAILED.

0 个答案:

没有答案