大家在打包Nuget包的时候,最后会执行以下语句

nuget pack .\ML.Common.SDK.csproj -Prop Configuration=Release

执行此句后,提示以下报错信息。

参考:https://stackoverflow.com/questions/25725545/nuget-x-already-has-a-dependency-defined-for-y

中的解决方案可以看到,需要升级项目中的nuget

进入项目中的.nuget的目录,然后执行:

nuget update -self

执行完后显示以下信息,则为更新成功:从v2.6.0  更新到了  v4.7.1

接下来再重试打包语句

如果还是报错

那么简单粗暴的通过将项目中的packages.config中的记录全部注释后,再打包即可,如下图:

然后再执行打包语句,成功了

到此处,则大功告成了!

以上亲测,有疑问欢迎关注我的微信公众号进行提问

公众号:sxmljx

[解决方案]NuGet打包报错: 'X' already has a dependency defined for 'Y'的更多相关文章

  1. gulp 打包报错:ReferenceError: internalBinding is not defined

    > gulp build internal/util/inspect.js:31 const types = internalBinding('types'); ^ ReferenceError ...

  2. [one day one question] webpack 打包报错 Cannot assign to read only property 'exports' of object '#<Object>'

    问题描述: webpack 打包报错 Cannot assign to read only property 'exports' of object '#<Object>',这怎么破? 解 ...

  3. Mac Angular打包报错xcode-select: error: tool 'xcodebuild' requires Xcode

    Mac Angular打包报错: Error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer ...

  4. iOS开发——打包报错error: linker command failed with exit code 1

    真机运行没问题,打包报错: clang: error: linker command failed with exit code 1 (use -v to see invocation) 原因:在Xc ...

  5. CORDOVA :添加cordova-plugin-file-opener2插件cordova打包报错

    原文:CORDOVA :添加cordova-plugin-file-opener2插件cordova打包报错 最近在接触android项目,其中涉及到APP自动更新的问题,当新APP下载成功后需要打开 ...

  6. webpack 打包报错:One CLI for webpack must be installed. These are recommended choices, delivered as separate packages

    webpack 打包报错: One CLI for webpack must be installed. These are recommended choices, delivered as sep ...

  7. 解决xcode10打包报错:That command depends on command in Target ‘xxx’:scrpit phase"[CP] Copy Pods Resources"

    问题:使用xcode10打包报错,提示 error:Multiple commands produce ‘xxxx/xxx.app’ 1)Target ‘xx’ has create director ...

  8. maven install 打包 报错 Cannot run program "gpg.exe": CreateProcess error

    打包报错, mvn install后加上参数-Dgpg.skip,例如:mvn install -Dgpg.skip   即可解决. 我们也可以去掉 这个 插件   <plugin>    ...

  9. vue-cli 打包报错:Unexpected token: punc (()

    vue-cli 打包报错: ERROR in static/js/vendor.ed7d2353f79d28a69f3d.js from UglifyJs Unexpected token: punc ...

随机推荐

  1. Linux问题分析或解决_ssh无法连接

    1. ldd - 检查依赖库是否存在问题 问题:ssh连接不上,之前一直没有问题,最近别人安装了其他桌面(系统Ubuntu) 解决: 查看进程,发现没有启动 ps -ef | grep ssh 重新安 ...

  2. Lucene简单总结

    Lucene API Document Document:文档对象,是一条原始数据 文档编号 文档内容 1 谷歌地图之父跳槽FaceBook 2 谷歌地图之父加盟FaceBook 3 谷歌地图创始人拉 ...

  3. tcl之控制流-break/continue

  4. thymelef模板报错 the entity name must immediately follow the '&' in the entity reference

    thymelef模板里面是不能实用&符号的 要用&转义符代替,官网也有文档说明可以用官方的通配符代替,官方文档http://www.thymeleaf.org/doc/tutorial ...

  5. 【yii2】rules规则的默认值

    ExampleModel.php /** * {@inheritdoc} */ public function rules() { return [ ['updated_at','default',' ...

  6. 两种查看SIP版本的方法python

    第一种:进入python命令行 print(sip.SIP_VERSION_STR) 注意对应的PyQt版本号和大小写 print(PyQt5.sip.SIP_VERSION_STR) 第二种:直接在 ...

  7. 1016-01-首页16-计算配图的frame----MJExtention的使用

    -------HWPhoto.h--------------------------------------------- #import <Foundation/Foundation.h> ...

  8. 29-自己动手构建RequestDelegate管道

    1-使用vsCode新建个项目 2-新建RequestDelegate和Context public delegate Task RequestDelegate(Context context); p ...

  9. 笔记-爬虫-selenium常用方法

    笔记-爬虫-selenium常用方法 1.      查找元素 常用的查找方法 find_element_by_name find_element_by_xpath find_element_by_l ...

  10. spark的排序方法

    今天我们来介绍spark中排序的操作,spark的排序很简单,我们可以直接使用sortBy来进行,这个里面我们使用case clas,使用case class的好处是1.不用newjiukeyi 搞出 ...