November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
stupid question, but I assume that you do have SM packages as well (and version redirects just in case)?
what about if you enable fushion log and see what's exactly is failed (which dependency)?
I believe I had this same issue when I updated CMS 10 to 11. The problem was that the old version of structuremap was still in bin or that the project was still actually referencing the old versions.
Check your packages.config file, there should be only three entries that have structuremap in the package name:
<package id="EPiServer.ServiceLocation.StructureMap" version="2.0.1" targetFramework="net471" /> <package id="StructureMap" version="4.6.1" targetFramework="net471" /> <package id="structuremap.web" version="4.0.0.315" targetFramework="net471" />
(my version is the latest structuremap)
Check your project 'References'. You should only have these:
If you have the old stucturemap versions as referenced you should delete those references and re-install the structuremap packages if needed (the old versions are something like this 3.1.9.463 and 3.1.6.186)
@Valdis yes talking about the old structuremap packages not removed and after sleeping over this my memory serves me also better about the issue ;)
@Dipak, go to package manager GUI in Visual Studio and check there that if you have those old structuremap related packages then uninstall those and install the new episerver structuremap package.
Structuremap 2.0.0 was introduced in the Episerver update 191. And Johan Björnfot blogged about the update issue and what manual steps are needed.
Dipak can you clarify a bit. So you had the old structuremap assemblies or not? If yes, did you read the Johan blog article? If you know look at the assembly versions for structuremap assemblies in you bin folder are those the ocrrect new version? What about your web.config binding redirects for structuremap assemblies?
In Bin folder
StructureMap.dll [4.5.1.0]
StructureMap.Web.dll [1.0.0.0]
EPiServer.ServiceLocation.StructureMap.dll [2.0.0.0]
There is no other dll related to structure map.
Web.Config
<dependentAssembly>
<assemblyIdentity name="StructureMap" publicKeyToken="e60ad81abae3c223" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.5.1.0" newVersion="4.5.1.0" />
</dependentAssembly>
...
<dependentAssembly>
<assemblyIdentity name="EPiServer.ServiceLocation.StructureMap" publicKeyToken="null" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
One more confusion.
packages\StructureMap.4.5.2\lib\net45\StructureMap.dll has version 4.5.1.0
Hope this will be give you some idea.
Interesting, your original error was about the EPiServer.ServiceLocation.StructureMap 2.0.1.0 but now you show that you have version 2.0.0.0
I would just update the packages
And see how it goes from there. btw, the StructureMap.web.dll displays always 1.0.0.0
Also worth nothing is that version 2 of EPiServer.StructureMap.ServiceLocation is not signed and is using unsigned versions of StructureMap. This means that if the entries for binding redirects are correct then should publicKeyToken be null (both for EPiServer.ServiceLocation.SrtructureMap and StructureMap).
The problem I have found that, my web project is signed one and EPiServer.ServiceLocation.StructureMap is unsigned one. This causing me issue.
For anyone else facing a similar issue in the future, your options are essentialy as follows
I think this post can be flagged as solved.
Server Error in '/' Application.
Could not load file or assembly 'EPiServer.ServiceLocation.StructureMap, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
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 'EPiServer.ServiceLocation.StructureMap, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
Source Error:
Source File: E:\TFS_Repository\PR61795_CMS11\Dalziel.Web\Src\Dalziel.Web\Business\Initialization\DependencyResolverInitialization.cs Line: 35
Stack Trace: