none
form not contained wiithin a project that supports code RRS feed

  • Question

  • 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. 

    Wednesday, August 9, 2017 5:07 PM

All replies

  • 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


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, August 10, 2017 6:56 AM
    Moderator
  • Thanks a bunch - I think that since the only thing I have done on the project is that one form, I'll just delete that and give it another shot in a clean environment.  The more I think about  it, I feel certain that since I'm just starting on this laptop and a really different keyboard, I unknowingly touched a key that I should have avoided

    Joe

    Friday, August 11, 2017 4:23 PM
  • Hi Joe,

    So have you solved your problem now?

    If so, hope you can close this thread by marking the useful reply as answer as this will help others looking for the same or similar issues down the road.

    Regards,

    Stanly


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, August 14, 2017 8:33 AM
    Moderator
  • I've got a very similar problem and but I'm not able to solve.

    I was working under Visual Studio 2017. The software of my program was under the directory:

    C:\BasicVS17

    Going to Visual Studio 2019 I make a directory with this name:

    C:\BasicVS19 and I copied on it all my software which name is Peace

    On my project I've got more than 300 different forms. Just for few of them I receive the following error:

    The file 'C:\BasicVS17\Peace\20_Cn\22_TestinaCopiare\ForTestTaratura.vb' does not support code parsing or generation because it is not contained within a project that supports code.

    But everything is working; the only problem is the error message.

    I've erased the file Peace.suo; on its place now I've Peace.vbproj.user

    It is clear that I've to erase one or more files or to re-create them. But which one?

    Tuesday, September 10, 2019 10:17 AM
  • THANK YOU SO MUCH!!!!!!!!!!!!!!!!!
    Sunday, November 3, 2019 9:59 PM
  • Hi

    Thanks a lot. The 2nd solutin worked for me. I think it happens when you transfer the application folder to a USB or in a different directory like changing the path, then it will give you this error.

    Mine happened when I copied the full application folder to my memoryStick or to my one drive folder. When I was loading the solution file from the on drive or the memory stick it was giving me this error, while I was running the original one on the same PC, it was fine.

    I think issue is somthing to do with the files & folders' path not the visual studio or the computer. 

    Deleting the suo file and following the instruction helped, but remember when you see the Form designer, close the error tabs and try to run or build to save the changes.

    Thanks once again

    Sunday, November 24, 2019 9:21 PM