Umbraco 7 Could not load file or assembly - umbraco

i downloaded Umbraco using WebMatrix, after updating Nuget packages it is finally giving error as below
Could not load file or assembly 'System.Web.Mvc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).
Please suggest where I am doing wrong??

You should download the release version of Umbraco you currently have installed and then add a reference to the 'System.Web.Mvc.dll' that comes in the source files instead.
Umbraco Releases
ps. You can find the version of Umbraco installed by looking for and AppSetting named 'umbracoConfigurationStatus' in the web.config file.

Related

YSOD Could not load file or assembly CMS.DataEngine - after Kentico 11.0.0 upgrade to Kentico 12 SP1

Just finished upgrading Kentico 11.0.0 with MVC, to Kentico 12 SP1 using https://docs.kentico.com/k12sp/installation/upgrading-to-kentico-12
No issues during upgrade.
Kentico CMS is coming up fine on local IIS and Azure app.
MVC site came up fine on local IIS.
But staging MVC site is showing this error in Azure app:
Server Error in '/' Application.
Could not load file or assembly
'CMS.DataEngine, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=834b12a258f213f9' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
Had to delete old files when publishing
Warning
Backup your Kentico CMS published version's media folder before doing this. That is where media library files are stored. Database only contains a reference. Once published and you confirm CMS is up, you will see a yellow exclamation mark next to every image in media library application. Restore the folder from backup so that Media Library files get synced up.
I've found that several DLLs from kentico 11 were left in the bin folder and that was the reason for this error while VS project compiled successfully without any issue:
Once I deleted them all started working fine and the website loaded successfully.
I have the same error.
The Lib folder was exist inside the folder of the solution with file explorer, but unlike the previous version (Kentico 11), when I have performed the upgrade, the Lib folder was not under the solution in visual studio! I have added the folder in visual studio under the solution with all the DLL and XML files from Lib folder. I have perform "clean solution", build all the projects and published it. Now it works.

System.IdentityModel.Tokens.Jwt version mismatch on Nuget packaging

Could not load file or assembly 'System.IdentityModel.Tokens.Jwt,
Version=4.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)
I have somehow returned to DLL hell.
I have an asp.net MVC app that I want to deploy via our CI:
TeamCity (2017.1.3) with the Octopusplugin (TeamCity Plugin)
Octopus deploying to azure website app
I've gotten this same pipeline to work for other web apps, but for this one MVC app that utilizes System.IdentityModel.Tokens.Jwt, version 4.0.4.403061554.
I run the app locally, and the FileAssembly version referenced is 4.0.4.403061554 as expected. However, when team city builds the nuget package, and I download and extract it, the System.IdentityModel.Tokens.Jwt file assembly version is set to 5.1.4.216 which is not what I am expecting.
I've drilled through all of my packages deplendencies, none are referencing this version of the dll.
I have searched through all of my files for any refernece of 5.1.4, nothing exists.
I have also checked the feature to Disable looking up packages from local machine cache when refreshing packages in TeamCity.
There is not a straight answer here, however a couple thoughts which could hopefully help in the right direction.
Maybe there is a lower level dependency to this package in any other project or nuget package, which gets built together and as a result the latest version gets into build directory? Just noted that the 5.1.4 is the latest version of System.IdentityModel.Tokens.Jwt.
I presume you employ BindingRedirect to version 4. Have there been braking changes? Could you not switch to using the latest version?
Have you looked in the build folder of the build server? Maybe you could narrow down the project/folder with the version 5.1.4?

Umbraco: How do I include the generated files after install?

I have installed Umbraco via nuget to empty project. I then ran the project so the installation started.
After installation ran there was lots of generated files so I have included them in project so that I can use source control.
I then ran project again and got the error:
Could not load file or assembly 'Newtonsoft.Json'
There is the dll file for this in bin folder and also a reference.
I think this might be because the "packages" folder created by nuget installation is not included in project. I do not know how to include this.
Does anyone know what I should do?
It turns out problem was in the Newtonsoft.Json file in nuget package. I downloaded latest dll from codeplex and it fixed the problem.

Sharp Architecture - NewtonSoft.Json assembly mismatch

Create a fresh Sharp Architecture project.
Successfully build, create DB, run Web app.
Attempt to add a new entity to the database via the web View.
Get the error:
Could not load file or assembly 'Newtonsoft.Json, Version=4.5.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)
Issue:
The Newtonsoft.Json package was not updated due to the -Safe param added in the Sharp Architecture instructions
Solution:
Manually update the NewtonSoft.Json package via the Package Manager Console:
Update-Package Newtonsoft.Json
Update the binding references for each project that includes that package via the Package Manager Console:
Add-BindingRedirect

MiniProfiler with mvc 3 and ef 4.3

So i've just installed miniprofiler.mvc to my web project and it seems to be working fine.
Except I cant figure out what to do to set up EF Code First and the docs seem to be outdated.
My project has a MyApp.DAL project where the EF stuff lives.
What do I need to do to start profiling EF? please help?
UPDATE:
I have installed MiniProfiler.EF 2.0.2 and now I get
Could not load file or assembly 'EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Have you made sure to install the EF package from Nuget?
http://nuget.org/packages/MiniProfiler.EF
PM> Install-Package MiniProfiler.EF
i've "fixed" it by simply adding EF to my Web Project
This is not ideal but it will do for now.

Resources