【问题标题】:How can I fix these nuget package conflicts so my project can bulld?如何解决我的项目无法构建的这些 nuget 包冲突?
【发布时间】:2017-11-15 13:29:52
【问题描述】:

以下是冲突:

这是图片中的文字:

Severity    Code    Description Project File    Line    Suppression State
Error   CS1705  Assembly 'Microsoft.Xrm.Sdk.Workflow' with identity 'Microsoft.Xrm.Sdk.Workflow, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'Microsoft.Xrm.Sdk' with identity 'Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'    LVP.MadeUpOrganization.Activity C:\Users\Primary User\Desktop\Developer Training 2.0\LVP.MadeUpOrganization\LVP.MadeUpOrganization.Activity\CSC 1   Active
Error   CS0006  Metadata file 'C:\Users\Primary User\Desktop\Developer Training 2.0\LVP.MadeUpOrganization\LVP.MadeUpOrganization.Activity\bin\Debug\LVP.MadeUpOrganization.Activity.dll' could not be found    LVP.MadeUpOrganization.Activity.UnitTest    C:\Users\Primary User\Desktop\Developer Training 2.0\LVP.MadeUpOrganization\LVP.MadeUpOrganization.Activity.UnitTest\CSC    1   Active
Warning     Found conflicts between different versions of the same dependent assembly that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed. LVP.MadeUpOrganization.Activity         
Warning CS0168  The variable 'e' is declared but never used LVP.MadeUpOrganization.Activity C:\Users\Primary User\Desktop\Developer Training 2.0\LVP.MadeUpOrganization\LVP.MadeUpOrganization.Activity\Activity\WorkflowActivity1.cs   39  Active
Warning     Found conflicts between different versions of the same dependent assembly that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed. LVP.MadeUpOrganization.Activity.UnitTest    

我使用的是 Visual Studio Enterprise 2015。
以下是更多截图:

【问题讨论】:

    标签: c# asp.net .net visual-studio msbuild


    【解决方案1】:

    您已安装 Microsoft.Xrm.Sdk 版本 6,但您需要 8 版本,以便与您的 Microsoft.Xrm.Sdk.Workflow 兼容。

    您可以将 Microsoft.Xrm.Sdk 升级到 8 或将 Microsoft.Xrm.Sdk.Workflow 降级到 6。

    【讨论】:

    • 我刚刚想通了。我将 Microsoft.CrmSdk.CoreAssemblies 包(包含 Microsoft.Xrm.Sdk)恢复到 6.1.2,它构建得很好!
    • 但是,我会注意到更新 Microsoft.CrmSdk.CoreAssemblies 包会破坏它,我不知道如何更新 bin/coretools 目录中过时的 Microsoft.Xrm.Sdk项目,因为似乎更高版本的 Microsoft.CrmSdk.CoreAssemblies 包不再使用该目录。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-26
    • 2018-05-19
    • 1970-01-01
    • 2022-08-04
    • 2018-08-21
    • 2018-03-07
    相关资源
    最近更新 更多