如何制作项目暂挂项目? [英] How to make project hold items?

查看:71
本文介绍了如何制作项目暂挂项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要安装Windows窗体程序,它将有一个文件文件夹.我的Windows窗体程序将这些文件复制到目录中.因此,在进行部署一键式打包时,如何使它也占据文件夹?

此文件夹包含控制台程序文件和XML文档.



我可能会在资源文件夹中创建文件夹,然后在其中添加文件.希望它能工作.希望它支持我的所有文件!

I want my windows form program when installed, it will have a folder of files. My windows form program copies these files to a directory. So when making the deployment one click package thing, how do I make it so it takes the folder too?

This folder consist of files for a console program and an XML document.



I might make folders in the resource folder and add files through there. Hope it works. Hope it supports all my files!

推荐答案

您回答了自己的问题.将文件作为资源添加到您的应用程序中,然后将其解压缩到用户的数据文件夹中.
You answered your own question. Add the files as resources in your app, and extract them to the user''s data folder.


您可以创建资源* .resx并向其中添加文件;在这种情况下,文件也将自动添加到项目中,在资源文件中将引用这些文件.但是在生成输出中,文件不会被复制到输出目录(默认情况下,您可以更改它).这些文件将作为资源嵌入到您的可执行文件中,因此不需要外部文件.

您可能只需要将一些文件从项目复制到输出目录(或其子目录).为此,您只需要通过添加新项"(在解决方案资源管理器的项目树中)将一些外部文件添加到项目本身.外部文件将被复制到项目中.在构建时,默认情况下将复制文件.您可以转到表示文件的项目节点的属性",并指定在构建时如何处理文件-很少有选择.您会看到的.

—SA
You can create a resource *.resx and add files to it; in these case the files will be automatically added to the project as well, in the resource file the referenced to these files will be added. But on the build output, the files won''t be copied to output directory (by default, you can change it). The files will be embedded in your executable file as resource, so external files are not needed.

You probably need just to copy some files from project to output directory (or sub-directory of it). For this purpose, you just need to add some external files to the project itself through "Add new item" (in Solution Explorer''s project tree). The external files will be copied to the project. On build, the files then will be copied by default. You can go the the Properties of the project node representing the file and specify what to do with the file on build — there are few options. You will see.

—SA


这篇关于如何制作项目暂挂项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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