1.  创建NuGet项目
(注意:解决方案名称可以自定义为其他的名称)

2.   安装NuGet Server
在 “NuGetServer” 项目上,右键选择 “管理NuGet程序包” ,选择 “联机” ,右上角搜索框中输入“NuGet.Server”  Enter,在搜索结果中选择 NuGet.Server 项,进行安装即可(如下图所示)。
注意:如果安装最后,提示 替换 Web.config ,请选择“全是”。

3.  编译NuGet Server项目
编译“NuGetServer”项目,如果没有出异常,这里就创建项目完成,NuGetServer 就这么简单建成
注意: 如果一直编译不过的话,则尝试多更新几次Nuget.Server包(卸载重新安装)。
4. 配置文件说明(Web.config)
    web.config->appSettings的各项配置说明:
packagesPath:这个Key表示Nuget包的存放目录,默认情况下存放在部署的网站根目录Packages文件夹
requireApiKey: 这个key 如果设置成 true ,表示apiKey是必须要设置的,这个就像密码一样。可以阻止不知道这个apiKey人访问到程序包
apiKey: 是作为一个密钥,防止其他人来访问我们的Nuget服务(NuGet Package Explorer来访问的时候也许要填入我们预先设置好的密钥才能够进行访问)

1 <?xml version="1.0" encoding="utf-8"?>
2 <!--  For more information on how to configure your ASP.NET application, please visit  http://go.microsoft.com/fwlink/?LinkId=169433  -->
3 <configuration>
4   <appSettings>
5     <!-- Determines if an Api Key is required to push\delete packages from the server.  -->
6     <add key="requireApiKey" value="true" />
7
8     <!--
9     Set the value here to allow people to push/delete packages fromthe server.10     NOTE: This is a shared key (password) forall users.11     -->
12     <add key="apiKey" value="ChinaNet910111" />
13     <!--
14     Change the path to the packages folder. Default is ~/Packages.15     This can be a virtualor physical path.16     -->
17     <add key="packagesPath" value="~/Packages" />
18
19     <!--
20     Set allowOverrideExistingPackageOnPush to false to mimic NuGet.org's behaviour (do not allow overwriting packages with same id + version).
21     -->
22     <add key="allowOverrideExistingPackageOnPush" value="false" />
23
24     <!--
25     Set ignoreSymbolsPackages to true to filter outsymbols packages. Since NuGet.Server does not come with a symbol server,26     it makes sense to ignore this type of packages. When enabled, files named `.symbols.nupkg` or packages containing a `/src` folder will be ignored.27
28     If you only push .symbols.nupkg packages, set this to falseso that packages can be uploaded.29     -->
30     <add key="ignoreSymbolsPackages" value="true" />
31
32     <!--
33     Set enableDelisting to true to enable delist instead of delete as a result of a "nuget delete"command.34     - delete: package is deleted from the repository's local filesystem.
35     -delist:36       - "nuget delete": the "hidden" file attribute of the corresponding nupkg on the repository local filesystem isturned on instead of deleting the file.37       - "nuget list" skips delisted packages, i.e. those that have the hidden attribute seton their nupkg.38       - "nuget install packageid -version version" command will succeed forboth listed and delisted packages.39 e.g. delisted packages can still be downloaded by clients that explicitly specify their version.40     -->
41     <add key="enableDelisting" value="false" />
42
43     <!--
44     Set enableFrameworkFiltering to trueto enable filtering packages by their supported frameworks during search.45     -->
46     <add key="enableFrameworkFiltering" value="false" />
47
48     <!--
49     When running NuGet.Server in a NAT network, ASP.NET may embed the erver's internal IP address in the V2 feed.
50 Uncomment the following configuration entry to enable NAT support.51     -->
52     <!-- <add key="aspnet:UseHostHeaderForRequestUrl" value="true" /> -->
53   </appSettings>
54   <system.web>
55     <httpRuntime maxRequestLength="31457280" />
56     <compilation debug="true" />
57   </system.web>
58   <system.serviceModel>
59     <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
60   </system.serviceModel>
61   <system.webServer>
62     <staticContent>
63       <mimeMap fileExtension=".nupkg" mimeType="application/zip" />
64     </staticContent>
65     <modules runAllManagedModulesForAllRequests="true">
66     </modules>
67   </system.webServer>
68 </configuration>

web.config

5. 部署IIS站点
假设我们部署站点的端口是10000,那么部署成功以后我们就可以通过 http://xxx.xxx.xxx.xxx:10000去访问我们的Nuget服务了(下面则是我们部署成功后的效果图)

转载于:https://www.cnblogs.com/rakers/p/7834669.html

搭建公司内部的NuGet服务器相关推荐

  1. 通过ProGet搭建一个内部的Nuget服务器

    .NET Core项目完全使用Nuget 管理组件之间的依赖关系,Nuget已经成为.NET 生态系统中不可或缺的一个组件,从项目角度,将项目中各种组件的引用统统交给NuGet,添加组件/删除组件/以 ...

  2. NuGet学习笔记(3) 搭建属于自己的NuGet服务器

    文章导读 创建NuGetServer Web站点 发布站点到IIS 添加本地站点到包包数据源 在上一篇NuGet学习笔记(2) 使用图形化界面打包自己的类库 中讲解了如何打包自己的类库,接下来进行最重 ...

  3. 搭建公司内部论坛 只需简单三步 1 (安装Discuz)

    系列文章 ​​​​​​​搭建公司内部论坛 只需简单三步 1 (安装Discuz) 搭建公司内部论坛 只需简单三步 2 (发布Discuz) 随着公司快速发展,人员也越来越多,但员工人数多也会带来问题, ...

  4. 简单三步搭建公司内部论坛:安装部署Discuz 1-2

    系列文章 简单三步搭建公司内部论坛:安装部署Discuz 1-2 简单三步搭建公司内部论坛:将论坛发布公网 2-2 随着公司快速发展,人员也越来越多,但员工人数多也会带来问题,就是小群组也越来越多.虽 ...

  5. 简单三步搭建公司内部论坛:将论坛发布公网 2-2

     系列文章 简单散步搭建公司内部论坛:安装部署Discuz 1-2 简单三步搭建公司内部论坛:将论坛发布公网 2-2 上一篇: 简单三步搭建公司内部论坛:将论坛发布公网 2-2 在上篇介绍中,我们向大 ...

  6. 搭建公司内部论坛 只需简单三步 2 (发布Discuz)

    系列文章 搭建公司内部论坛 只需简单三步 1 (安装Discuz) 搭建公司内部论坛 只需简单三步 2 (发布Discuz) 上一篇 搭建公司内部论坛 只需简单三步 1 (安装Discuz) 在上篇介 ...

  7. 十分钟搭建自己的私有NuGet服务器-BaGet

    点击上方蓝字"小黑在哪里"关注我吧 搭建BaGet 上传程序包 在vs中使用 其他 前言 NuGet是用于微软.NET(包括 .NET Core)开发平台的软件包管理器.NuGet ...

  8. Docker搭建公司内部私有云平台 -- Gitlab

    目录 简介 下载并配置Docker环境 拉取镜像并启动Gitlab 将本地代码推送到Gitlab当中 总结 简介 1.什么是gitlab? web平台[网站] gitlab上存储的文件 用户可以将文件 ...

  9. 用AdGuard Home搭建一个内部的DNS服务器,开启局域网内无广告和追踪的浏览体验

    为什么使用对象不喜欢广告? 我们在看电视的时候不开会员就有90秒的小广告,刷朋友圈的时候会有汽车.欧巴的互动广告,看新闻头条的时候有贴片广告,看抖音的时候也会有带货的广告,小网站上也还有 * 感荷官在 ...

  10. TrueNAS和NextCloud搭建公司内部文件服务器

    概述 前言: 相关配置 服务器型号 DELL R540 服务器配置 4核:32线程:运存32G:磁盘36T 磁盘阵列类型 raid5 虚拟机系统 Centos 制作磁盘阵列 前言:lz在这里使用的是3 ...

最新文章

  1. Android架构篇-2 国际化多语言
  2. 左右声道测试音频_关于制作左右声道音频的剪辑软件推荐
  3. JTree用法及JTree使用经验总结转
  4. Dockerfile 指令详解2
  5. logcat崩溃_使用logcat抓取Android崩溃日志
  6. redis集群3种模式
  7. 代理模式(多线程实现状态监控)
  8. javascript核心_只需几分钟即可学习这些核心JavaScript概念
  9. Linux 设置定时任务 清空日志
  10. JQUERY--图片轮换superslide(
  11. C++: 对字符串转换字符集(编码)
  12. python零基础能学吗-python 零基础该怎么学?
  13. opencv 实现角点检测 Shi-Tomasi角点检测
  14. [整理]让winCE支持中文界面(可切换至英文界面)
  15. VC6.0无法进入调试
  16. android 图片合成pdf文件,教你怎么把多张图片合成一个pdf文件
  17. 清除计算机用户缓存,如何在Windows 7中清除内存缓存,释放电脑空间?
  18. 【数据库考试】数据库期末考试试题及答案
  19. 大数据下的图片类别以及图片爬取详细的过程(一)
  20. 好用、好玩的小程序第二弹,统统学会,新技能get

热门文章

  1. Servlet教程第5讲笔记
  2. 如何用pdb命令调试python代码
  3. mysql查询配置变量
  4. 卷积神经网络第四周作业1 - Face Recognition for the Happy House - v1
  5. 【深度学习】论文导读:GoogLeNet模型,Inception结构网络简化(Going deeper with convolutions)
  6. Ubuntu下升级安装gcc-7.5.0教程
  7. scala学习笔记一------初步了解scala
  8. 测试nb信号的软件_NB频点概述
  9. 区块链学习路线图 初阶+中阶+高阶
  10. FISCO BCOS 同态加密 实例