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

  1. 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的目录,然后执行:

  1. 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. 注释java中某个方法过时

    添加一个注解即可 @Deprecated

  2. .NET 客户IP地址捕捉

    MVC模式下要获取客户IP可以在ActionFilterAttribute中进行拦截 filterContext.HttpContext.Request.UserHostAddress 同样,在Web ...

  3. Ubuntu 下安装GIMP

    1.Add GIMP PPA Open terminal from Unity Dash, App launcher, or via Ctrl+Alt+T shortcut key. When it ...

  4. python__基础 : 类的__new__方法与实现一个单例

    __new__ : 这个方法的作用主要是创建一个实例,在创建实例时首先会调用 __new__方法 ,然后调用__init__对实例进行初始化, 如果想修改 __new__ 这个方法,那么最后要 ret ...

  5. CI 框架源码解析一之入口文件 index.php

    Index.php作为CI框架的入口文件,源码分析,自然而然由此开始.在源码分析的过程中,我们并不会逐行进行解释,而只解释核心的功能和实现,如果英文水平很好的话,读过index.php文件的英文注释之 ...

  6. php解决sql_server连接问题

    1.首先根据phpinfo()查看当前php版本以及线程安全情况(ts或者nts):2.下载sqlsrv扩展(适用32位php) 下载链接为https://www.microsoft.com/en-u ...

  7. Python学习-django-Model操作

    Django之Model操作   一.字段 AutoField(Field) - int自增列,必须填入参数 primary_key=True BigAutoField(AutoField) - bi ...

  8. WPF Datagrid对鼠标单击进行响应,借助EventSetter

    在做的一个c#的项目中发现Datagrid没办法直接对鼠标单击进行响应, 调用MouseDown事件也需要点击某一行第二次才能响应. 所以借助EventSetter来简单的实现了一个. 界面部分的代码 ...

  9. IDA 对 SO 的逆向

    ApkTool对apk进行解包,在解包后的lib目录中找到so文件 so文件大概有以下几种 armeabi: 第5代.第6代的ARM处理器,早期的手机用的比较多. armeabiv-v7a:第7代及以 ...

  10. 进入saftmode解决方案

    Name node is in safe mode.The reported blocks 356 needs additional 2 blocks to reach the threshold 0 ...