diff --git a/framework/src/Volo.Abp.TextTemplating.Razor/Volo/Abp/TextTemplating/Razor/RazorTemplateRenderingEngine.cs b/framework/src/Volo.Abp.TextTemplating.Razor/Volo/Abp/TextTemplating/Razor/RazorTemplateRenderingEngine.cs index 2e053bb8a9..485ca44121 100644 --- a/framework/src/Volo.Abp.TextTemplating.Razor/Volo/Abp/TextTemplating/Razor/RazorTemplateRenderingEngine.cs +++ b/framework/src/Volo.Abp.TextTemplating.Razor/Volo/Abp/TextTemplating/Razor/RazorTemplateRenderingEngine.cs @@ -116,8 +116,8 @@ public class RazorTemplateRenderingEngine : TemplateRenderingEngineBase, ITransi { var compiledViewProvider = scope.ServiceProvider.GetRequiredService(); var assembly = await compiledViewProvider.GetAssemblyAsync(templateDefinition); - var templateType = assembly.GetType(AbpRazorTemplateConsts.TypeName); - var template = (IRazorTemplatePage)Activator.CreateInstance(templateType); + var templateType = assembly.GetType(AbpRazorTemplateConsts.TypeName)!; + var template = (IRazorTemplatePage)Activator.CreateInstance(templateType)!; var modelType = templateType .GetInterfaces()