如何安装在安装项目的应用程序数据的文件(C#) [英] How to install a file in app data in setup project (C#)
本文介绍了如何安装在安装项目的应用程序数据的文件(C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想安装我的数据库到一个单独的文件夹(@ C:\Users\User1\AppData\Roaming\Company1\database.mdb)
我使用的是C#安装项目。
我该怎么办呢?
解决方案
- 在项目上右键单击,然后选择查看 - >文件系统
- 在新文件系统屏幕上,右键单击根节点(目标机文件系统),然后选择添加特殊文件夹 - >用户的Application Data文件夹
- 选择新添加的文件夹,形成树状视图,并在您需要的任何子文件夹结构
- 最后选择目标文件夹,点击右键,添加 - >文件,并选择.mddb文件
I want to install my database to a separate folder (@ C:\Users\User1\AppData\Roaming\Company1\database.mdb)
I'm using a C# setup project.
How can I do it?
解决方案
- Right-click on the project and select View -> File System
- in the new File System screen, right-click the root node (File System on target Machine) and select Add Special Folder -> User's Application Data Folder
- Select the newly added folder form the treeview and create any sub-folder structure you need
- Finally select your destination folder, right-click, Add -> File and select the .mddb file.
这篇关于如何安装在安装项目的应用程序数据的文件(C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文