我正在使用带有本地 nuget 库的 Nuget.exe 版本 4.3.0.4406,并且看到包位置之间不匹配。
当我安装一个包时,它会安装到 c:\projects\ProjectX.1.0.0.0。
但是,当我尝试打包引用 ProjectX 的项目时,它似乎正在寻找像 c:\projects\ProjectX\1.0.0.0 这样的路径。
只是为了澄清一下,nupkg 确实存在于 nuget 将其放在 ProjectX.1.0.0.0 下的位置,但它似乎使用 ProjectX\1.0.0.0 查找引用。
我得到的实际错误是:
Missing C:\Projects\packages\projectX\1.0.0.0\projectx.1.0.0.0.nupkg
Unable to find 'ProjectX.1.0.0.0.nupkg'. Make sure the project has been built.
NuGet.CommandLine.CommandLineException: Unable to find 'ProjectX.1.0.0.0.nupkg'. Make sure the project has been built.
at NuGet.CommandLine.ProjectFactory.AddDependencies(Dictionary`2 packagesAndDependencies)
at NuGet.CommandLine.ProjectFactory.ProcessDependencies(PackageBuilder builder)
at NuGet.CommandLine.ProjectFactory.CreateBuilder(String basePath, NuGetVersion version, String suffix, Boolean buildIfNeeded, PackageBuilder builder)
at NuGet.Commands.PackCommandRunner.BuildFromProjectFile(String path)
at NuGet.CommandLine.PackCommand.ExecuteCommand()
at NuGet.CommandLine.Command.ExecuteCommandAsync()
at NuGet.CommandLine.Command.Execute()
at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)