none
No way to resolve conflict between Microsoft.Practices.EnterpriseLibrary.Data Version=6.0.0.0 (...) and (...) Version=3.1.0.0 RRS feed

  • Question

  • When I build my solution, for many projects I get the following "error" in the Output window:

    No way to resolve conflict between "Microsoft.Practices.EnterpriseLibrary.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "Microsoft.Practices.EnterpriseLibrary.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.

    How can I fix it?

    The web application works perfectly nonetheless (as it says, it chooses the correct version 6.0.0.0 and the show continues).

    There are no Errors, Warnings or even Messages in the Error List window.

    Everything is "clean" of disturbing messages, except for the above one (that repeats it self a lot of times).

    I have already:

    - Checked that all Enterprise.* NuGet packages are version 6.*

    - Closed and opened Visual Studio, with and without Clean[ing]

    - Deleted Visual Studio cache for both VS2017 and VS2019

    - Searched the entire disk for any filename with Microsoft.Practices.EnterpriseLibrary.Data in the name or in the contents, the ones that were found had no reference to any 3.* version either in name, file properties and file contents.

    - Searched online and there are many links with people struggling with this kind of "No way to resolve conflict between" errors but neither the available solutions worked with me, or the problems were with specifically the Microsoft.Practices.EnterpriseLibrary.Data library.

    If you have any other clues that I could use to eradicate this message from my Output window, I will be very thankful.

    Friday, May 10, 2019 2:29 PM

All replies

  • Hi Rui Pinheiro,

    Sorry for delay in reply.

    According to your description, please refer to the following suggestions:

    ## uninstall the nuget package 

    right-click reference>> Manage Nuget packages... >>select the Installed tag >> then unistall the version 3.1.0.0 version

    ## move the 3.* version away

    Please debug the project, then during debugging, open the module window in the Debug/Windows, then you find the path and loading version of the file


    If there is any update information, please feel free to contact us.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Monday, May 13, 2019 9:30 AM
  • Hello Dylan,

    Thank you for your answer.

    Unfortunately it seems your suggestions do not fit my specific case.

    When you say:

    ## uninstall the nuget package 
    
    right-click reference
    >> Manage Nuget packages...
    >> select the Installed tag
    >> then unistall the version 3.1.0.0 version
    
    

    First, I didn't understand where to right-click. If I right-click the reference, there is no Manage Nuget packages option:

    

    Maybe you meant right-clicking the Solution, or going through the menu Tools -> NuGet Package Manager. Just to be exact on this point. So, that's what I did.

    I selected the Installed tab and found no such libraries as listed in your screenshot. I can see the Microsoft.Practices.EnterpriseLibrary.* items in the Browse tab, but not in the Installed one. When I see them in the Browse tab, I see they are v3.1.0. There are no such v6.0.0 versions.

    So strange. I investigated a bit and found that the v6.0.0 versions changed the name - they have no longer the Microsoft.Practices part prefixing it. So here is what I see:

    At this point, I could deduce with great confidence that I have no v3.1.0 versions installed, just v6.0.0. So I skipped your first suggestion and tried the second one.

    ## move the 3.* version away
    
    Please debug the project, then during debugging,
    open the module window in the Debug/Windows,
    then you find the path and loading version of the file

    I did that and this is what I saw:


    As you can see above, I searched by *EnterpiseLibrary* and found those references, all of them v6.0.0.

    The problem continues:


    Tuesday, May 14, 2019 9:25 AM
  • Hi Rui Pinheiro,

    Sorry for delay in reply.

    From your reply, the conflict is likely to be within the project. I suggest you could create an App config file to bind specified version of assembly. For information about how to configure, please refer to the following link

    https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/redirect-assembly-versions

    Hope it can help you.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, May 17, 2019 9:42 AM
  • Hello Dylan,

    Thank you for your answer.

    I have also did that. Here is what I have in the app.config of one of the affected projects:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <configSections>
            <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </configSections>
        <entityFramework>
            <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
                <parameters>
                    <parameter value="v11.0" />
                </parameters>
            </defaultConnectionFactory>
            <providers>
                <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
            </providers>
        </entityFramework>
        <runtime>
    (...)
                <dependentAssembly>
                    <assemblyIdentity name="Microsoft.Practices.EnterpriseLibrary.Data" publicKeyToken="31bf3856ad364e35" culture="neutral" />
                    <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
                </dependentAssembly>
            </assemblyBinding>
        </runtime>
        <startup>
            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
        </startup>
    </configuration>
    

    Building that project gives:

    1>------ Rebuild All started: Project: (...)
    (...)[no errors here, just building dependencies](...)
    
    9>------ Rebuild All started: Project: MyProject, Configuration: Debug Any CPU ------
    9>  No way to resolve conflict between "Microsoft.Practices.EnterpriseLibrary.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "Microsoft.Practices.EnterpriseLibrary.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.
    9>  MyProject -> C:\MyProject\bin\Debug\MyProject.dll
    ========== Rebuild All: 9 succeeded, 0 failed, 0 skipped ==========

    What can I do more?

    Monday, May 20, 2019 9:01 AM
  • Hi Rui,

    It seems that there are 9 projects in the same solution, am I right?

    If so, whether different project has the reference relationship each other? For example, Project A was added as the library reference in project B.

    Please check that whether all projects have add different versions assembly about the Microsoft.Practices.EnterpriseLibrary.Data.dll or it was added as the dependencies package like this case I met before:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/452b62d1-6bda-43de-9f1e-9e72bc90c68d/how-to-identify-the-source-for-warning-quot-no-way-to-resolve-conflict-betweenquot?forum=visualstudiogeneral

    As far as I know, we could update the package version or install nuget package without the dependencies. If possible, you could check it in your side.

    If you get any latest information, feel free to share it here.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 21, 2019 5:47 AM
    Moderator