构建干净的 Nuget2 存储库会出错
Building clean Nuget2 repository gives error
我目前正在尝试构建自己的 nuget 存储库(例如 nuget.org)。
为此,我查看了 Nuget.Server。但是当运行使用这个解决方案时,它会在一些包中崩溃,这些包可以从nuget.org(例如opencart.entities 1.0.2)下载。
它在第 83 行 ServerPackageStore.cs 中崩溃:
var tasks = _repository
.GetPackages()
.Select(package =>
TryAddServerPackageAsync(allPackages, package, enableDelisting, token))
.ToList();
抛出异常的函数是GetPackages(),nuget-package中的一个函数nuget.core。为了重写函数,接受抛出的异常并继续,我从 Nuget2 下载源代码并尝试通过克隆 repo 和 运行 build.cmd:
C:\Users\Jonathan\Desktop\NuGet2>.\build.cmd
Microsoft (R) 构建引擎版本 14.0.25420.1
版权所有 (C) Microsoft Corporation。保留所有权利。
Target framework is v4.0. VisualStudioVersion is 14.0.
C:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(2719,5):
error MSB3552: Resource file "..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\Strings.resx" cannot be found.
[C:\Users\Jonathan\Desktop\NuGet2\src\Core\Core.csproj]
尝试使用 Visual Studio 2015 和 2017 社区版构建时,出现相同的错误。
我如何构建 Nuget2 存储库,或者是否有其他方法可以解决我的 Nuget.Server 问题?
How can I build the Nuget2 repo or is there maybe another way to
tackle my problem with the Nuget.Server?
您还需要下载解决方案 NuGet.Client 并将其解压缩到您当前解决方案的文件夹 NuGet.Client
。
当您下载解决方案NuGet2时,您会发现文件夹NuGet.Client
是空的。这就是您收到该错误的原因:
"error MSB3552: Resource file
"....\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\Strings.resx"
cannot be found."
要解决此错误,请下载NuGet.Client解决方案并解压缩,将文件夹NuGet.Client-49234c230df0fc01868d8b90e667af89be8cc4f6
中的所有内容复制到NuGet.Client文件夹中,然后构建项目。
希望对您有所帮助。
我目前正在尝试构建自己的 nuget 存储库(例如 nuget.org)。
为此,我查看了 Nuget.Server。但是当运行使用这个解决方案时,它会在一些包中崩溃,这些包可以从nuget.org(例如opencart.entities 1.0.2)下载。
它在第 83 行 ServerPackageStore.cs 中崩溃:
var tasks = _repository
.GetPackages()
.Select(package =>
TryAddServerPackageAsync(allPackages, package, enableDelisting, token))
.ToList();
抛出异常的函数是GetPackages(),nuget-package中的一个函数nuget.core。为了重写函数,接受抛出的异常并继续,我从 Nuget2 下载源代码并尝试通过克隆 repo 和 运行 build.cmd:
C:\Users\Jonathan\Desktop\NuGet2>.\build.cmd Microsoft (R) 构建引擎版本 14.0.25420.1 版权所有 (C) Microsoft Corporation。保留所有权利。
Target framework is v4.0. VisualStudioVersion is 14.0.
C:\Program Files (x86)\MSBuild.0\bin\Microsoft.Common.CurrentVersion.targets(2719,5):
error MSB3552: Resource file "..\..\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\Strings.resx" cannot be found.
[C:\Users\Jonathan\Desktop\NuGet2\src\Core\Core.csproj]
尝试使用 Visual Studio 2015 和 2017 社区版构建时,出现相同的错误。
我如何构建 Nuget2 存储库,或者是否有其他方法可以解决我的 Nuget.Server 问题?
How can I build the Nuget2 repo or is there maybe another way to tackle my problem with the Nuget.Server?
您还需要下载解决方案 NuGet.Client 并将其解压缩到您当前解决方案的文件夹 NuGet.Client
。
当您下载解决方案NuGet2时,您会发现文件夹NuGet.Client
是空的。这就是您收到该错误的原因:
"error MSB3552: Resource file "....\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\Strings.resx" cannot be found."
要解决此错误,请下载NuGet.Client解决方案并解压缩,将文件夹NuGet.Client-49234c230df0fc01868d8b90e667af89be8cc4f6
中的所有内容复制到NuGet.Client文件夹中,然后构建项目。
希望对您有所帮助。