Excluding development dependencies when creating packages

Some NuGet packages are useful as development dependencies, which help you author your own library, but aren't necessarily needed as actual package dependencies. Some examples are code-based packages or tooling packages that don't provide assemblies your package needs to reference at runtime. Starting from version 2.7, the pack command will ignore <package> entries in the packages.config file which have an attribute developmentDependency set to true and will not include that package as a dependency in the created package. For example, consider the following packages.config file in the source project:

<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="jQuery" version="1.5.2" />
<package id="netfx-Guard" version="1.3.3.2" developmentDependency="true" />
<package id="microsoft-web-helpers" version="1.15" />
</packages>

When running the pack command on this project, the created package will have a dependency on jQuery and microsoft-web-helpers, but will not have dependency on netfx-Guard.

nuget pack 时不包含依赖包(而不是引用项目的dll,区别于IncludeReferencedProjects)的更多相关文章

  1. spark项目打jar包,不包含依赖包问题的解决方案

    mvn clean package打包maven-archetype-webapp项目时,打包后的jar包含项目中引用的jar包(解压后,在WEB-INF有一个lib目录,该目录下有所有依赖包). m ...

  2. Package.json中dependencies依赖包中^符号和~符号前缀的区别

    刚git了webpack的包发现package.json里面dependencies依赖包的版本号前面的符号有两种,一种是~,一种是^,如下图标记: 然后搜了下在stackoverflow上找到一个比 ...

  3. 引用项目外dll时不显示注释的解决方案

    在引用项目外的dll时,显示类库中的注释可按以下步骤: 方法或变量用summary添加注释,如:         /// <summary>发送post请求         /// < ...

  4. maven打包可以行文件,包含依赖包等

    <build> <!-- 设定打包的名称 --> <finalName>ismp2xy</finalName> <plugins> < ...

  5. php7 安装时需求的依赖包

    php70 php70-bcmath php70-cli php70-common php70-devel php70-fpm php70-gd php70-json php70-mbstring p ...

  6. maven打war包后无法依赖本地工程的jar包,造成debug时跳到class文件而不是本地java文件

    问题现象:项目结构如下 growup-service | - - - - - -growup-api | - - - - - -growup-core | - - - - - -growup-war ...

  7. 安装依赖包时--save-dev以及-save的区别及意义

    首先这样做会生成一个package.json的配置文件,并在里面增加相应的版本信息,以后运行程序时,安装依赖包可以直接 npm  install或者你有安装淘宝镜像,那就cnpm install 就一 ...

  8. 在生成.net core 3.0程序时不包含nuget库

    在.net core 3.0中,默认的生成行为有了两个变化,一个是默认生成可执行文件,另一个是会复制依赖的Nuget项. 前一个变化会默认生成可执行的exe,用起来更加方便了.另一个变化可能是为了减少 ...

  9. LeftoverDataException,依赖包,apache license 2.0

    1. poi3.9 LeftoverDataException org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException: ...

随机推荐

  1. POJ 2350 Above Average

    Description It is said that 90% of frosh expect to be above average in their class. You are to provi ...

  2. php 类型

    var_dump 打印出类型和值     整型inter用  decimal 表示为 decimal : [1-9][0-9]* | 0   (int) ( (0.1+0.7) * 10 ); 强制类 ...

  3. jquery设置select选中

    /*设置select选中开始*/ var prod_type=$('.prod_type').val(); //alert(prod_type); var select = document.getE ...

  4. HDU 1695 GCD#容斥原理

    http://acm.hdu.edu.cn/showproblem.php?pid=1695 翻译题目:给五个数a,b,c,d,k,其中恒a=c=1,x∈[a,b],y∈[c,d],求有多少组(x,y ...

  5. POJ 2209 The King#贪心

    (- ̄▽ ̄)-*  水 //水题:潜力^e为正数(e为2时都可以)的儿子都可以去上战场了, //英文要看懂,exponent指数,不超过3的正数 #include<iostream> #i ...

  6. hdu_5878_I Count Two Three(预处理)

    题目链接:hdu_5878_I Count Two Three 题意: 给你一个n,让你找满足那个式子的不比n小的最小数 题解: 先上个预处理,然后二分查找就行 #include<bits/st ...

  7. Map获取键值,Map的几种遍历方法

    Map 类提供了一个称为entrySet()的方法,这个方法返回一个Map.Entry实例化后的对象集.接着,Map.Entry类提供了一个 getKey()方法和一个getValue()方法,Map ...

  8. Gentoo安装详解(四)-- 声卡设置

    硬件检测 To choose the right driver, first detect the used audio controller. You can use lspci for this ...

  9. SharePoint 2013 InfoPath 无法保存下列表单

    转载自:http://www.cnblogs.com/jianyus/p/3470121.html 在使用InfoPath发布表单,发布到SharePoint服务器报错,如下介绍: 环境:Window ...

  10. wpf 异步加载 只需6段代码

    private BackgroundWorker worker = null; ProgressBar probar = new ProgressBar(); private int percentV ...