无法在 ASP.NET MVC 中创建控制器和视图
我安装了带有 MVC 2 的 Visual Studio 2010。我能够创建 MVC 2 Web 应用程序并使用原始代码构建项目。但是,我无法为项目创建任何新的控制器或视图页面。当我尝试创建控制器时,出现以下错误:
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Item Templates\CSharp\Web\MVC 2\CodeTemplates\AddController\Controller.tt(-1, -1):错误:有让 AppDomian 从主机运行转换时遇到问题。该过程无法继续。”
当我尝试创建视图时,出现以下错误:
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Item Templates\CSharp\Web\MVC 2\CodeTemplates\AddView\Empty.tt(-1, -1):错误:有让 AppDomian 从主机运行转换时遇到问题。该过程无法继续。”
我尝试重新安装 VS 和 SP1,但没有解决问题。
如何解决此问题?
I have Visual Studio 2010 with MVC 2 installed. I am able to create a MVC 2 Web Application and build the project with the original code. However, I cannot create any new Controller or View page to the project. When I try to create a Controller, I got this error:
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Item Templates\CSharp\Web\MVC 2\CodeTemplates\AddController\Controller.tt(-1, -1): error: There was a problem getting an AppDomian to run the transformation from the host. The process cannot continue."
When I try to create a View, I get this error:
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Item Templates\CSharp\Web\MVC 2\CodeTemplates\AddView\Empty.tt(-1, -1): error: There was a problem getting an AppDomian to run the transformation from the host. The process cannot continue."
I have tried to reinstall the VS and SP1, but that didn't solve the problem.
How can this be fixed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
今天早上,我在运行我发现的 MVC2 教程时,在 Windows 10 上的 Visual Studio 2010 中遇到了此错误。我重新启动并重新加载解决方案,它立即创建了视图。
I had this error this morning in Visual Studio 2010 on Windows 10 while running through an MVC2 tutorial I found. I restarted and reloaded the solution, it created the view right away.