Incorrect dll references when upgrading to 6.1

Posted by Community Admin on 04-Aug-2018 15:57

Incorrect dll references when upgrading to 6.1

All Replies

Posted by Community Admin on 22-Jul-2013 00:00

I know of a few others who have had a similar issue so I am going to post this under the bugs section until I hear otherwise.

When upgrading from 6.0 to 6.1 via the project manager the solution (your reference path for each dll) will target the wrong version for the following DLL's:

System.Web.Mvc -> targets MVC3 instead of MVC4 of your local path for the MVC installation.  

System.Web.Razor -> targets v1.0 instead of v2.0 of your local installation of ASP.NET Web Pages

System.Web.WebPages -> targets v1.0 instead of v2.0 of your local installation of ASP.NET Web Pages

System.Web.WebPages.Deployment -> targets v1.0 instead of v2.0 of your local installation of ASP.NET Web Pages

System.Web.WebPages.Razor -> targets v1.0 instead of v2.0 of your local installation of ASP.NET Web Pages

Changing all these references to the dll's in the project's bin folder prior to building fixed the errors I was seeing.  I would assume you can safely just change them to use the correct version path of your local install too.

Posted by Community Admin on 25-Jul-2013 00:00

Hello,

The references from the project manager are already fixed, thank you for providing the solution to the problem for everyone encountering it.

Regards,
Stanislav Velikov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 05-Aug-2013 00:00

Stanislav, are you sure they are fixed? I just downloaded a new installer, tried to upgrade the site from 6 to 6.1 and got this error:



Server Error in '/' Application.

Could not load file or assembly 'System.Web.Mvc,
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)



Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.

Exception Details: System.IO.FileLoadException:
Could not load file or assembly 'System.Web.Mvc, 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)

Source Error:


An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be
helpful to determine why the assembly 'System.Web.Mvc, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

=== Pre-bind state information ===
LOG: User = WEB1\Administrator
LOG: DisplayName = System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///D:/citynet.annapolis.gov/
LOG: Initial PrivatePath = D:\citynet.annapolis.gov\bin
Calling assembly : Telerik.Sitefinity, Version=6.1.4300.0, Culture=neutral, PublicKeyToken=b28c218413bdf563.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\citynet.annapolis.gov\web.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/96e0ee6d/c24b8ff3/System.Web.Mvc.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/96e0ee6d/c24b8ff3/System.Web.Mvc/System.Web.Mvc.DLL.
LOG: Attempting download of new URL file:///D:/citynet.annapolis.gov/bin/System.Web.Mvc.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 'System.Web.Mvc, 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)]
Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes() +0
Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +374
Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +112
System.Web.Routing.UrlRoutingModule.System.Web.IHttpModule.Init(HttpApplication application) +10
System.Web.HttpApplication.InitModulesCommon() +172
System.Web.HttpApplication.InitModules() +43
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +828
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +304
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +327

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

Or it's something else this time?



Posted by Community Admin on 13-Oct-2013 00:00

Just followed Stacy's suggestion to fix version  6.1.4300.0.
All had worked properly on our local server. Errors popped up today when we deployed to our production server.

Thanks, Stacy.

Posted by Community Admin on 16-Oct-2013 00:00

Hi,

Following the error message the cause of the problem is due to the inccorect assembly reference for System.Web.Mvc assemblies those have to me refering to version 4.0 and not the previous version 3.0 for Asp.Net MVC as Stacey have explained in more detail.

Regards,
Stanislav Velikov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 20-Jan-2014 00:00

Having this issue on upgrading from 6.1 to 6.3.

Works great on localhost (IIS7.5) but not on production server (IIS6.1). Have followed Staceys suggestions, but no luck.

OC

Posted by Community Admin on 23-Jan-2014 00:00

Hi,

@ OC if the error experienced when running on IIS 6 is the same as the error when lacking assembly references for System.Web.Mvc.dll.

Could not load file or assembly 'System.Web.Mvc,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or
one of its dependencies.

Then in the transfer of tiles from the computer running IIS 7 to the server running IIS 6 then the location from which the assembly references for System.Web.Mvc.dll in Sitefinity is not transfered, of not found.
Please check in the folder with the assembly references for the site and locate System.Web.Mvc.dll, check the assembly version it must be version 4.0.0.0, and if not update the assembly reference. Check If in the .csproj file of the Sitefinity project on the server the assembly reference to System.Web.Mvc.dll is taken from the proper file system path where the correct assembly version resides.

Regards,
Stanislav Velikov
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 23-Jan-2014 00:00

Thanks Stanislav,

It was Visual Studio messing up the DLLs on rebuild. Found it on another thread. For some strange reason Visual Studio replaced all DLLs after a couple of re-builds. I see others have experienced the same. DLLs published to Production server where the old ones.

Strange, but solved :)

Posted by Community Admin on 28-Jan-2014 00:00

Hello,

Basically the rebuild process can cause the removal of the assembly references if those are located in the bin folder, here is a popular topic that discuss this. A good practice is to add assembly references from a folder different from bin (for example lib folder).

Regards,
Stanislav Velikov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed