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来访问的时候也许要填入我们预先设置好的密钥才能够进行访问)

 <?xml version="1.0" encoding="utf-8"?>
<!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 -->
<configuration>
<appSettings>
<!-- Determines if an Api Key is required to push\delete packages from the server. -->
<add key="requireApiKey" value="true" /> <!--
Set the value here to allow people to push/delete packages from the server.
NOTE: This is a shared key (password) for all users.
-->
<add key="apiKey" value="ChinaNet910111" />
<!--
Change the path to the packages folder. Default is ~/Packages.
This can be a virtual or physical path.
-->
<add key="packagesPath" value="~/Packages" /> <!--
Set allowOverrideExistingPackageOnPush to false to mimic NuGet.org's behaviour (do not allow overwriting packages with same id + version).
-->
<add key="allowOverrideExistingPackageOnPush" value="false" /> <!--
Set ignoreSymbolsPackages to true to filter out symbols packages. Since NuGet.Server does not come with a symbol server,
it makes sense to ignore this type of packages. When enabled, files named `.symbols.nupkg` or packages containing a `/src` folder will be ignored. If you only push .symbols.nupkg packages, set this to false so that packages can be uploaded.
-->
<add key="ignoreSymbolsPackages" value="true" /> <!--
Set enableDelisting to true to enable delist instead of delete as a result of a "nuget delete" command.
- delete: package is deleted from the repository's local filesystem.
- delist:
- "nuget delete": the "hidden" file attribute of the corresponding nupkg on the repository local filesystem is turned on instead of deleting the file.
- "nuget list" skips delisted packages, i.e. those that have the hidden attribute set on their nupkg.
- "nuget install packageid -version version" command will succeed for both listed and delisted packages.
e.g. delisted packages can still be downloaded by clients that explicitly specify their version.
-->
<add key="enableDelisting" value="false" /> <!--
Set enableFrameworkFiltering to true to enable filtering packages by their supported frameworks during search.
-->
<add key="enableFrameworkFiltering" value="false" /> <!--
When running NuGet.Server in a NAT network, ASP.NET may embed the erver's internal IP address in the V2 feed.
Uncomment the following configuration entry to enable NAT support.
-->
<!-- <add key="aspnet:UseHostHeaderForRequestUrl" value="true" /> -->
</appSettings>
<system.web>
<httpRuntime maxRequestLength="" />
<compilation debug="true" />
</system.web>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".nupkg" mimeType="application/zip" />
</staticContent>
<modules runAllManagedModulesForAllRequests="true">
</modules>
</system.webServer>
</configuration>

web.config

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

搭建公司内部的NuGet服务器的更多相关文章

  1. .NET持续集成与自动化部署之路第二篇——使用NuGet.Server搭建公司内部的Nuget(包)管理器

    使用NuGet.Server搭建公司内部的Nuget(包)管理器 前言     Nuget是一个.NET平台下的开源的项目,它是Visual Studio的扩展.在使用Visual Studio开发基 ...

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

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

  3. 搭建公司内部的NuGet Server

    随着公司业务慢慢的拓展,项目便会越来越来多,很多项目会依赖其他项目DLL,比如一些底层的技术框架DLL引用,还有各业务系统的也有可能会有引用的可能. 项目多,交叉引用多,如果要是有一个DLL更新,那就 ...

  4. 在VS中自动生成NuGet包以及搭建自己的或单位内部的NuGet服务器

    关于NuGet的介绍已经很多,可以参考下面的: NuGet学习笔记(1)--初识NuGet及快速安装使用 http://kb.cnblogs.com/page/143190/ NuGet学习笔记(2) ...

  5. DNS域名解析之搭建公司内部域--技术流ken

    什么是DNS DNS( Domain Name System)是“域名系统”的英文缩写,是一种组织成域层次结构的计算机和网络服务命名系统,它用于TCP/IP网络,它所提供的服务是用来将主机名和域名转换 ...

  6. NuGet学习笔记3——搭建属于自己的NuGet服务器

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

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

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

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

    在上一篇NuGet学习笔记(2) 使用图形化界面打包自己的类库 中讲解了如何打包自己的类库,接下来进行最重要的一步,从零开始搭建属于自己的NuGet服务器,诚然园子里及其它很多地方已经有完全写好的Nu ...

  9. 搭建属于自己的NuGet服务器

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

随机推荐

  1. Reliability diagrams

    Reliability diagrams (Hartmann et al. 2002) are simply graphs of the Observed frequency of an event ...

  2. python中with学习

    python中with是非常强大的一个管理器,我个人的理解就是,我们可以通过在我们的类里面自定义enter(self)和exit(self,err_type,err_value,err_tb)这两个内 ...

  3. Android UI 笔记

    EditText中添加小图标 <TextView android:layout_width="wrap_content" android:layout_height=&quo ...

  4. 在SQL中用正则表达式替换html标签(2)

    由于数据库的一个表字段中多包含html标签,现在需要修改数据库的字段把html标签都替换掉.当然我可以通过写一个程序去修改,那毕竟有点麻烦.直接在查询分析器中执行,但是MS SQL Server并没有 ...

  5. (图文实例)用VB.net操作SQLite数据库

    转载请注明出处:HateMath归来(http://www.cnblogs.com/hatemath/) 环境: Visual Studio 社区版 64位 Windows 7系统 新建的解决方案基于 ...

  6. linux上redis安装配置及其防漏洞配置及其攻击方法

    Linux上redis安装: 需先在服务器上安装yum(虚拟机可使用挂载的方式安装) 安装配置所需要的环境运行指令:  yum -y install gcc 进入解压文件执行make 指令进行编译 执 ...

  7. TableView的性能优化

    现在市场上的iOS应用程序界面中使用最多的UI控件是什么? 答案肯定是UITableView,几乎每一款App都有很多的界面是由UITableView实现的,所以为了做出一款优秀的App,让用户有更好 ...

  8. Scrapy框架--使用cookie

    CookieMiddleware class scrapy.downloadermiddlewares.cookies.CookieMiddlewar 该中间件使得爬取需要cookie(例如使用ses ...

  9. migo的增强

    migo的增强 所用BADI:MB_MIGO_BADI   具体见例子:(SE19) CIN_PLUG_IN_TO_MIGO JVA_CRP_MIGO_BADI JV_CRP_MIGO_BADI WB ...

  10. 我的第一个python web开发框架(8)——项目结构与RESTful接口风格说明

    PS:再次说明一下,原本不想写的太啰嗦的,可之前那个系列发布后发现,好多朋友都想马上拿到代码立即能上手开发自己的项目,对代码结构.基础常识.分类目录与文件功能结构.常用函数......等等什么都不懂, ...