© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
3 replies
AdamBlade

Updating Packages on old application problems

Hello,

I'm currently trying to upgrade some old apps I'm currently working on and I'm facing a weird issue where it works fine locally but refuses to work deployed.

The problem is that it cannot seem to load an assembly when deployed. I've set all references to copy local but I'm still facing issues.

The apps are a Asp.Net WebForms app and an Asp.Net
Web Api.
The package it's complaining about it Microsoft.Web.Infrastructure,I've updated it from 1.0.0.0 to 2.0.0.0.

Any insight would be appreciated, I cannot get this error to replicate locally.
This is the error:

[FileLoadException: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.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)]
System.Web.WebPages.PreApplicationStartCode.Start() +0
System.Web.Mvc.PreApplicationStartCode.Start() +39

[InvalidOperationException: The pre-application start initialization method Start on type System.Web.Mvc.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.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).]
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Updating packages in Directory.Packages.props
C#CC# / help
2y ago
Problems with compiling OLD-Projects
C#CC# / help
2y ago
Binding problems, property not updating
C#CC# / help
2y ago
EF Core - Tracking problems while updating
C#CC# / help
3y ago