开发者

ClickOnce: Text file (.txt) published but application does not download

I have a simple text file with exten开发者_运维问答sion .txt added to my solution with the following properties:

Build Action: Content Copy To Output Folder: Copy always

I see deployed file in the proper IIS directory, which in this case is c:\inetpub\wwwroot\occ600\application files\occ_v_x\docs.

However, when I update my application, this file is not downloaded. IIS already has a MIME type defined for .txt, which I suspected was the problem. Also, this file is the only file in the docs folder in my solution. What else should I look for.

TIA.

Klaus


I'm not so sure that you are having issues with the MIME Type settings but just in case you can try changing a setting in your ClickOnce application that will add a ".deploy" extension to ever file in your project. The installer will strip the .deploy extension from your application files once they are downloaded.

To cut on this feature, open your application's Properties page and go to the Publish tab. On the publish tab, select Options and from within the Options dialog, select the Deployment setting group on the left-hand side. In the Deployment section, check the Use ".deploy" file extension option. (See the screenshot below)

ClickOnce: Text file (.txt) published but application does not download

Republish your application and attempt to install the application. If the Text file is not downloaded after using the .deploy extension, you have another problem.

Hope that helps.


File is being copied. However, code looking for file is not taking into consideration that application could potentially be deployed via ClickOnce. Hence it is always looking for file relative to application install folder rather than testing if application is network deployed before determining where to look for file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜