Try our conversational search powered by Generative AI!

Error after EPiServer CMS version update: Could not load file or assembly EPiServer.Framework.


Hey guys,

I'm having an issue after updating my project to the latest version of EPiServer CMS. This is the error message I am getting when building my solution:

SGEN : error : Could not load file or assembly 'EPiServer.Framework, Version=, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The system cannot find the file specified.

I have searched my solution for the string "" with 0 results. 

This is my packages.config:


And this is a snippet from my Web.config:


Note that I am referencing EPiServer.Framework 10.10.4 in both files. As previously mentioned, I can't find any reference to 10.10.0 like the error message refers to. 

Note that my project builds fine in the Debug configuration, but not in Release or any of my custom build configurations. However, if I manually go and set the build property "Generate assembly serialization" to "Off" instead of the default "Auto", it does build. But I don't feel comfortable with that solution because I suspect it slows down performance. 

Other things I have tried without success:

  • Deleted packages directory and restored all packages
  • Deleted bin folder and cleaned solution
  • Deleted ASP.NET temp directory
  • Restarted Visual Studio (and my computer)
  • Tried to build my project in an older version of Visual Studio (I am currently on VS 2017 (15.4.1))

Any feedback is appreciated. Thank you!

Oct 28, 2017 12:37

I have the exact same problem. Have you come up with a solution?

Nov 10, 2017 13:27

Hi Linus,

I haven't been able to solve it properly. I ended up rolling back to version (the version the error message referenced to) and the error was gone. However, I am not convinced my project's health is 100% since this. Still looking for a better solution...

Nov 10, 2017 14:27

I e-mailed the developer support group. Got this answer:

"Can't see any issues with our code. Looks like this tool "Microsoft (R) Xml Serialization support utility" won't work unless all DLLs are compiled against the exact same version, which they might not be with NuGet dependencies and assembly redirects. Sometimes the stars align and that would be the reason it has worked in some versions.

Workaround would be either to add those "missing" DLLs to GAC or disable that tool. Or move the custom code that requires pre-compilation of XML Serializer types into a separate project that have very few dependencies (less likely to run into issues then)."

Nov 15, 2017 15:52

Same issue is occuring for us. have we find any resolution for this?

Edited, Dec 11, 2017 17:22
Dec 12, 2017 10:15

"SGEN : error : Could not load file or assembly 'EPiServer.Framework, Version=, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The system cannot find the file specified."

Did you try this :

I was able to fix this error by finding the assembly DLL in Windows Explorer, right clicking, choosing Properties, and then pressing the "unblock" button. The DLL has a stream that is marking it as an external file - and by clicking unblock you remove that designation.

Dec 12, 2017 11:18

I was able to fix this error by deleting everything out of the destination ~/bin folder and publishing again.

Nov 02, 2018 21:29

Received this error (after in our DXC integration environment where we removed faulty check in Nuget packages-references) and trying to upgrade Episerver CMS to the latest version. 

Ended up resolving this by manually copying my local bin files from my development environment (my local projects dlls) into the integration environment by FileZilla.

That way I could then from the integration environment properly send out the working files to the prepropduction and production environment.

Oct 18, 2019 11:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.