none
MSB3277: Found conflicts between different versions of the same dependent assembly RRS feed

  • Question

  • I'm using VS2013 and there is only one project in my solution.  I'm using MVC and Razor and the project is an Umbraco instance version 7.4.2.

    After installing Google.Apis.Calendar.v3 with Nuget in my project, I get this build error:

    1>------ Rebuild All started: Project: UmbracoWebsites, Configuration: Debug Any CPU ------ 1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3277: 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. 1>  UmbracoWebsites -> C:\Users\roger_000\Documents\Visual Studio 2013\Projects\UmbracoWebsites\UmbracoWebsites\bin\UmbracoWebsites.dll ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

    Having searched for help, I found the http://mikehadlow.blogspot.co.uk/2011/02/asmspy-little-tool-to-help-fix-assembly.html tool which outputs lists of assemblies and their references.  Its output is:

    1.11.1.0 by Google.Apis
        1.11.1.0 by Google.Apis.PlatformServices
    Reference: Google.Apis.Auth
        1.11.1.0 by Google.Apis.Auth.PlatformServices
    Reference: BouncyCastle.Crypto
        1.7.4137.9688 by Google.Apis.Auth.PlatformServices
    Reference: Google.Apis.PlatformServices
        1.11.1.0 by Google.Apis.Auth.PlatformServices
    Reference: Google.Apis
        1.11.1.0 by Google.Apis.Calendar.v3
    Reference: Zlib.Portable
        1.11.0.0 by Google.Apis
    Reference: log4net
        1.2.13.0 by Google.Apis.PlatformServices
        1.2.11.0 by Umbraco.Core
        1.2.11.0 by Umbraco.Web.UI
    Reference: Microsoft.CSharp
        4.0.0.0 by ImageProcessor
        4.0.0.0 by MiniProfiler
        4.0.0.0 by System.Web.Helpers
        4.0.0.0 by System.Web.WebPages
        4.0.0.0 by Umbraco.Core
        4.0.0.0 by umbraco
        4.0.0.0 by umbraco.MacroEngines
        4.0.0.0 by UmbracoWebsites
    Reference: ImageProcessor
        2.3.3.0 by ImageProcessor.Web
    Reference: System.Runtime.Caching
        4.0.0.0 by ImageProcessor.Web
        4.0.0.0 by System.Web.Helpers
        4.0.0.0 by System.Web.Mvc
        4.0.0.0 by Umbraco.Core
    Reference: Microsoft.Owin
        2.1.0.0 by Microsoft.AspNet.Identity.Owin
        3.0.1.0 by Microsoft.Owin.Host.SystemWeb
        3.0.1.0 by Microsoft.Owin.Security.Cookies
        3.0.1.0 by Microsoft.Owin.Security
        3.0.1.0 by Microsoft.Owin.Security.OAuth
        3.0.1.0 by Umbraco.Core
        2.1.0.0 by Umbraco.Core
        3.0.1.0 by umbraco
        2.1.0.0 by umbraco
    Reference: Microsoft.AspNet.Identity.Core
        2.0.0.0 by Microsoft.AspNet.Identity.Owin
        2.0.0.0 by Umbraco.Core
        2.0.0.0 by umbraco
    Reference: Microsoft.Owin.Security.OAuth
        2.1.0.0 by Microsoft.AspNet.Identity.Owin
    Reference: Microsoft.Owin.Security
        2.1.0.0 by Microsoft.AspNet.Identity.Owin
        3.0.1.0 by Microsoft.Owin.Security.Cookies
        3.0.1.0 by Microsoft.Owin.Security.OAuth
        3.0.1.0 by Umbraco.Core
        2.1.0.0 by Umbraco.Core
        3.0.1.0 by umbraco
    Reference: Owin
        1.0.0.0 by Microsoft.AspNet.Identity.Owin
        1.0.0.0 by Microsoft.Owin
        1.0.0.0 by Microsoft.Owin.Host.SystemWeb
        1.0.0.0 by Microsoft.Owin.Security.Cookies
        1.0.0.0 by Microsoft.Owin.Security
        1.0.0.0 by Microsoft.Owin.Security.OAuth
        1.0.0.0 by umbraco
    Reference: Microsoft.Owin.Security.Cookies
        2.1.0.0 by Microsoft.AspNet.Identity.Owin
        3.0.1.0 by Umbraco.Core
        3.0.1.0 by umbraco
        2.1.0.0 by umbraco
    Reference: System.Runtime
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Collections.Immutable
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Diagnostics.Debug
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Collections.Immutable
        4.0.0.0 by System.Reflection.Metadata
    Reference: Microsoft.CodeAnalysis
        1.0.0.0 by Microsoft.CodeAnalysis.CSharp
        1.0.0.0 by Umbraco.ModelsBuilder
    Reference: System.Collections.Immutable
        1.1.36.0 by Microsoft.CodeAnalysis.CSharp
        1.1.36.0 by Microsoft.CodeAnalysis
        1.1.36.0 by System.Reflection.Metadata
        1.1.36.0 by Umbraco.ModelsBuilder
    Reference: System.Collections
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Collections.Immutable
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Threading.Tasks
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
    Reference: System.Linq.Expressions
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
    Reference: System.Globalization
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Collections.Immutable
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Collections.Concurrent
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
    Reference: System.Linq
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Collections.Immutable
    Reference: System.Text.Encoding
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.IO
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Threading.Tasks.Parallel
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
    Reference: System.Reflection.Metadata
        1.0.21.0 by Microsoft.CodeAnalysis.CSharp
        1.0.21.0 by Microsoft.CodeAnalysis
    Reference: System.Threading
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Collections.Immutable
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Xml.ReaderWriter
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
    Reference: System.Xml.XDocument
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
    Reference: System.Diagnostics.Tools
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Collections.Immutable
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Resources.ResourceManager
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Collections.Immutable
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Reflection.Primitives
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Dynamic.Runtime
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
    Reference: System.Runtime.Extensions
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Collections.Immutable
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Reflection
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Collections.Immutable
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Runtime.InteropServices
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Text.Encoding.Extensions
        4.0.0.0 by Microsoft.CodeAnalysis.CSharp
        4.0.0.0 by Microsoft.CodeAnalysis
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Runtime.Serialization
        4.0.0.0 by Microsoft.Owin.Security.Cookies
        4.0.0.0 by MiniProfiler
        4.0.0.0 by Newtonsoft.Json
        4.0.0.0 by System.Net.Http.Formatting
        4.0.0.0 by System.Web.Http
        4.0.0.0 by Umbraco.Core
        4.0.0.0 by umbraco
        4.0.0.0 by Umbraco.ModelsBuilder
    Reference: System.Security
        4.0.0.0 by Microsoft.Owin.Security
    Reference: System.IdentityModel
        4.0.0.0 by Microsoft.Owin.Security
    Reference: System.Transactions
        4.0.0.0 by MiniProfiler
        4.0.0.0 by MySql.Data
        2.0.0.0 by System.Data.SqlServerCe
        4.0.0.0 by System.Data.SqlServerCe.Entity
    Reference: System.Web.WebPages
        1.0.0.0 by MiniProfiler
        3.0.0.0 by System.Web.Helpers
        3.0.0.0 by System.Web.Mvc
        3.0.0.0 by System.Web.WebPages.Razor
        3.0.0.0 by umbraco
        3.0.0.0 by umbraco.MacroEngines
    Reference: System.Data.Linq
        4.0.0.0 by MiniProfiler
        4.0.0.0 by System.Web.Mvc
        4.0.0.0 by System.Web.WebPages
    Reference: System.Configuration.Install
        4.0.0.0 by MySql.Data
    Reference: System.Management
        4.0.0.0 by MySql.Data
    Reference: System.Numerics
        4.0.0.0 by Newtonsoft.Json
    Reference: System.Data.SqlServerCe
        4.0.0.1 by SQLCE4Umbraco
        4.0.0.1 by System.Data.SqlServerCe.Entity
        4.0.0.1 by Umbraco.Core
    Reference: System.Data.Entity
        4.0.0.0 by System.Data.SqlServerCe.Entity
        4.0.0.0 by System.Web.Mvc
        4.0.0.0 by Umbraco.Core
    Reference: System.Reflection.Extensions
        4.0.0.0 by System.Reflection.Metadata
    Reference: System.Web.DataVisualization
        4.0.0.0 by System.Web.Helpers
    Reference: System.Net.Http.Formatting
        5.2.3.0 by System.Web.Http
        5.2.3.0 by System.Web.Http.WebHost
        5.2.3.0 by umbraco
        5.2.3.0 by Umbraco.ModelsBuilder
    Reference: System.ComponentModel.DataAnnotations
        4.0.0.0 by System.Web.Http
        4.0.0.0 by System.Web.Mvc
        4.0.0.0 by System.Web.WebPages
        4.0.0.0 by Umbraco.Core
        4.0.0.0 by umbraco
        4.0.0.0 by Umbraco.ModelsBuilder
        4.0.0.0 by UmbracoWebsites
    Reference: System.Web.Http
        5.2.3.0 by System.Web.Http.WebHost
        5.2.3.0 by umbraco
        5.2.3.0 by Umbraco.ModelsBuilder
    Reference: System.Web.Razor
        3.0.0.0 by System.Web.Mvc
        3.0.0.0 by System.Web.WebPages
        3.0.0.0 by System.Web.WebPages.Razor
        3.0.0.0 by umbraco.MacroEngines
    Reference: System.Web.WebPages.Razor
        3.0.0.0 by System.Web.Mvc
        3.0.0.0 by umbraco.MacroEngines
        3.0.0.0 by Umbraco.ModelsBuilder
    Reference: Microsoft.Web.Infrastructure
        1.0.0.0 by System.Web.Mvc
        1.0.0.0 by System.Web.WebPages.Deployment
        1.0.0.0 by System.Web.WebPages
    Reference: System.Web.WebPages.Deployment
        3.0.0.0 by System.Web.WebPages
    Reference: Microsoft.AspNet.Identity.Owin
        2.0.0.0 by Umbraco.Core
        2.0.0.0 by umbraco
    Reference: Semver
        1.1.2.0 by Umbraco.Core
        1.1.2.0 by umbraco
    Reference: MySql.Data
        6.9.8.0 by Umbraco.Core
        6.9.8.0 by umbraco.DataLayer
    Reference: MiniProfiler
        2.1.0.0 by Umbraco.Core
    Reference: HtmlAgilityPack
        1.4.9.0 by Umbraco.Core
        1.4.9.0 by umbraco
    Reference: Microsoft.ApplicationBlocks.Data
        1.0.1559.20655 by umbraco.DataLayer
    Reference: CookComputing.XmlRpcV2
        2.5.0.0 by umbraco
    Reference: controls
        1.0.5921.28480 by umbraco
        1.0.5921.28480 by umbraco.editorControls
        1.0.5921.28480 by Umbraco.Web.UI
    Reference: System.Design
        4.0.0.0 by umbraco
    Reference: Examine
        0.1.68.0 by umbraco
        0.1.68.0 by umbraco.MacroEngines
        0.1.68.0 by UmbracoExamine
    Reference: System.Web.Http.WebHost
        5.2.3.0 by umbraco
    Reference: Microsoft.Owin.Host.SystemWeb
        3.0.1.0 by umbraco
    Reference: System.ServiceModel
        4.0.0.0 by umbraco
    Reference: umbraco.providers
        1.0.5921.28480 by umbraco
    Reference: dotless.Core
        1.4.1.0 by umbraco
    Reference: MarkdownSharp
        1.0.0.0 by umbraco
    Reference: UmbracoExamine
        0.7.0.28479 by umbraco
    Reference: umbraco
        1.0.5921.28480 by umbraco.editorControls
        1.0.5921.28480 by umbraco.MacroEngines
        1.0.5877.24766 by Umbraco.ModelsBuilder
        1.0.5921.28480 by Umbraco.Web.UI
        1.0.5921.28480 by UmbracoWebsites
    Reference: Microsoft.CodeAnalysis.CSharp
        1.0.0.0 by Umbraco.ModelsBuilder
    Reference: umbraco.MacroEngines
        1.0.5921.28482 by UmbracoWebsites

    Now I'm out of my depth!  Does the above highlight the assembly conflict?  If so, what is it and how do I resolve it?

    Your help would be much appreciated.

    Thanking you in anticipation.

    Roger


    rogerwithnell

    Friday, March 25, 2016 11:18 PM

All replies

  • Hi rogerwithnell,

    >> C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved.

    >> Now I'm out of my depth!  Does the above highlight the assembly conflict?  If so, what is it and how do I resolve it?

    According to the final output result you could find that the “log4net”,” Microsoft.Owin”,” Microsoft.Owin.Security”,” Microsoft.Owin.Security.Cookies”,” System.Transactions” and “System.Web.WebPages” have been referenced by different assemblies with different versions, you could remove the error version of the assemblies and add the right versions of them to make sure the project use the same versions.

    Besides, there is a thread to handle this similar issue and you could have a look.

    http://stackoverflow.com/questions/17806/warning-found-conflicts-between-different-versions-of-the-same-dependent-assemb

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 29, 2016 9:07 AM
  • Thanks for you post, Li.

    By setting the build output verbosity to Detailed, I have the details on what is causing the conflicts.

    My project was working fine until I installed Google.Apis.Calendar.  The conflicts that then occurred were with:
     mscorlib
     system.core
     System
     ClientDependency.Core
     NewtonSoft.Json
     log4net
     Umbraco.Core
     umbraco

    Looking at log4net as an example, here is the log for its conflict:

    1>  There was a conflict between "log4net, Version=1.2.11.0, Culture=neutral, Pub
    1>  licKeyToken=null" and "log4net, Version=1.2.13.0, Culture=neutral, PublicKeyT
    1>  oken=669e0ddf0bb1aa2a".
    1>      "log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=null" was cho
    1>  sen because it was primary and "log4net, Version=1.2.13.0, Culture=neutral, P
    1>  ublicKeyToken=669e0ddf0bb1aa2a" was not.
    1>      References which depend on "log4net, Version=1.2.11.0, Culture=neutral, P
    1>  ublicKeyToken=null" [C:\Users\roger_000\Documents\Visual Studio 2013\Projects
    1>  \UmbracoWebsites\UmbracoWebsites\bin\log4net.dll].
    1>          C:\Users\roger_000\Documents\Visual Studio 2013\Projects\UmbracoWebsi
    1>  tes\UmbracoWebsites\bin\log4net.dll
    1>            Project file item includes which caused reference "C:\Users\roger_0
    1>  00\Documents\Visual Studio 2013\Projects\UmbracoWebsites\UmbracoWebsites\bin\
    1>  log4net.dll".
    1>              Umbraco.Web.UI, Version=1.0.5921.28482, Culture=neutral, processo
    1>  rArchitecture=MSIL
    1>              controls, Version=1.0.5921.28480, Culture=neutral, processorArchi
    1>  tecture=MSIL
    1>              umbraco.providers, Version=1.0.5921.28480, Culture=neutral, proce
    1>  ssorArchitecture=MSIL
    1>              businesslogic, Version=1.0.5921.28478, Culture=neutral, processor
    1>  Architecture=MSIL
    1>              log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0d
    1>  df0bb1aa2a, processorArchitecture=MSIL
    1>              umbraco.editorControls, Version=1.0.5921.28481, Culture=neutral,
    1>  processorArchitecture=MSIL
    1>              SQLCE4Umbraco, Version=1.0.5921.28479, Culture=neutral, processor
    1>  Architecture=MSIL
    1>              umbraco.DataLayer, Version=1.0.5921.28478, Culture=neutral, proce
    1>  ssorArchitecture=MSIL
    1>              Umbraco.Core, Version=1.0.5921.28477, Culture=neutral, processorA
    1>  rchitecture=MSIL
    1>              UmbracoExamine, Version=0.7.0.28479, Culture=neutral, processorAr
    1>  chitecture=MSIL
    1>              cms, Version=1.0.5921.28479, Culture=neutral, processorArchitectu
    1>  re=MSIL
    1>              umbraco.MacroEngines, Version=1.0.5921.28482, Culture=neutral, pr
    1>  ocessorArchitecture=MSIL
    1>              umbraco, Version=1.0.5921.28480, Culture=neutral, processorArchit
    1>  ecture=MSIL
    1>          C:\Users\roger_000\Documents\Visual Studio 2013\Projects\UmbracoWebsi
    1>  tes\UmbracoWebsites\bin\Umbraco.Core.dll
    1>            Project file item includes which caused reference "C:\Users\roger_0
    1>  00\Documents\Visual Studio 2013\Projects\UmbracoWebsites\UmbracoWebsites\bin\
    1>  Umbraco.Core.dll".
    1>              UmbracoExamine, Version=0.7.0.28479, Culture=neutral, processorAr
    1>  chitecture=MSIL
    1>              controls, Version=1.0.5921.28480, Culture=neutral, processorArchi
    1>  tecture=MSIL
    1>              Umbraco.Web.UI, Version=1.0.5921.28482, Culture=neutral, processo
    1>  rArchitecture=MSIL
    1>              umbraco.DataLayer, Version=1.0.5921.28478, Culture=neutral, proce
    1>  ssorArchitecture=MSIL
    1>              SQLCE4Umbraco, Version=1.0.5921.28479, Culture=neutral, processor
    1>  Architecture=MSIL
    1>              umbraco, Version=1.0.5921.28480, Culture=neutral, processorArchit
    1>  ecture=MSIL
    1>              Umbraco.Core, Version=1.0.5921.28477, Culture=neutral, processorA
    1>  rchitecture=MSIL
    1>              umbraco.providers, Version=1.0.5921.28480, Culture=neutral, proce
    1>  ssorArchitecture=MSIL
    1>              umbraco.editorControls, Version=1.0.5921.28481, Culture=neutral,
    1>  processorArchitecture=MSIL
    1>              umbraco.MacroEngines, Version=1.0.5921.28482, Culture=neutral, pr
    1>  ocessorArchitecture=MSIL
    1>              businesslogic, Version=1.0.5921.28478, Culture=neutral, processor
    1>  Architecture=MSIL
    1>              cms, Version=1.0.5921.28479, Culture=neutral, processorArchitectu
    1>  re=MSIL
    1>          C:\Users\roger_000\Documents\Visual Studio 2013\Projects\UmbracoWebsi
    1>  tes\UmbracoWebsites\bin\Umbraco.Web.UI.dll
    1>            Project file item includes which caused reference "C:\Users\roger_0
    1>  00\Documents\Visual Studio 2013\Projects\UmbracoWebsites\UmbracoWebsites\bin\
    1>  Umbraco.Web.UI.dll".
    1>              Umbraco.Web.UI, Version=1.0.5921.28482, Culture=neutral, processo
    1>  rArchitecture=MSIL
    1>      References which depend on "log4net, Version=1.2.13.0, Culture=neutral, P
    1>  ublicKeyToken=669e0ddf0bb1aa2a" [].
    1>          C:\Users\roger_000\Documents\Visual Studio 2013\Projects\UmbracoWebsi
    1>  tes\packages\Google.Apis.1.11.1\lib\net45\Google.Apis.PlatformServices.dll
    1>            Project file item includes which caused reference "C:\Users\roger_0
    1>  00\Documents\Visual Studio 2013\Projects\UmbracoWebsites\packages\Google.Apis
    1>  .1.11.1\lib\net45\Google.Apis.PlatformServices.dll".
    1>              Google.Apis.PlatformServices, Version=1.11.1.0, Culture=neutral,
    1>  PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL
    1>              Google.Apis.Auth.PlatformServices, Version=1.11.1.0, Culture=neut
    1>  ral, PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL

    log4net was not installed before I added Google.Apis.Calendar; it is one of its dependencies.  But once it is installed it requires log4net version 1.2.13.0 whereas other assemblies need version 1.2.11.0.  1.2.11.0 was "was chosen because it was primary" but Google.Apis.Calendar requires 1.2.13.0.  Hence Google Calendar breaks.

    How do I make it choose the 1.2.13.0 version?  I think I have to use bindingRedirect but where do I put it?  If it is the app config file, where is it? 

    There are other bindingRedirects in the web.config, including NewtonSoft.Json, which is another of the conflicts listed above.  Version 6.0.0.0 of NewtonSoft.Json has been chosen over version 7.0.0.0 (which is required by Google.Apis.Calendar) and the bindingRedirect in the web.config calls 6.0.0.0 as the new version but, if I change this to 7.0.0.0, on running the project I get the error "Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)" (Newtonsoft.Json.xml is not available in the bin folder, incidentally.  Is this a problem?).

    I hope this all makes sense.  I would much appreciate your advice.

    Roger


    rogerwithnell

    Thursday, March 31, 2016 10:33 PM
  • Hi rogerwithnell,

    >>My project was working fine until I installed Google.Apis.Calendar.

    According to your detailed error message shows, I guess the “Google.Apis.Calendar” you added is a little newer, because all of the references of it are more newer than yours. You’d better try to degrade the “Google.Apis.Calendar” or upgrade your project.

    >>log4net was not installed before I added Google.Apis.Calendar; it is one of its dependencies.  But once it is installed it requires log4net version 1.2.13.0 whereas other assemblies need version 1.2.11.0.  1.2.11.0 was "was chosen because it was primary" but Google.Apis.Calendar requires 1.2.13.0.  Hence Google Calendar breaks.

    You could try removing the “log4net version 1.2.13.0” to solve the conflict.

    >> I think I have to use bindingRedirect but where do I put it?  If it is the app config file, where is it? 

    If you still want to use the new version of “Google.Apis.Calendar”. The “bindingRedirect” is a good method to solve it, because it used to redirect one assembly version to another. For this, you could have a look at this thread. The settings of it is under the “configuration-> runtime” section in config file.

    About how to use the “bindingRedirect”, you’d better follow below article to learn it.

    https://msdn.microsoft.com/en-us/library/eftw1fys%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 4, 2016 1:41 AM