Reputation: 715
I have thousand of picture that need to be embedded to my C# application. I make a folder inside the Resources, and copy all my file to this folder. I could retrieve my image, using relative path. But the problem is how I could make all this file included when I publish my application.
PS : I couldn't export all my images to resources, because my image folder contain a lot of sub folder
Upvotes: 3
Views: 8007
Reputation: 8234
You can set its Build Action
to Resource (WPF
only) or Embedded Resource
,
however, sometimes a much simpler option is to deploy images with binaries.
See this great explanation on build actions
Upvotes: 0
Reputation: 67898
Select all of the images in Visual Studio, press F4, and change the Build Action
to Embedded Resource
.
Upvotes: 5