Skip to Content
author's profile photo Former Member
Former Member

How does PictureButton resource work in .Net Assembly?


Does anybody know how PB picturebutton's picture file deploy work in a .Net Assembly dll?

Picture file name is specified in the .Net Assembly project file. PB (classic) deploys it successfully by generating the dll. Then add the dll to a C# window form application.

Run the WinForm application to open PB window with picturebutton control and the picture is shown. However, if I delete the picture file in the PB resource location, run the WinForm application again and I got System.IO.FileNotFoundException error.

Isn't the picture embedded in the dll and then loading from dll?

Thanks for any help!


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2016 at 05:20 PM

    You should be able to assign a PBR file in the project similar to how Classic works. That should cause the picture file to be embedded.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Christine;

      The PB Assembly will not derive any external resources from a DLL but only from its own deployed location. That is because the Assembly feature was built upon the PB 11.0 WebForms feature. In Webforms, all external resources like images are always external entities that must be deployed to the IIs web server deployment location for the server & browser to resolve.

      Because the Assembly .Net compilation uses that same Webforms model mentality - ignoring the PBR - and placing the image files within the "bin\debug\" location you mentioned. So you will have to deploy all your images as independent files to the PB Assemblies location where VS is picking up the Assembly in order for that to work visually.

      The only way this image file restriction could be changed is when Appeon releases their own PB versions and upgrades the .Net Assembly processing model to use the PBR directed DLL(s). 😉


      Regards ... Chris

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.