When I update the latest EpiServer package to version 9，compile that successfully,but when I running web,the web browser shows the following error message:
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 'StructureMap, Version=220.127.116.11, Culture=neutral, PublicKeyToken=e60ad81abae3c223' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I don't know what happened.The web porject have installed the latest structuremap nuget package to 18.104.22.168, and add binding in web config as the following:
Any ideas about that?please feel free to comment it then thanks a lot.
From the release notes:
The StructureMap dependency has been updated to the latest major version. The changes in the EPiServer Library are minimal, but there are some major changes to the StructureMap API that may affect any usage. See the StructureMap release notes for further details. EPiServer Framework 9.0.0 will require the signed version of StructureMap (packages structuremap-signed and structuremap.web-signed). Depending on version of NuGet you have installed, the old version of structuremap (22.214.171.124) may have to be uninstalled manually.
@Johan,Thanks for your help.but I've also installed the following dependencies from Episerver.framwork package:
<package id="structuremap.web-signed" version="126.96.36.199" targetFramework="net451" /> <package id="structuremap-signed" version="188.8.131.52" targetFramework="net451" />
I've uninstalled the old version of structuremap(184.108.40.206) ,and my project has not code to using structuremap.
So I don't know any direction for this issue.
Further information:I updated all episerver nuget packages to version 9 with –IgnoreDependencies options.
I find one of reson for this issue,because structuremap-signed package used structuremap version for 220.127.116.11.
Then I replace structuremap to use this version and point to structuremap.dll inside the package "structuremap-signed",now after I build it sucessfully,and the error message changed the following text:
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.MissingMethodException: Method not found: 'StructureMap.Configuration.DSL.Expressions.CreatePluginFamilyExpression`1<!!0> StructureMap.Configuration.DSL.Registry.For()'.
So there might be strange configuration in the latest EpiServer CMS?
Can you try with 18.104.22.168 version?
I've tried StructureMap 22.214.171.124,but what I said as the previouse error:
And shoulde we install StructureMap package yet?Maybe the structuremap should be replaced with structuremap.web-signed package.
I had a similar issue.
In my case the EPiServer.GoogleAnalytics addon was the the cause. The addon required the older version of structuremap. Deleting the addon solved the problem
@Jens,Thanks for your information.I also used Episerver.GoogleAnalytics nuget package,but if we remove that,what to do for adding this feature?
The new structuremap version has been split into three assemblies: structuremap, structuremap.net and structuremap.web
The problem you're seeing might be a component (typically an add-on) that is using structuremap in an initializable module to configure the container. I've seen the same error message ("Method not found: 'StructureMap.Configuration.DSL.Expressions.CreatePluginFamilyExpression`1<!!0> StructureMap.Configuration.DSL.Registry.For()'") when the add-on was configuring using HttpContextScoped.
Since the HttpContextScoped extension method has been moved into the structuremap.web assembly it also requires a "using StructureMap.Web" when running with CMS 9, which the add-on typically does not have.
I can't see an easy workaround without getting updated add-ons that work with CMS 9.
@Steve,I used the latest Episerver.GoogleAnalytics nuget package.I don't know why Episerver CMS 9 has not updated this package to be compatiable with this.
It seems to be like when we use Episerver.GoogleAnalytics we can't update cms to version 9.
CMS 9 is brand new, and not all of the add-ons have been released in CMS 9 compatible versions. The Google Analytics version available in the feed right now isn't supporting CMS 9 (EPiServer.CMS.Core (≥ 8.0 && < 9.0)).
Rest asured that the add-on team is working hard on releasing all of these in compatible versions.
Ok,I will be removing EpiServer.GoogleAnalytics to make sure of updating cms correctly.
For reference; the solution should be to add an assemblybinding like the following:
<assemblyIdentity name="StructureMap" publicKeyToken="e60ad81abae3c223" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-126.96.36.199" newVersion="188.8.131.52" />
The value "184.108.40.206" may vary depending on your version, check the Version property for the StructureMap.Net reference under the References node in your project.
Did anyone found a workaroud for this error? Even though I am not using EpiServer.GoogleAnalytics I still get this error , when i recently upgraded my framework from 7.5 to 9.12
Shreya, it does not have to be the GoogleAnalytics package, it could be some other component. Check your modulebin folder for any leftovers, empty your bin folder and do a rebuild to bring in all the references again.