创建“区域”时出错在mvc 4 app [英] Error when creating an "Area" in mvc 4 app

查看:302
本文介绍了创建“区域”时出错在mvc 4 app的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在某些时候,这在视觉工作室2017社区中有效,现在却没有。

At some point this worked in visual studio 2017 community and now it is not.

当我右键点击"区域"时在解决方案资源管理器中,单击添加>区.. 我收到一个对话框,输入我想要创建的区域的名称。 输入名称并单击"确定"后,我收到以下错误 

When I right click on "Areas" in solution explorer and click Add > Area..  I get a dialogue box to enter the name of the area I want to create.  Once I enter the name and click ok I get the following error 

\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Communmunity \ CommonAIDRItemTemplatesCache C Sharp \Web \ MVC 4 \ MVcArealtemTemplatev4.1.cs \ MVcArealtemTemplate.cs.vstemplate

\Program Files (x86)\Microsoft Visual Studio\ 2017 \Community\ CommonAIDRItemTemplatesCache C Sharp \Web\ MVC 4\MvcArealtemTemplatev4.1.cs\MvcArealtemTemplate.cs.vstemplate

我尝试删除Web开发人员工具并重新安装它们以及运行devenv / InstallVSTemplates

I tried removing web developer tools and reinstalling them as well as running devenv /InstallVSTemplates

这些都没有任何区别。 错误仍然存​​在。 有什么帮助吗?

None of this made any difference.  The error persists.  Any help?

推荐答案

欢迎来到MSDN论坛。

Welcome to MSDN forum.

>> \Program Files(x86)\ Microsoft Visual Studio \ 2017 \Community \ CommonAIDRItemTemplatesCache C Sharp \\ \\ EMI \ MVC 4 \ MVcArealtemTemplatev4.1.cs \ MVcArealtemTemplate.cs.vstemplate

您能否提供详细的错误消息?

Could you please provide the detailed error message?

请尝试创建一个新的asp.net mvc项目以检查问题是否仍然存在。如果仍然无效,请通过visual studio安装程序修复visual studio 2017。

Please try to create a new asp.net mvc project to check if the issue persists. If it still doesn't work, repair visual studio 2017 via visual studio installer.

此外,如果您的解决方案有web.config文件,请查看它,如果删除它,添加区域时会出错。

Besides, go to see it if your solution has web.config file, if you delete it, the error will occur when add area.

致以最诚挚的问候,

Joyce


这篇关于创建“区域”时出错在mvc 4 app的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆