开发者

Deploying with a folder structure

Good day all,

I have written an application that i require to have a certain directory structure/. Nothing complex but it will need an "Images" Folder which contains two other folders "Temp" and "Complete".

These folders are in m开发者_JS百科y solution however upon publishing all the folders are gone and i can not find any way in which to cause these certain folders to persist.

Will i have to write some code that checks if these exist and create them or can i make an application directory structure exist from the very beginning.

Dont know if this is relevant but i am using WPF and deploying through click-once.

Thanks, Kohan


Regardless of whether you find a solution to the installation part of your question it would be prudent to check that the folders exist either on application start up or when you need to access them. After all, someone could come along and delete them without realising that they're needed. You might want to report or log this as an error, but recreate them anyway.


I assume you are using Visual Studio to create your ClickOnce deployments. If so, you can get around this issue by using MageUI instead.

Create your desired folder structure separate from you project's source code and bin folders. Copy in all the files you want deployed. Use MageUI and when you create the application manifest, point it to the root folder you created. It will take care of all the subfolders.

Also, I wouldn't worry too much about what ChrisF said. ClickOnce files are deployed to a very obfuscated location that users should never be in. And if they are in there deleting stuff, you'll likely have much bigger problems that a missing subfolder.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜