在C#中部署映像 [英] Deploying images in c#

查看:143
本文介绍了在C#中部署映像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用当前我位于Application.UserAppDataPath中的应用程序来部署一些数据文件.当别人在他们的计算机上安装这些数据时,如何确保复制这些数据?
预先感谢Mick

I want to deploy some data files with my application, currently in the Application.UserAppDataPath. How can I ensure that this data is copied when someone else installs this on their computer?
Thanks in advance, Mick

推荐答案

设置向导允许自定义操作,甚至可以运行附加的.exe文件.您可以构建一个单独的.exe文件,该文件仅用于复制文件.

要添加自定义动作,请右键单击安装项目,然后依次转到查看"和自定义动作".
然后只需将文件复印机添加为操作即可.
The setup wizard allows for custom actions, like even running attached .exe files. You can build a seperate .exe file that is there solely for copying the files.

To add custom actions right click on the setup project and go to View and then Custom Actions.
Then just add the file copier as the action.


您可以为应用程序提供一个安装程序,用于安装所需的文件.或者,如果不是太大,请将它们作为资源包含在应用程序程序集中.
You could provide a setup for your application that installs the files required. Or, if not too large, include them as resources within the application assembly.


这篇关于在C#中部署映像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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