Results 1 to 13 of 13

Thread: Error after deleting Form

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2014
    Posts
    80

    Error after deleting Form

    Hi Team,

    Today I was going though my project's solution explorer and noticed there was a form that I wasn't using at all and no references were made to this form so I deleted the form by right clicking on the form.vb icon in the solution explorer and clicking on delete..

    Shortly after that I launched my project and noticed 100's of errors popping up, most of which that said "Ressources is not a member of 'My' "..

    This Form did not contain any of the files associated with the errors, in fact the errors are refering to forms still present in my solution explorer...

    Can you please tell me how I may fix this issue?



    Name:  Capture.jpg
Views: 602
Size:  55.1 KB


    Name:  Capture2.GIF
Views: 597
Size:  23.1 KB


    Name:  Capture3.jpg
Views: 643
Size:  48.8 KB
    Last edited by djsouljah; Jul 8th, 2015 at 07:02 PM.

  2. #2
    New Member
    Join Date
    Jul 2015
    Posts
    6

    Re: Error after deleting Form

    I would start by using something like FileLocator Lite and searching "Containing text:" for the deleted form name (eg. "form2" etc.). Search the entire project folder. You should be able to find references to it that way.

  3. #3
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: Error after deleting Form

    Just for grins I would run a clean up and a rebuild.
    Please remember next time...elections matter!

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Sep 2014
    Posts
    80

    Re: Error after deleting Form

    Hi thanks for the reply..I tried that and it didnt work Same errors are present! HELP!!

  5. #5
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: Error after deleting Form

    How did you do the cleanup? Did you delete the bin folder, or just run Clean Project (which never seems to do much to me).

    I'm not surprised that it didn't solve the problem, I just want to clarify that you really did a thorough cleanup.

    These errors can sometimes be misleading. I was dealing with one the other day that had to do with a deletion, but manifested in a different form failing to display in the designer. I never made a change that actually solved the problem the designer was complaining about, but I commented out something else and the designer sorted itself out. For that reason, I would second the suggestion that MegaoDon made: There's a fair chance that you are seeing some perverse manifestation of a reference to the deleted form.

    In the future, you might try ExcludeFromProject rather than Delete, and fix any errors that result. With Delete, the form is totally gone. With Exclude From Project, the form is still there, and can be added back in very easily, so you have time to get everything sorted, and can kill it off later on once you have everything working fine without it.
    My usual boring signature: Nothing

  6. #6
    Frenzied Member Gruff's Avatar
    Join Date
    Jan 2014
    Location
    Scappoose Oregon USA
    Posts
    1,293

    Re: Error after deleting Form

    djsouljah,

    What version of visual studio are you running?

    I had issues with VS 2010 similar to what you describe. If I deleted some component sometimes saving, shutting down VS, restarting VS, and reloading the project would repair the problem.
    Burn the land and boil the sea
    You can't take the sky from me


    ~T

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: Error after deleting Form

    Interesting. The issue I was dealing with yesterday was also in VS2010. I didn't think it was related to the version, but maybe it is.
    My usual boring signature: Nothing

  8. #8
    Frenzied Member Gruff's Avatar
    Join Date
    Jan 2014
    Location
    Scappoose Oregon USA
    Posts
    1,293

    Re: Error after deleting Form

    Where it usually bit me was when I was developing an inherited control with a new instance of the control on a test form in the same project. Renaming the control in the solution browser could sometimes booger the whole project so bad I would have to start over from scratch.

    I haven't seen this issue in 2013 yet.
    Last edited by Gruff; Jul 9th, 2015 at 01:23 PM.
    Burn the land and boil the sea
    You can't take the sky from me


    ~T

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Sep 2014
    Posts
    80

    Re: Error after deleting Form

    Hi Guys,

    I am on VB Studio 2010. I have tried deleting the BIN file ...when doing so it gives me an error "Error deleting Folder 'bin'. Level of system call incorrect"....Also tried to rebuild the solution by right clicking on solution and clicking rebuild and it works in the background and then errors are still present....I also tried to change the application type to Console or Class and then back to Windows Forms Applications that didnt work..... I noticed one thing and not really sure if this may be causing the issue but my resources.resx file doesnt contain anything in its subfolder, actually it doesnt have a subfolder, usually i dont play with that file but i saw in some other peoples printscreens there was a vb file in its subfolder could that be causing the issue, if so how do i fix it...Also when going into project propreties and take a look at ressources tab i have an error "there is already another resource with the name 'nhl' ...See screenshots below...Been working for months on this APP, i really can't start over at this point HELP


    Name:  Capture4.GIF
Views: 355
Size:  24.2 KB

    Name:  Capture5.jpg
Views: 350
Size:  22.6 KB
    Last edited by djsouljah; Jul 9th, 2015 at 01:19 PM.

  10. #10
    Frenzied Member Gruff's Avatar
    Join Date
    Jan 2014
    Location
    Scappoose Oregon USA
    Posts
    1,293

    Re: Error after deleting Form

    One thing to note. I wouldn't delete files or folders from a project with windows explorer while VS is running.

    2010 creates a backup of your projects. Have you looked at that to see if it contains your last good copy?

    C:\Users\<Your Profile>\Documents\Visual Studio 2010\Backup Files

    Other than that do you have any system or network backups of your project you can restore?
    Last edited by Gruff; Jul 9th, 2015 at 01:38 PM.
    Burn the land and boil the sea
    You can't take the sky from me


    ~T

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Sep 2014
    Posts
    80

    Re: Error after deleting Form

    Hi Gruff, I did not delete from windows explorer, I deleted from solution explorer actually... I check the folder you suggested its empty

  12. #12

    Thread Starter
    Lively Member
    Join Date
    Sep 2014
    Posts
    80

    Re: Error after deleting Form

    Ok so what I did is added a form with the same name I deleted, took the resx file from the backup i had from earlier versions from October...and imported it in the form and then that somehow gave me access to the resources.resx code where I removed a line that referenced to a picture that had the same name of another picture i had in my resources and that removed some of the errror and I gained back control of the resources tab and see everything again....

    Now I have one more error I was unable to clear :

    "The customer tool VbMyResourcesResXFileCodeGenerator failed. ResX input is not valid. Cannot find valid resheader tags for the resX reader and writer type names"


    Code:
    <?xml version='1.0' encoding='utf-8'?>
    <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
      <Profiles>
        <Profile Name="(Default)" />
      </Profiles>
      <Settings />
    </SettingsFile>
    Name:  capture 1.jpg
Views: 358
Size:  21.7 KB
    Last edited by djsouljah; Jul 9th, 2015 at 06:46 PM.

  13. #13
    Frenzied Member Gruff's Avatar
    Join Date
    Jan 2014
    Location
    Scappoose Oregon USA
    Posts
    1,293

    Re: Error after deleting Form

    Not really.

    Best I can think of is to restore the entire backup from October to a new folder.

    Get rid of the undesirable form (safely) and copy all your good forms, classes, and modules from the broken project into the restored project.

    Fire up VB.NET, Load the restored project, and reconnect what needs to be connected.

    No promises.
    Burn the land and boil the sea
    You can't take the sky from me


    ~T

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width