Hi guys,

Have been developing C# desktop apps for a while now and when it comes to packaging(not clickonce),deployment with cd/dvd, I publish using visual studio's Build->publish option.The application installs well but all the paths to resources like images are broken.Where I'm I supposed to place the resources or which tool can do proper packaging. thanks

Recommended Answers

All 5 Replies

One way have all your resources in the same folder as the app, then use Application.StartupPath as your path to the files. Make sure that if you change from debug to release the files go there too.

Another idea is to store your resources IN your application. Click Here for some details.

@tinstaaf, How would one make sure that when the project is built and packaged to release, the resources are bundled into the release too.I have this app where I have to upload images to an application folder at runtime.

Publishing with Visual studion kind of disassembles the project and as is not the same structure as when its in debug and thus the resources are lost, paths broken

add the files as existing items then they become part of the project. Once they are added you can drag them to the debug folder.

@tinstaaf I have alredy added them to the debug folder but when i publish with visual studio's Build-> publish option, the resources cannot be referenced.Have found other options using the setup wizard tring it out

Be a part of the DaniWeb community

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