The application was recently upgraded from Azure SDK 1.7 to 2.0 along with a bunch of other changes.
It spent a month in testing (hosted on Azure as it is on Live) and was all fine. We then released it Live where it was running for a few weeks with no problems, now out of the blue (no changes were made) I am getting this error when the web role is attempting to do stuff.
Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.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 can not find a reference to 1.7 anywhere in the project (they all use 2.0, I have even opened each project file in txtpad and double checked the references.), I have tried to add a binding redirect but still get the same error. What really stumps me is how it worked for so long and then started doing this? The testing team are positive that it was working when it went through testing and released. Any hints on what else I could try to resolve the issue greatly appreciated.
EDIT: I remoted in and found this in the event log, The application '/' belonging to site '19369254' has an invalid AppPoolId '14f1780d-4dcb-48b5-88eb-8e59eda5aff8' set. Therefore, the application will be ignored. May have something to do with it?
Related
I have worked with asp forms long time ago, now i must create a simple web interface, which uses powershell library.
[Nuget URI][1]https://www.nuget.org/packages/System.Management.Automation/
But seems impossible.
using System.Management.Automation; <-- doesn't work any place.
Already tried installing the usual way (via cli and giu), copying the library to \bin folder and many other ways.
I often get the error:
Severity Code Description Project File Line Suppression State
Error Could not load file or assembly 'System.Management.Automation, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
I am trying Web Forms because of simplicity, hope i am missing a simple thing.
Any help will be appreciated.
It was a version incompatibility, as mason pointed out on 1st post comments. Use the OS library located on C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.x.x.x.x__xxxxxxxxxxxxxx
.net Framework aspx is getting complex, don't be fooled on other kind of projects or scripts where you can use any binary you can find.
I used "\sn.exe -Vr yourDll.dll", and "sn.exe -Vl" to register and check the nuget library to GAC but, i got another error:
Could not load file or assembly 'System.Runtime.Extensions
Seems i must use the actual OS library, otherwise it won't work.
Also tried creating custom libraries and workes (myClass1 worked), no GAC registry needed.
Also tried downloading mysql official library, which registers, and worked.
Anyways, hope helps to someone.
This issue continues to be a problem. I see several similar posts but they are all now a couple of years old.
I have referenced Google Apis via Nuget and now I am, quite frankly, in "Nuget hell". First, a rant, why so many assemblies and references when you use Nuget, what is the purpose of the .NET Framework? For example, why do I see a copy of System.IO DLL in my /bin folder?
I struggled for awhile just to get my website to run any of my code. After I upgraded all of my assemblies to 4.0, and after I ran updates on my local .Net install running on Windows 8.1, I have my local dev website working again.
When I call any page on my site that calls the Google drive assembly code, I get this error:
Could not load file or assembly 'System.Net.Http.Primitives,
Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The located assembly's manifest definition does not match the
assembly reference. (Exception from HRESULT: 0x80131040)
I've been round and round with the suggestions to map assemblies from this post: Google Drive SDK System.Net.Http.Primitives Version 1.5.0.0 instead of 2.1.10.0
And either it doesn't work, or I do not have the correct assembly mappings. I'm really at a loss.
I have compiled my Google Drive code and assembly separate of my web application assemblie(s). My Google Drive code is working perfect and I only have an issue when I try to reference this project from my web application.
I can't find any additional tips here or from Google. I am stuck.
I've created a web application in C#. It uses version 2.3. of the Azure SDK and when I run the app locally using the Azure Emulator it works okay. When I package and deploy to the Azure cloud I get the following exception when start page is trying to load:
Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=2.2.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've looked in all my config files but none of them reference Microsoft.WindowsAzure.ServiceRuntime version 2.2.0.0. Is there something else I should be looking out for?
One of your dependent DLLs (ie. something you have referenced in your role entry point DLL) is referencing the 2.2 version of the service runtime. If you aren't able to find the dependent DLL then there are a few different ways to troubleshoot this. Intellitrace is the easiest, and direct debugging on the Azure VM is the most powerful. See http://blogs.msdn.com/b/kwill/archive/2013/10/03/troubleshooting-scenario-7-role-recycling.aspx for a walkthrough of both options.
I'm trying to compose my app but MEF keeps spitting me the error:
Could not load file or assembly 'Microsoft.Data.Edm, Version=5.6.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)
And now i'm stucked... i've tried to replicate the problem in a small scale kind of project, but i can't! which means im doing something wrong here... i need help... i'm quite lost and frustrated and i dont know what kind of info you would need in advance... so, ask for whatever you need!
The basic architecture is:
4 projects, being one WebApi (where i`m composing), one library (where all interfaces are located), one Domain and one DataAccessLayer...
WebApi, Domain and DataAccessLayer projects reference the "Library" (they don't reference each other... very loosely coupled I think)
DataAccessLayer has Azure.Storage NuGet package installed because it handles data in azure (cache and storage)... I also installed it on WebApi because i was unable to "move" the required dlls efficiently. (at run time all dlls, including Data.EDM, are in the bin folder, i've checked)
If any extra info is necessary pls ask!
Those MEF errors can be tricky... usually it's very subtle stuff that trips it up. Try the following:
Check if the projects have the CopyLocal value to True
Check if the NuGet Packages all have the same version.
[Symptom]
If you started having this issue without introducing new dependencies, it is likely that your temporary asp.net folder has lost integrity.
[Solution]
Try deleting "%LOCALAPPDATA%\Temp\Temporary ASP.NET Files\".
I'm working on a ASP.NET MVC C# project and I'm getting the following error when launching the web app:
Could not load file or assembly 'NHibernate, Version=2.1.0.1001, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Based on the error and some googling it seems clear that there is something referencing a NHibernate dll version 2.1.0.1001. However, our project is using NHibernate version 2.1.2.4000 (old, I know). I've searched the entire solution for any references to that version of NHibernate and cannot find one. I'm assuming that another DLL that we're using is referencing it, but I don't know the best place to start to figure out which.
Am I on target with what the issue likely is? Any (hopefully free) dependency tools that anyone can recommend?
I think you are on-target with the basic issue. Consider a stale output file from your solution too. A rebuild (i.e. clean and build) should cover that possibility.
A good free tool for checking references in assemblies you reference is Telerik JustDecompile.
Also, Fuslogvw.exe (Assembly Binding Log Viewer) may shed some light on the load error.