草庐IT

ITempDataDictionaryFactory

全部标签

请求的服务“Microsoft.AspNetCore.Mvc.ViewFeatures”。尚未注册ITempDataDictionaryFactory。(学习笔记)

请求的服务“Microsoft.AspNetCore.Mvc.ViewFeatures”。尚未注册ITempDataDictionaryFactory。.net5程序启动异常解决方案参考.net5程序启动异常Therequestedservice'Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory'hasnotbeenregistered.Toavoidthisexception,eitherregisteracomponenttoprovidetheservice,checkforserviceregistrati

c# - 没有注册类型 'Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory' 的服务

我遇到了这个问题:没有注册'Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory'类型的服务。在asp.netcore1.0中,似乎当操作尝试时渲染View我有那个异常(exception)。我搜索了很多,但没有找到解决方案,如果有人可以帮助我弄清楚发生了什么以及如何解决它,我将不胜感激。我的代码如下:我的project.json文件{"dependencies":{"Microsoft.NETCore.App":{"version":"1.0.0","type":"platform"},"Microsoft.