Skip to content

Commit

Permalink
发布后查找不到插件中的邮件模板 #349
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayne-KTCSZ committed Dec 11, 2019
1 parent 3340612 commit 0e1e765
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/ZKEACMS.WebHost/bin/Debug/netcoreapp3.0/ZKEACMS.WebHost.dll",
"program": "${workspaceFolder}/src/ZKEACMS.WebHost/bin/Debug/netcoreapp3.1/ZKEACMS.WebHost.dll",
"args": [],
"cwd": "${workspaceFolder}/src/ZKEACMS.WebHost",
"console": "internalConsole",
Expand Down
10 changes: 9 additions & 1 deletion src/EasyFrameWork/Mvc/RazorPages/ViewRenderService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ public string Render<TModel>(string viewPath, TModel model)
{
actualViewPath = actualViewPath.Replace(pluginPath, DeveloperViewFileProvider.ProjectRootPath);
}

else if (_hostingEnvironment.IsProduction() && actualViewPath.StartsWith(pluginPath))
{
string filePath = actualViewPath.Replace("~/", string.Empty);
var fileInfo = _hostingEnvironment.ContentRootFileProvider.GetFileInfo(filePath);
if (!fileInfo.Exists)
{
actualViewPath = actualViewPath.Replace(pluginPath, "~/");
}
}
ViewEngineResult viewResult = _viewEngine.GetView(null, actualViewPath, true);

if (!viewResult.Success)
Expand Down
3 changes: 0 additions & 3 deletions src/ZKEACMS.Message/ZKEACMS.Message.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,4 @@
<ProjectReference Include="..\ZKEACMS\ZKEACMS.csproj" />
</ItemGroup>

<ItemGroup>
<MvcRazorFilesToCompile Include="Views\**\*.cshtml;EmailTemplates\**\*.cshtml" />
</ItemGroup>
</Project>

0 comments on commit 0e1e765

Please sign in to comment.