例外:
Attempt by method 'System.Web.Mvc.VirtualPathProviderViewEngine.GetPath(System.Web.Mvc.ControllerContext, System.String[], System.String[], System.String, System.String, System.String, System.String, Boolean, System.String[] ByRef)' to access method 'System.Web.Mvc.VirtualPathProviderViewEngine.get_DisplayModeProvider()' failed.
代码抛出:
return Populate(x =>
{
x.ViewName = "MyView";
x.Subject = "[" + vm.FriendlyName + "] [" + DepResolver.DaemonAppSettingsHelper().EnvironmentName + "] [Status: " + vm.FriendlySuceeded + "]";
x.To.Add(DepResolver.DaemonAppSettingsHelper().TaskEmailRecipient);
});
如何解决此问题>?
答案 0 :(得分:0)
将项目更新为包含MVCMailer的MVC5时遇到了困难。以下版本安装解决了它。
安装包MvcMailer-vs2013 -Pre
此处有进一步说明:https://github.com/smsohan/MvcMailer/wiki/MvcMailer-Step-by-Step-Guide