码迷,mamicode.com
首页 > 其他好文 > 详细

nuget pack 时不包含依赖包(而不是引用项目的dll,区别于IncludeReferencedProjects)

时间:2015-09-24 12:35:01      阅读:286      评论:0      收藏:0      [点我收藏+]

标签:

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)

标签:

原文地址:http://www.cnblogs.com/atuo/p/4834889.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!