In C# VS2005 I embedded a picture (file in the form *.png) normal but when the rebuild was reported The "GenerateResource" task failed unexpectedly.
System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI +. Have you know how to fix this ?

Be aware you might be spamming this question and when folk see that, they usually don't answer.

My thought is that there are a few scenarios this will happen. I saw it with a 20 megapixel 4K UHD image, a corrupt image, an image that VS can't handle and maybe a few more things.

To sniff this out, start over and get the project to build without this image. Now try a simple, small BMP image. What happens?

I tried the format but still failed, I tried opening a new project to load the image into the Resource and Rebuild still error. I not written code.
I'm stuck, so I ask a few questions that can annoy you ?

I'm begining to worry that your VS2005 is either not all patched up or was installed in some none standard manner. Tell all to save a lot of time.

Also, you write about "the image" and my advice was to not use the image that caused you problems.

I'm not there to see what you are doing but is there any chance you can try it my way?

I believe my VS2005 is not faulty, you do not even see me doing, I can post the video or my faulty example for you to see, I will send you examples first, you open my example and Press the Rebuil button to see if you get an error message. You see the attached file http://www.mediafire.com/file/pgmme2vy9jfaxbl/vs2005.rar

Just to recap. You need to be sure of the following. You have yet to tell me about.

  1. Is VS2005 all patched up with service packs?
  2. You need to try an image that is plain as can be. BMP to boot.

We've gone back and forth a few times without you addressing my concerns and for now I'm calling your VS2005 faulty as details are only what you supply. Sounds faulty to me.

Before answering your question I also have several questions to ask you:

  1. did you run my example to send you yet ? Are you being banned like I said ?
  2. I already have an example of running a *.png image file with a very good running resource, but I created a resurrection project but got an error message. So I do not think VS 2005 is faulty.

Now I answer your question:

  1. I am using version 2.0.50727, you see my attached photo file. [IMG]http://imagizer.imageshack.com/img923/5376/oxmRVX.jpg[/IMG]
  2. As I said above I have a very good example of running a .png image file so I think the .png image file is corrupt. I will try the * .bmp image file as you said.
  3. What other information do you need I will give you, I need your help.

@d, it appears you are working the issues slowly as well as posting the same question many times.

As to your answers, you did not answer question 1. The photo link requires me to sign up at that site so no I can't do that. You could have answered my question. I worry there is a language barrier here.

On question 2 I worry you are hung up on a specific image. You might figure that out soon.

As to other information, I don't want to upset you but these first questions and ideas should have taken a few minutes of your time. I know we are all busy and hope you can get these done.

I found the cause of the error on, thank you read my article.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.