设置Windows应用程序项目 [英] Setup a windows application project

查看:154
本文介绍了设置Windows应用程序项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述







我有一个Windows应用程序,包含文件夹中的.xlsx文件和另一个文件夹中的.jpeg文件。这个应用程序执行正常,但是当我创建一个安装项目并执行exe文件时,我可以找到异常,即我找不到.xlsx和.jpeg文件的路径。



我们是否需要在安装项目中分别添加.xlsx和.jpeg文件以及相应的文件夹。



i已在谷歌搜索我无法得到正确的解决方案。

请帮我解决问题

Hi,


I have an windows application which consists of .xlsx file in on folder and .jpeg files in another folder. This application in executing fine but when I create a setup project and execute the exe file, I could find the exception i.e I couldn't find the path of .xlsx and .jpeg files.

Do we need to add .xlsx and .jpeg files along with there respective folders separately in setup project.

i have searched in google I couldn't get correct solution.
Please help me in getting a solution

推荐答案

是的,你是对的。



您必须在安装项目中分别添加.xlsx文件和.jpeg文件以及相应的文件夹。
Yes, you are correct.

You will have to add the .xlsx file and .jpeg files along with there respective folders separately in the setup project.






右键单击安装项目,然后选择查看 > 文件系统,从那里你可以访问许多特殊的文件夹,如安装文件夹,appdata,桌面等,并添加文件到那里,这将在安装应用程序时创建。确保将alwayscreate属性设置为true。



Right click the setup project, and select "View" > "File System", and from there you can access a lot of special folders like install folder, appdata, desktop etc, and add files to there, that will be created when you install the application. Make sure to set the "alwayscreate" property to true.





您可以在该文件夹中添加文件&通过代码访问它们。



You can add your files in that folder & access them through code.


这篇关于设置Windows应用程序项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆