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

xxx.TMP is not a valid Win32 resource file Temporary files of the compilation can be found #571

Open
ArturChe opened this issue Jun 19, 2020 · 0 comments

Comments

@ArturChe
Copy link

From time to time the error appears running .net app with RazorEngine version 3.10.0 on windows container (template is removed):
An exception occurred Cause: RazorEngine.Templating.TemplateCompilationException: Errors while compiling a Template. Please try the following to solve the situation: * If the problem is about missing/invalid references or multiple defines either try to load the missing references manually (in the compiling appdomain!) or Specify your references manually by providing your own IReferenceResolver implementation. See https://antaris.github.io/RazorEngine/ReferenceResolver.html for details. Currently all references have to be available as files! * If you get 'class' does not contain a definition for 'member': try another modelType (for example 'null' to make the model dynamic). NOTE: You CANNOT use typeof(dynamic) to make the model dynamic! Or try to use static instead of anonymous/dynamic types. More details about the error: - error: (0, 0) 'c:\Users\ContainerAdministrator\AppData\Local\Temp\RazorEngine_igeeh30m.iyb\CSCA3BED2026CE84435A5BE15C65ED43D23.TMP' is not a valid Win32 resource file Temporary files of the compilation can be found in (please delete the folder): C:\Users\ContainerAdministrator\AppData\Local\Temp\RazorEngine_igeeh30m.iyb The template we tried to compile is: ------------- START ----------- <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <title></title> <style> </style> </head> <body> </body> </html> ------------- END ----------- The generated source code is: ------------- START ----------- //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace CompiledRazorTemplates.Dynamic { using System; using System.Collections.Generic; using System.Linq; [RazorEngine.Compilation.HasDynamicModelAttribute()] public class RazorEngine_eb02a3f4906b4c17b3e87f495981113b : RazorEngine.Templating.TemplateBase<dynamic> { public RazorEngine_eb02a3f4906b4c17b3e87f495981113b() { } public override void Execute() { } ------------- END -----------
Previously, running app in common EC2 instances such errors did not appear.

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

1 participant