Conflicts with different versions - breeze

I installed the Breeze Sharp client, but get the following warning.
Found conflicts between different versions of the same dependent
assembly. In Visual Studio, double-click this warning (or select it
and press Enter) to fix the conflicts; otherwise, add the following
binding redirects to the "runtime" node in the application
configuration file:
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" />
<bindingRedirect oldVersion="0.0.0.0-4.2.13.0" newVersion="4.2.13.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly><assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>

Please try using the latest Breeze.Sharp Nuget ( 0.5.9.0 or greater) and let me know if you still have issues.

Related

How do I get rid of these remapping warnings in a brand new MVC project after updating all nuget packages?

I've seen a million questions about this but it all seems a little different, I do apologize if this is a dupe though.
I've created a brand new MVC project. I've stripped out a bunch of Nuget packages I'm not using (bundling/optimization, jQuery, bootstrap, etc.).
When I build I get this:
1> Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from Version "4.5.0.0" [] to Version "9.0.0.0" [...\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll] to solve conflict and get rid of warning.
1> Consider app.config remapping of assembly "Antlr3.Runtime, Culture=neutral, PublicKeyToken=eb42632606e9261f" from Version "3.4.1.9004" [] to Version "3.5.0.2" [...\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll] to solve conflict and get rid of warning.
I also get the following in VS error list view:
Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /><bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Antlr3.Runtime" culture="neutral" publicKeyToken="eb42632606e9261f" /><bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" /></dependentAssembly></assemblyBinding>
I went ahead and double clicked that entry but it does nothing and the error is dismissed (no file content changes). When I build again I get the same warnings again each time.
This is the contents of my <runtime> object in my Web.config:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
What am I missing?
NOTE: I'm using Visual Studio 2015 Pro. This is a standard ASP.Net 4.5 MVC template project, not .Net Core.
EDIT: Forgot to mention the Solution Nuget manager "Consolidate" tab is empty for me.

Error when upgrading glass mapper

Currently i have glass mapper v3 and in process of upgrading to latest glass mapper i.e. v4, however when i build the project its giving me following error.
Severity Code Description Project File Line Suppression State
Error CS1705 Assembly 'Glass.Mapper.Sc.Mvc' with identity 'Glass.Mapper.Sc.Mvc, Version=4.2.1.188, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc' with identity 'System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Here is the table of support versions of MVC with Sitemap versions. 8.1 and 8.2 support 5.2 MVC.
https://kb.sitecore.net/articles/087164
The latest glass mapper may not work with the older versions of Sitecore.
You can upgrade your MVC to 5.2 and add bindings to your web.config to make requests to 5.1 work on 5.2.
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>

When I update ASP.NET MVC from 5.0 to 5.1, do I need to update the bindingRedirect to 5.1?

Should this...
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
...become this?
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
</dependentAssembly>
Or should I leave it alone?
What about when I update Razor from 3.0 to 3.1?
Should this...
<add key="webpages:Version" value="3.0.0.0" />
...become this?
<add key="webpages:Version" value="3.1.0.0" />
Or should I leave it alone?
What about when I go from 5.1.1 and 3.1.1 respectively? Should I be as granular as possible in my web.configs, or leave them at their major revisions? It seems to work both ways!
Late add:
And what the heck is going on here?
It says 5.1.1 in the path to the assembly, but 5.1.0.0 in the Version. Which number should I be using in the Web.config?
Yes to MVC, no to WebPages. WebPages assembly version did not change, it was only a NuGet package version upgrade.
On Web.config always use the assembly version, not the package version. I don't think they'll use the patch part on the assembly version, only on the package version.

Is there any free version for Telerik ASP.NET MVC 4?

I'm going to develop ASP.NET MVC 4 using VS2012.I heard that Telerik released some free version for Telerik MVC 4.I search everywhere but i couldn't find out.Anyone had a experience on it ?
There isn't a version of Telerik Extensions for ASP.NET MVC 4. However you can use the ASP.NET MVC 3 version without any problems. You need to add the following binding redirects to your web.config:
<configuration>
<!--... elements deleted for clarity ...-->
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Why is Combres still looking for an older version of System.Web.Mvc?

I'm using Combres with my MVC 3 RC project and getting an an assembly binding error when I deploy it to my web server.
System.IO.FileLoadException
Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
<%= Html.CombresLink("commonJs") %>
My development machine has the MVC 1 and 2 assemblies in the GAC, so it works fine there. The web server doesn't have any version of MVC in the GAC, and I'm bin-deploying the MVC 3 assembly. My project references version 3.0.0.0 of System.Web.Mvc, and I have the following section in my web.config:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly xmlns="">
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
I thought that this section would tell Combres to use version 3.0.0.0 instead. Why is my application failing to resolve the reference?
I don't think the binding redirect will chain - you have a reference to 1.0 somewhere, and your config tells it to load 2.0, which does not exist.
You need just one binding redirect with oldVersion set to "1.0.0.0-2.0.0.0"

Resources