User-1262787652 posted
ASP .NET MVC Core application is publised to Debian Linux server
Configuration: Debug
Target framework net5.0
Target runtime linux-x64
options are selected and silnge file is not selected.
application is copied to Debian including .pdb files. On error deveper page does not show line numbers:
An unhandled exception occurred while processing the request.
RazorEngineCompilationException: Unable to compile template: kg1kac1e.11k(5,7): error CS0103: The name 'tml' does not exist in the current context
RazorEngineCore.RazorEngine.CreateAndCompileToStream(string templateSource, RazorEngineCompilationOptions options)
Stack Query Cookies Headers Routing
RazorEngineCompilationException: Unable to compile template: kg1kac1e.11k(5,7): error CS0103: The name 'tml' does not exist in the current context
RazorEngineCore.RazorEngine.CreateAndCompileToStream(string templateSource, RazorEngineCompilationOptions options)
RazorEngineCore.RazorEngine.Compile<T>(string content, Action<IRazorEngineCompilationOptionsBuilder> builderAction)
Eeva.Library.RazorRenderer+<>c__DisplayClass1_0<TModel>.<Render>b__0(int i) in I:\myapp\RazorRenderer.cs
System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey key, Func<TKey, TValue> valueFactory)
Eeva.Library.RazorRenderer.Render<TModel>(string template, TModel model) in I:\myapp\RazorRenderer.cs
Eeva.Web.ViewPageBase<TPageModel>.Hook(ElementName elementName, bool userazor) in I:\myapp\ViewPageBase.cs
AspNetCore.Views_Shared__Layout.<ExecuteAsync>b__23_1() in I:\myapp\Store\Views\Shared\_Layout.cshtml
Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
AspNetCore.Views_Shared__Layout.ExecuteAsync()
If application is running from Visual Studio IDE developer page shows line numbers (49. in this sample) and source code lines in red:
An unhandled exception occurred while processing the request.
RazorEngineCompilationException: Unable to compile template: mabcc1lr.jjw(6,7): error CS0103: The name 'Htm' does not exist in the current context
RazorEngineCore.RazorEngine.CreateAndCompileToStream(string templateSource, RazorEngineCompilationOptions options)
-
RazorEngineCompilationException: Unable to compile template: mabcc1lr.jjw(6,7): error CS0103: The name 'Htm' does not exist in the current context
RazorEngineCore.RazorEngine.CreateAndCompileToStream(string templateSource, RazorEngineCompilationOptions options)
RazorEngineCore.RazorEngine.Compile<T>(string content, Action<IRazorEngineCompilationOptionsBuilder> builderAction)
Eeva.Library.RazorRenderer+<>c__DisplayClass1_0<TModel>.<Render>b__0(int i) in RazorRenderer.cs
+
49. var compiledTemplate = razorEngine.Compile<RazorEngineCorePageModel<TModel>>(template, builder =>
System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey key, Func<TKey, TValue> valueFactory)
Eeva.Library.RazorRenderer.Render<TModel>(string template, TModel model) in RazorRenderer.cs
+
var compiledTemplate = (IRazorEngineCompiledTemplate<RazorEngineCorePageModel<TModel>>)
How to show sourcve code line numbers in developer page in Linux ?