Magicodes.IE icon indicating copy to clipboard operation
Magicodes.IE copied to clipboard

Export Pdf TypeLoadException: Could not load type 'Microsoft.AspNetCore.Razor.Language.RazorTemplateEngine'

Open hueifeng opened this issue 6 years ago • 2 comments

An unhandled exception occurred while processing the request.

TypeLoadException: Could not load type 'Microsoft.AspNetCore.Razor.Language.RazorTemplateEngine' from assembly 'Microsoft.AspNetCore.Razor.Language, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. RazorEngine.Compilation.CompilerServiceBase.GetGeneratorResult(IEnumerable namespaces, TypeContext context)

hueifeng avatar Feb 26 '20 09:02 hueifeng

please try run

Uninstall-Package Microsoft.VisualStudio.Web.CodeGeneration.Design

hueifeng avatar Feb 26 '20 09:02 hueifeng

If you're using .NET Framework, downgrade the package to the version 2.3.0. This is the latest possible version which has the necessary class

Aviw13 avatar Mar 14 '25 11:03 Aviw13