Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.IO.FileNotFoundException: 'Could not load file or assembly 'System.CodeDom, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.' #580

Open
pawannogariya opened this issue May 24, 2021 · 2 comments

Comments

@pawannogariya
Copy link

pawannogariya commented May 24, 2021

I am facing this issue when I am calling RazorEngineService.Compile method. This is the stack trace

   at RazorEngine.Compilation.CSharp.CSharpDirectCompilerService..ctor(Boolean strictMode, Func`1 markupParserFactory)
   at RazorEngine.Compilation.DefaultCompilerServiceFactory.CreateCompilerService(Language language)
   at RazorEngine.Templating.RazorEngineCore.CreateTemplateType(ITemplateSource razorTemplate, Type modelType)
   at RazorEngine.Templating.RazorEngineCore.Compile(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.Compile(ITemplateKey key, Type modelType)
   at Swc.EC.LicenseManager.EmailService.EmailBuilders.Razor.RazorService.RegisterTemplate(String templateName, Type viewModelType) in D:\Pawan\Projects\ec-license-manager-api\src\Swc.EC.LicenseManager\Libs\Swc.EC.LicenseManager.EmailService\EmailBuilders\Razor\RazorService.cs:line 54
   at Swc.EC.LicenseManager.EmailService.EmailBuilders.Razor.RazorService.RenderAccountRecoveryEmail(AccountRecoveryEmailViewModel viewModel) in D:\Pawan\Projects\ec-license-manager-api\src\Swc.EC.LicenseManager\Libs\Swc.EC.LicenseManager.EmailService\EmailBuilders\Razor\RazorService.cs:line 28
   at Swc.EC.LicenseManager.EmailService.EmailBuilders.AccountRecoveryEmailBuilder.BuildEmailBody(String recipientFullName, String recoveryUrl) in D:\Pawan\Projects\ec-license-manager-api\src\Swc.EC.LicenseManager\Libs\Swc.EC.LicenseManager.EmailService\EmailBuilders\AccountRecoveryEmailBuilder.cs:line 23
   at Swc.EC.LicenseManager.EmailService.Services.EmailService.SendAccountRecoveryEmail(String email, String recipientFullName, String recoveryKey) in D:\Pawan\Projects\ec-license-manager-api\src\Swc.EC.LicenseManager\Libs\Swc.EC.LicenseManager.EmailService\Services\EmailService.cs:line 60
   at Swc.EC.LicenseManager.WebApi.Controllers.AccountController.ForgotPassword(UserForgotPasswordModel model) in D:\Pawan\Projects\ec-license-manager-api\src\Swc.EC.LicenseManager\Swc.EC.LicenseManager.WebApi\Controllers\AccountController.cs:line 77
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()

I tried adding all the dependencies that are listed here https://github.com/Antaris/RazorEngine/blob/master/paket.dependencies
but nothing seems to be working

@alelom
Copy link

alelom commented Jan 9, 2023

Same issue here. Any tips?

@7ayyabzia
Copy link

Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants