Background image on button on form not appearing in .exe

Hi guys,

Really struggling… this suddenly stopped working.

I have this form with some buttons … snip below. I have set the background image to a png. No foreground image or text.

Problem. When running in visual studio, it looks fine. BUT when I build and run the executable, there is no image on the buttons. It “used” to work fine.

After days of googling I am really struggling. Nothing I read seems really relevant.

The .resx file seems to contain the images…

Would be grateful for any suggestions…

Pictures below.

image

image

image

Tool: Visual Studio, Visual Studio Code, PSScriptPad, PowerShell Module
Version: 

Do you have a resources.psd1 file being generated in the same folder as the form\resx file? It’s possible that isn’t being bundled correctly.

Tx for the reply…

Yes… I do have the file. And in wordpad I think I can see the encoded image(s).

I deleted the file… edited the .resx and deleted the images. I then went back to the form and re-added the images to the buttons. This repopulated the resx and re-created the byod.resources.ps1 file.

Sadly … with an identical result.

All the googling I do references options that I cannot seem to find…

Regards

image

sorry … one thing I forgot to mention.

At some stage my project started “talking” about a .pssproj file. But the .sln seem to also to be of interest to visual studio… In fact opening either seem to have the same result.

I have not idea if that is relevant. I may have tried to edit the code in another ide ? But google seem to think that .pssproj is relevant ??

EDIT: I can reproduce this. Looking at a fix.

Thanks for the info. Let me try to reproduce this and will let you know next steps.

As for the .pssproj vs .sln files: .sln (solution) files can contain one more or more project files for different types of projcets (C#, F#, VB.NET, PowerShell) and the .pssproj is the PowerShell project type. Visual Studio always creates a solution when you open a project. You can use the file mode but then the forms designer will not work.

This has been resolved in 5.9.3 and will be available on the marketplace in about an hour.

Yep. All good now.
Many tx…
FWIW… I had to delete and re-import the images into the .resx file…
tx again… that was doing my head in :blush: