Can't seem to embed image

Mar 24, 2011 at 8:39 PM

Hello, I've found the FAQ regarding embedding images in the docs. I'm trying to follow the instructions but instead of seeing the iage I'm getting a red "X". Here's what I've done:

1) In my "bin/Release" folder containing the release build dll and the xml file, I've created a folder called "DocImages" and copied an image ("MyImage.bmp") into it.

2) In my code comments I've added     <img src="../DocImages/MyImage.bmp"/>   and rebuilt the project.

3) In SHFB I right-click in the Project Explorer, select "Add->Existing Folder..." and select the "DocImages" folder.

4) In Project Explorer I expand the directory tree so that "DocImages" folder is expanded, select "MyImage.bmp" and make sure "Build Action" is set to "Content".

5) I now click "Documentation -> Build Project".

when I view my documentation I only see a red "X" and not the image itself. What am I doing wrong?

Thanks in advance,

-L

Coordinator
Mar 25, 2011 at 3:16 AM

SHFB will use either the Debug or Release build based on the selection in the toolbar in the GUI.  If it's set to Debug, it may be picking up an outdated version of the XML comments with an incorrect reference to the image.  Rebuild your assembly so that the XML comments are current, select the appropriate build in SHFB and build the help file to see if it picks it up.

Eric

 

Mar 25, 2011 at 7:15 PM

Hi Eric,

I've got "Release" selected in the drop-down of the toolbar in SHFB. I've verified that the dll and xml files listed in SHFB's Project Explorer are indeed the ones in the Release folder of the VS project. I've rebuilt everything and saved all, but still no go.

 

Update: I just tried putting the image in the same folder as the dll and xml file, right-clicking the Project Explorer window and selecting "Add existing item...", switching the file type to .bmp, clicking on the image in Project Explorer and making sure "Content" is listed for Build Action and it works now. Thank you for the help.

-Lionel