大家在打包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. httpd虚拟主机、站点访问控制、基于用户的访问控制、持久链接等应用配置实例

    httpd配置内容 httpd2.2 配置文件: /etc/httpd/conf/httpd.conf /etc/httpd/conf.d/*.conf 服务脚本: /etc/rc.d/init.d/ ...

  2. Shell脚本使用汇总整理

    Shell脚本使用汇总整理 一.Shell脚本常用的头部格式: 头部的作用就是告知linux此脚本的类型: 常用的头部格式如下:(/bin/bash,是bash的路径,如果不知道路径可以通过which ...

  3. 如何设置 html 中 select 标签不可编辑、只读

    转载自: https://blog.csdn.net/hjm4702192/article/details/33729767 1. <select style="width:195px ...

  4. JavaScript通过HTML的class来获取HTML元素的方法总结

    对于js来说,我想每一个刚接触它的人都应该会抱怨:为什么没有一个通过class来获取元素的方法.尽管现在高版本的浏览器已经支持getElementsByClassName()函数,但是对于低版本浏览器 ...

  5. python之微信自动发送消息

    代码如下: from __future__ import unicode_literals from threading import Timer from wxpy import * import ...

  6. iOS-cell的封装和重用

    一.通过xib描述cell---(cell的高度一致,cell里面控件布局基本一样): 1.(M) 创建模型: -------------------------------------------- ...

  7. caioj:1093: 并查集2(scy的删边问题) C++

    题目描述 [题目描述] 读入一个无向图(可能含有多个连通分支),输出最多能删掉多少条边,而不改变这个图任意两点的连通性(原来连通的两个点依然连通,不连通的依然不连通). [输入格式] 第一行为图的顶点 ...

  8. 17-比赛1 F - 较小元素 Weak in the Middle (set)

    Seg-El has last chance to make the final changes in order to prevent the destruction of Krypton. He ...

  9. Alter the structure of web pages with JavaScript

    Most of the DOM methods you've seen so far are useful for identifying elements. Both getElementById ...

  10. linux命令随身记

    赋予权限命令:chmod 755 * 查询进程: ps -ef |grep abc 查看含有"abc"的活动进程 ps -ef |grep -v abc 查看不含abc的活动进程 ...