表单不包含在支持代码的项目中 [英] form not contained wiithin a project that supports code

查看:66
本文介绍了表单不包含在支持代码的项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在win 10上安装了vb2015社区。 第一个项目进展顺利。第二个项目:生成的frmEvents就像我用以前的vb程序(包括第一个项目)做了几十次没有问题;像以前一样生成一个模块;尝试
重新进入frmEvents并得到带有大量红色x的错误消息:  " frmEvents.vb不支持代码解析或生成,因为它不包含在支持代码的项目中。 " 现在无法将
存入frmEvents,因为错误消息不会消失。


MSDN说要转到Project / Properties /编译并选择"本机代码"。  我的编译部分没有获得代码类型选项。  我查找了一个可识别的Import语句,但没有一个看起来与解析/生成代码支持有关。


是什么让这个项目不支持代码?  我做了什么导致这个?  我一定错过了伪装设置选项。  我使用了我在第一个程序中使用的所有vb默认程序设置。可以做些什么来纠正它(除了去b $ b到其他一些编程软件 - 我太老了不能尝试)?


感谢您的专业知识。 

解决方案

你好乔,


>> frmEvents.vb不支持代码解析或生成,因为它不包含在支持代码的项目中。


不知道为什么会这样,也许它是一个bug Visual Studio,尝试以下解决方案来解决它:


解决方案1:


直接关闭Visual Studio,然后重新打开项目。 / p>

如果这不能解决问题,请尝试:


解决方案2:


关闭解决方案。转到解决方案的文件夹并删除解决方案的.SUO文件。然后在Visual Studio中重新加载解决方案。在解决方案文件资源管理器中,右键单击目标表单源并选择"查看代码"(而不是"查看
Designer")。打开源文件后,右键单击源文本并选择"在设计器中查看"。


希望这会有所帮助!


最好的问候,


Stanly


I have just installed vb2015 Community on win 10.  First project went fine. Second project: generated frmEvents like I have done dozens of times with previous vb programs (including the first project) with no problem; generated a module as before; tried to get back into frmEvents and got this error message with lots of red x's:  "frmEvents.vb does not support code parsing or generation because it is not contained within a project that supports code."  It is now impossible to get into frmEvents because the error message won't go away.

MSDN said to go to Project/Properties/Compile and select 'native code'.  I do not get a code type option in my Compile section.  I looked for a recognizable Import statement, but none looked relative to parsing/generating code support.

What makes this project not support code?  What did I do to cause this?  I must have missed a camouflaged setting option.  I used all the vb default program settings I used in the first program. What can be done to correct it (other than go to some other programming software - and I am too old to attempt that)?

Thanks for your expertise. 

解决方案

Hi Joe,

>>frmEvents.vb does not support code parsing or generation because it is not contained within a project that supports code.

Not sure why it is, maybe it is a bug with Visual Studio, try the following solution to solve it:

Solution 1:

Close your Visual Studio directly, and reopen the project.

If this can not solve the problem, please try:

Solution 2:

Close the solution. go to the solution's file folder and delete the solution's .SUO files. Then reload the solution in Visual Studio. In the solution file explorer, right click on the targeted form source and select the "View code"(not "View Designer"). When the source file is opened, then right click over the source text and select View in designer.

Hope this helps!

Best Regards,

Stanly


这篇关于表单不包含在支持代码的项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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