Results 1 to 11 of 11

Thread: [RESOLVED] [2008] How can you delete Resources without getting resx errors?

  1. #1

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Resolved [RESOLVED] [2008] How can you delete Resources without getting resx errors?

    This has always happened to me in both VS 2005 Pro and VS 2008 Express.
    Say I have imported an image into my solution and it shows up in the solution explorer under resources, I later decide I dont want that image but if I just right click -> delete the resource from the solution explorer window I get resx errors next time I try to build/debug my app. Usually stating that it could not find a file, obviously the one I just deleted.

    I mean yeah I can go in and hack bits out of the resources.resx file until it works but surely I shoudnt have to do this...

    So how should I be doing this?

    EDIT: Shortly after editing the resx file to remove the references to non existent files, VS has decided to completely reset my main menustrip back to defaults... empty.
    #%@!

    EDIT EDIT: Oh and my status strip too!


    Cheers
    Chris
    Last edited by chris128; May 15th, 2008 at 04:13 PM.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  2. #2

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: [2008] How can you delete Resources without getting resx errors?

    bump surely im not the only person on here that needs to occasionally delete an imported image from the resources.resx file?
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: [2008] How can you delete Resources without getting resx errors?

    Yes, I encountered the same problem some time ago and I didn't get any useful answers. The best thing I could come up with is to first delete the resource from the Resources tab, then select Exclude from project in the Solution explorer and then delete the file. I think it worked for me.
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  4. #4
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: [2008] How can you delete Resources without getting resx errors?

    Quote Originally Posted by obi1kenobi
    Yes, I encountered the same problem some time ago and I didn't get any useful answers. The best thing I could come up with is to first delete the resource from the Resources tab, then select Exclude from project in the Solution explorer and then delete the file. I think it worked for me.
    Yeah, that's what I do too. Don't know of any other easier way...
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  5. #5

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: [2008] How can you delete Resources without getting resx errors?

    Really? I'm shocked that Visual Studio is able to create controls and write event handlers for you without breaking a sweat but it cannot just delete 3 lines from a resx file when you delete something from your solution... seems very odd to me.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  6. #6
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: [2008] How can you delete Resources without getting resx errors?

    Yes, it does, doesn't it? Perhaps we should send Microsoft a comment on that...
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  7. #7

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: [2008] How can you delete Resources without getting resx errors?

    Pfft I've given up on trying to send feedback to Microsoft after my experiences with the Media Player 11 BETA... I found so many little problems with it that I would of liked to inform them of but for the life of me could not find any way to actually send them feedback about this. There was no option within the program itself and I couldnt find anything on the website either. I emailed one MS address and was just told that they did not have anything to do with media player..
    Oh and half of the bugs werent even fixed in the final release version..
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  8. #8

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: [2008] How can you delete Resources without getting resx errors?

    Just to help people who read this in the future, here's what I found to be a solution to this problem:
    go into your project settings (Double click 'My Project' in Solution Explorer) and then on the left you will see some tabs, of course a lot of us are used to using the 'Compile' and 'Settings' tab but I noticed that there is also one named 'Resources'. If you go into here, you can see all images etc that are attached to your project and just click on them, then click the Remove button at the top to remove them. Voila, no errors!
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  9. #9
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: [2008] How can you delete Resources without getting resx errors?

    Quote Originally Posted by chris128
    Just to help people who read this in the future, here's what I found to be a solution to this problem:
    go into your project settings (Double click 'My Project' in Solution Explorer) and then on the left you will see some tabs, of course a lot of us are used to using the 'Compile' and 'Settings' tab but I noticed that there is also one named 'Resources'. If you go into here, you can see all images etc that are attached to your project and just click on them, then click the Remove button at the top to remove them. Voila, no errors!
    That's the same method given by Obi1 in post # 3. After you remove a resource, you still need to manually delete it from your project folder.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  10. #10

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: [RESOLVED] [2008] How can you delete Resources without getting resx errors?

    Oh right, sorry I didnt realise he meant the resources tab in project settings, I thought he meant just remove it from the resources folder in solution explorer.
    In that case - thanks Obi1
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  11. #11
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: [RESOLVED] [2008] How can you delete Resources without getting resx errors?

    Heh no prob
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

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