-
Notifications
You must be signed in to change notification settings - Fork 580
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
RazorEngine.Templating.TemplateCompilationException #528
Comments
Good luck.... We are moving to azure function too... Honestly I think I will change engine... It's about a week I am trying to make it work and there is no support. Here people answer rarely, you have been lucky because I am here to doing a new question...
What I understood is that you must load all references that are necessary to compile the cshtml... so you must add Finally, in your configuration you have to use your new ReferenceResolver:
It should start to work but you should receive an advice that it is better that you run razorEngine in a new app domain, otherwise temp file are not deleted... infact if you check temp file will not delete.... It is about 3 days I am trying to resolve that problem.... but nothing... If it still does not work let me know... I do not remember anymore all the passes I did to let it works (I am not sure you have to change also the template manager)... I have done a lot of reverse engineering to solve all my problems.. and I have not finished yet... Hope this help PS.: here one question I have done here (sadly the answer is mine too :( ) |
UPDATE: We are using RazorEngine v3.8.2
I want to start off by saying I only encounter this issue on our test environment (deployed in azure app service) but not locally. Possibly due to debug configuration?
I am trying to compile e-mail templates. Originally, this was done in a worker role (cloud service) without issues. Now, I have enabled a preview functionality within our web application, and RazorEngine now runs in our web app to compile and display the e-mail template preview.
However, I run into issues once deployed to azure app service (not locally).
This is the error message details:
This is the template (redacted some parts) it tried to compile:
The interesting part is that the list of loaded assemblies is crazy long. These are the first 10 lines:
However, it goes on for another 10,000+ more lines, 10,153 to be exact.
The stack trace points to the Compile method:
Any ideas? Thanks!
The text was updated successfully, but these errors were encountered: