- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在关注这个guide设置我自己的 NuGet
私有(private)服务器,但使用 Visual Studio 2010。
我已经通过 Package Manager Console
成功添加了 NuGet.Server
包,但是当我想要构建 WebApplication 时出现错误:
The type or namespace name 'Server' does not exist in the namespace 'NuGet' (are you missing an assembly reference?)
包安装没有报错,但是我看到项目的reference文件夹里没有添加NuGet.Server
,这是为什么?
编辑:进一步调查包内容,我发现 NuGet.Server
没有 net40
的 lib
。我可能需要 fork NuGet.Server source并在 net40
中编译它来解决这个问题。
这是我从 Package Manager Console
中获取的日志:
PM> Install-package nuget.server
Attempting to resolve dependency 'NuGet.Core (≥ 2.10.1)'.
Attempting to resolve dependency 'Microsoft.Web.Xdt (≥ 2.1.0)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 8.0.1)'.
Attempting to resolve dependency 'RouteMagic (≥ 1.3.0)'.
Attempting to resolve dependency 'WebActivatorEx (≥ 2.1.0)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
Installing 'Microsoft.Web.Xdt 2.1.1'.
You are downloading Microsoft.Web.Xdt from Microsoft Corporation, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkId=273778. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.Web.Xdt 2.1.1'.
Installing 'NuGet.Core 2.10.1'.
Successfully installed 'NuGet.Core 2.10.1'.
Installing 'Newtonsoft.Json 8.0.1'.
Successfully installed 'Newtonsoft.Json 8.0.1'.
Installing 'RouteMagic 1.3'.
Successfully installed 'RouteMagic 1.3'.
Installing 'Microsoft.Web.Infrastructure 1.0.0.0'.
Successfully installed 'Microsoft.Web.Infrastructure 1.0.0.0'.
Installing 'WebActivatorEx 2.1.0'.
Successfully installed 'WebActivatorEx 2.1.0'.
Installing 'NuGet.Server 2.10.3'.
Successfully installed 'NuGet.Server 2.10.3'.
Adding 'Microsoft.Web.Xdt 2.1.1' to WebApplication2.
Successfully added 'Microsoft.Web.Xdt 2.1.1' to WebApplication2.
Adding 'NuGet.Core 2.10.1' to WebApplication2.
Successfully added 'NuGet.Core 2.10.1' to WebApplication2.
Adding 'Newtonsoft.Json 8.0.1' to WebApplication2.
Successfully added 'Newtonsoft.Json 8.0.1' to WebApplication2.
Adding 'RouteMagic 1.3' to WebApplication2.
Successfully added 'RouteMagic 1.3' to WebApplication2.
Adding 'Microsoft.Web.Infrastructure 1.0.0.0' to WebApplication2.
Successfully added 'Microsoft.Web.Infrastructure 1.0.0.0' to WebApplication2.
Adding 'WebActivatorEx 2.1.0' to WebApplication2.
Successfully added 'WebActivatorEx 2.1.0' to WebApplication2.
Adding 'NuGet.Server 2.10.3' to WebApplication2.
File Conflict
File 'Web.config' already exists in project 'WebApplication2'. Do you want to overwrite it?
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "N"):A
Overwrite existing file 'Web.config'.
Successfully added 'NuGet.Server 2.10.3' to WebApplication2.
最佳答案
在目标框架设置为 .NET Framework 4.0 的项目中尝试使用 Visual Studio 2015 构建它时,我遇到了同样的错误。将目标框架设置为 .NET Framework 4.6.1 为我修复了它。
如果可能,我建议使用较新版本的 Visual Studio,或者通过命令行使用较新的框架本身对其进行编译。如果您希望稍后执行此操作,则此其他堆栈溢出答案可能会有所帮助。 How to build .NET 4.6 Framework app without Visual Studio installed?
关于c# - 缺少有关成功安装 NuGet 包的引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36904694/
我已经在Visual Studio中创建了新的解决方案,启用了nuget包还原,并进入了解决方案根.nuget文件夹,该文件夹包含使包还原正常工作所需的以下文件:NuGet.exe,NuGet.con
自 Nuget 1.5 以来,我的团队一直在使用“启用包还原”选项,以使包不受我们的源代码控制。当 Nuget 1.6 发布时,我们注意到一个问题,即它没有拉取软件包,并跟踪它到 .nuget 文件夹
我维护了一些小的 Nuget 包。 我在 git 存储库中有一个 Nuget README 文件,.nupkg 文件由 VS 根据“Package”配置自动构建,存储在 .csproj 文件。 每当我
我们是一个小型开发团队,我们希望开始使用我们的库作为 NuGet 包。现在我已经看到我们可以创建 NuGet 提要或 NuGet 服务器或 NuGet 画廊。 现在我们不确定有什么区别,对于我们的小团
我正在编写一个脚本,它将自动打包 Nuget 文件并将其发布到我的私有(private)存储库(文件共享)和私有(private)符号服务器(在 localhost 上)。 当我运行 nuget pa
我有一个解决方案,我想从两个项目中创建一个 NuGet 包。 如果它只是一个项目,我会使用 .csproj 文件来规范 NuGet 打包器,但由于我希望两个不同的项目进入完成的包,我不能这样做。 我创
我正在做一个需要处理 Excel 文件的项目。我为这项工作找到了一个名为 Aspose.cells 的库。它不是一个免费的图书馆,我们应该从它的网站购买它的许可证,以便在我们的项目中使用它。但是,我发
我已经使用 Nuget 安装程序创建了一个 TeamCity 构建步骤,但是当我运行这些步骤时出现错误: Updating sources: server side checkout [15:35:4
是否有任何指南或建议来管理不在 nuget 上的库以及在 nuget 上的包。 其中大多数可能是 3rd 方库,除非我们专门安装它们,否则它们可能永远不会继续使用 nuget。 最好将这些 dll 放
我一直在研究自托管 NuGet,但很难理解如何设置它以及它如何帮助支持我们的开发过程。 有没有人对使用哪个,如何设置有任何建议? 或者我应该只使用托管服务? 最佳答案 在查看了各种解决方案(自托管和托
我正在为 OSGeo.FDO 创建 nuget 包,但我遇到了以下问题。 FDO 使用 providers.xml列出它可以使用的所有提供程序的文件。所以我创建了一个名为 OSGeo.FDO 的主包包
我想知道 NuGet 的含义是什么。它是像blah blah get这样的东西吗?它甚至有一个有意义的名字吗?或者它是某物的缩写还是有人为了好玩而决定这个名字?请帮忙,这个问题已经困扰了我 1 周。
This question already has answers here: Is it possible to change the location of packages for NuGet?
如何在 Visual Studio 之外下载 NuGet 包?所以它可以用来创建离线包。 最佳答案 如何在没有 Visual Studio 或 Nuget 包管理器的情况下下载 NuGet 包: 在
我似乎在网络上找不到任何对此表示赞同或反对的地方。谁能指出我的答案吗?或者更好的是,如果您从事 NuGet 工作,您能否给出一些指示,说明是否有任何计划允许商业库包(我认为需要某种身份验证)包含在未来
我已经打开了 TeamCity 的 NuGet 服务器,我想推送公共(public)包(即来自 NuGet.org 等公共(public)资源),因为构建服务器无法看到我们公司外部的信息,因此从 Nu
在我的工作团队中,我们依赖两个 NuGet 提要:来自 NuGet.org 的官方提要用于公共(public)包,而我们文件服务器上的文件夹用于内部包。 这对我们来说效果很好,但我认为我们有一个潜在的
我在我工作的 Web 服务器(在 IIS 7.0 下)上设置了新的 NuGet Gallery。该网站本身已设置并运行良好。我们能够注册帐户、确认电子邮件地址,甚至通过网站本身上传新包。 我们的自动构
当我们在 Visual Studio 2017 中创建 nuget 包时,它默认将项目引用添加为另一个 nuget 引用。 我们如何在创建包时禁用它,而是: 选择不同的包名 在创建包时包含项目的 dl
我可以执行类似 - mono --runtime=v4.0.30319 /Library/TeamCity/buildAgent/work/b0d2d3fefe88d393/.nuget/NuGet.
我是一名优秀的程序员,十分优秀!