Issue upgrade from 7.1.0 to 7.1.1 - Newtonsoft.JSON
I'm receiving an error on the site after I performed the upgrade:
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)
I copied over the /bin and updated the web.config. I can see the Newtonsoft.Json.dll. What's missing or misconfigured that I can check? Environment is Server 2012.
@Jon - If I've understood you correctly, you have now removed the above Newtonsoft.Json related items from your Web.Config? This is not correct, those lines *should* be in the web.config for 7.1.1
Perhaps you missed some of the other files that were updated in this release - particularly in \Umbraco\Js ?
From 7.1.0 Release to 7.1.1 files were updated at least in the following folders \bin \Umbraco\assets\css \Umbraco\Js \Umbraco\Views
I had a 7.1 site and decided to upgrade it to 7.1.1 with nuget and it appeared nuget doesnt get the Newtonsoft dependancy correct and you get the nessage above.
So i used the we.config from the 7.1.1 download from umbraco and the web.config is different to the nuget one so i used that instead and then the dlls were mismatched so i copied the dlls too and it all sprang back ito life.
I have got the same problem here. I am trying to upgrade from 7.1 to 7.1.1. I can not do it through nuget, so I tried manualy copying all files from the folders bin, Umbraco and Umbraco_Client. I get the same Newtonsoft.JSON error as above. Do I miss any files?
I did the copy over first and had issues, so I did nuget (always apprehensive after the solution is established, always make backups) and it resolved - no clue what it was, I think it was a missing DLL on the copy over or something and I did have the web.config addition.
OK. So I am having the same issue with 7.1.6, but when I run my project in Visual Studio I get a big NewtonsoftJSON error.
When I copy the DLL from a downloaded .zip file of Umbraco 7.1.6 and replace the DLL and refresh my URL, the site pulls up, HOWEVER, when I stop the project and rerun it in VS 2012 I get the NewtonsoftJSON error again. Is this a system issue? My error is below. I did get the initial set up from a Nuget Package, BUT I keep getting this error.
=== Pre-bind state information ===
LOG: DisplayName = Newtonsoft.Json
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Newtonsoft.Json | Domain ID: 4
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///E:/MyProjects/eContentMain/econtentmain/
LOG: Initial PrivatePath = E:\MyProjects\eContentMain\econtentmain\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: E:\MyProjects\eContentMain\econtentmain\web.config
LOG: Using host configuration file: C:\Users\cmosqueda.MUSEUM\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/bf3f2092/b9f7bc25/Newtonsoft.Json.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/bf3f2092/b9f7bc25/Newtonsoft.Json/Newtonsoft.Json.DLL.
LOG: Attempting download of new URL file:///E:/MyProjects/eContentMain/econtentmain/bin/Newtonsoft.Json.DLL.
LOG: Using application configuration file: E:\MyProjects\eContentMain\econtentmain\web.config
LOG: Using host configuration file: C:\Users\cmosqueda.MUSEUM\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Redirect found in application configuration file: 4.5.0.0 redirected to 6.0.0.0.
LOG: Post-policy reference: Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/bf3f2092/b9f7bc25/Newtonsoft.Json.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/bf3f2092/b9f7bc25/Newtonsoft.Json/Newtonsoft.Json.DLL.
LOG: Attempting download of new URL file:///E:/MyProjects/eContentMain/econtentmain/bin/Newtonsoft.Json.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Stack Trace:
[FileLoadException: 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)]
[FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +34
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +16
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +38
[ConfigurationErrorsException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +736
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +217
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +170
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +91
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +284
System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +516
[HttpException (0x80004005): Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9885060
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Coming in behind everyone else... This is truly not an isolated occurance as I am having the same issue with 7.1.8
I have tried everything noted above and nothing has worked. I will note that on the update nuget installed another Newtonsoft directory in the projects for the updated copy and did not remove the old. I'm using VS 2013.
Any solid answers?
UPDATE:
I replaced the dll in the bin folder and noticed that the xml file was missing. I copied them back from the install files to my project as well as made sure the web.config reflected the 6.0.0.0 version mentioned above. This worked.
We found the same solution you did. However, when we rebuilt our project (we got some sutff from NuGet) that seemed to want to overwrite the version again. So what we ended up doing in VS is , we copied over the working DLL, deleted the reference to NewstonsoftJSON in VS and repointed it to the replaced DLL. This ensured when we built the project again, it kept the reference to the correct dll.
I'm having this same issue with 7.1.9 and NuGet Umbraco install. The orignal source NewtonsoftJSON files work when I copy them over but I have to keep copying them everytime I rebuild.
You are going to have to copy over the correct version agaib. Then in you references in Visual Studio point to your Umbraco bin folder Newtonsoft dll. It is most likely pointing to the wrong one.
I had the same issue - the NewtonSoft.Json.dll in the bin folder was outdated (Version 4.5.xxx in my case). So I was wondering, where it comes from. The nuget package manager considered that the version is 6.0.xxx. I searched for all the json dlls and found the outdated one in "App_Data/NuGetBackup/xxx". Deleting all the folders underneath the NuGetBackup-Folder did the trick. Everything works fine now.
Maybe I haven't understood the answers above or it is a slightly different case in different versions of Umbraco (with me it's 7.28) and risking that i repeat the existing answers in a slightly different order, but here how my installation finally triggered:
delete reference to Newtonsoft in current Umbraco
copy Newtonsoft.Json.dll and .XML from a recent Umbraco installation,
where the error didn't occur, if you have any, in the bin folder of
your current Umbraco
add reference to the bin folder of your current Umbraco
build
I didn't change anything in the web.config. The Newtonsoft entry was alright from a start.
Issue upgrade from 7.1.0 to 7.1.1 - Newtonsoft.JSON
I'm receiving an error on the site after I performed the upgrade:
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)
I copied over the /bin and updated the web.config. I can see the Newtonsoft.Json.dll. What's missing or misconfigured that I can check? Environment is Server 2012.
I commented out the following I added to the web.config (merged the packaged 7.1.1 with current) and the site came back up:
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
@Jon - If I've understood you correctly, you have now removed the above Newtonsoft.Json related items from your Web.Config?
This is not correct, those lines *should* be in the web.config for 7.1.1
Perhaps you missed some of the other files that were updated in this release - particularly in \Umbraco\Js ?
From 7.1.0 Release to 7.1.1 files were updated at least in the following folders
\bin
\Umbraco\assets\css
\Umbraco\Js
\Umbraco\Views
I have just experienced something similar.
I had a 7.1 site and decided to upgrade it to 7.1.1 with nuget and it appeared nuget doesnt get the Newtonsoft dependancy correct and you get the nessage above.
So i used the we.config from the 7.1.1 download from umbraco and the web.config is different to the nuget one so i used that instead and then the dlls were mismatched so i copied the dlls too and it all sprang back ito life.
HI
I have got the same problem here. I am trying to upgrade from 7.1 to 7.1.1. I can not do it through nuget, so I tried manualy copying all files from the folders bin, Umbraco and Umbraco_Client. I get the same Newtonsoft.JSON error as above.
Do I miss any files?
And wich dll's are you talking about?
I downloaded the Umbraco 7.1.1 zip and copied the dlls from the bin folder and used the config from the web.config.
Download here: http://our.umbraco.org/contribute/releases/711
It is probably the settings in the web config that are now wrong in particular in the assemblyBinding section - look for the newtonsoft entries.
I did the copy over first and had issues, so I did nuget (always apprehensive after the solution is established, always make backups) and it resolved - no clue what it was, I think it was a missing DLL on the copy over or something and I did have the web.config addition.
OK. So I am having the same issue with 7.1.6, but when I run my project in Visual Studio I get a big NewtonsoftJSON error.
When I copy the DLL from a downloaded .zip file of Umbraco 7.1.6 and replace the DLL and refresh my URL, the site pulls up, HOWEVER, when I stop the project and rerun it in VS 2012 I get the NewtonsoftJSON error again. Is this a system issue? My error is below. I did get the initial set up from a Nuget Package, BUT I keep getting this error.
Stack Trace:
Coming in behind everyone else... This is truly not an isolated occurance as I am having the same issue with 7.1.8
I have tried everything noted above and nothing has worked. I will note that on the update nuget installed another Newtonsoft directory in the projects for the updated copy and did not remove the old. I'm using VS 2013.
Any solid answers?
UPDATE:
I replaced the dll in the bin folder and noticed that the xml file was missing. I copied them back from the install files to my project as well as made sure the web.config reflected the 6.0.0.0 version mentioned above. This worked.
@Brett,
We found the same solution you did. However, when we rebuilt our project (we got some sutff from NuGet) that seemed to want to overwrite the version again. So what we ended up doing in VS is , we copied over the working DLL, deleted the reference to NewstonsoftJSON in VS and repointed it to the replaced DLL. This ensured when we built the project again, it kept the reference to the correct dll.
I'm having this same issue with 7.1.9 and NuGet Umbraco install. The orignal source NewtonsoftJSON files work when I copy them over but I have to keep copying them everytime I rebuild.
@Blake,
You are going to have to copy over the correct version agaib. Then in you references in Visual Studio point to your Umbraco bin folder Newtonsoft dll. It is most likely pointing to the wrong one.
I had the same issue - the NewtonSoft.Json.dll in the bin folder was outdated (Version 4.5.xxx in my case). So I was wondering, where it comes from. The nuget package manager considered that the version is 6.0.xxx. I searched for all the json dlls and found the outdated one in "App_Data/NuGetBackup/xxx". Deleting all the folders underneath the NuGetBackup-Folder did the trick. Everything works fine now.
Maybe I haven't understood the answers above or it is a slightly different case in different versions of Umbraco (with me it's 7.28) and risking that i repeat the existing answers in a slightly different order, but here how my installation finally triggered:
I didn't change anything in the web.config. The Newtonsoft entry was alright from a start.
is working on a reply...