如何在Visual Studio C#项目的部署中包括文件和文件夹? [英] How to include files and folders in the deployment of a visual studio, C# project?

查看:55
本文介绍了如何在Visual Studio C#项目的部署中包括文件和文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发C#应用程序.在此程序中,它会浏览目录,并使用同一目录中的文件,其中包含debug文件夹中的exe文件.我将安装项目添加到应用程序的解决方案中以进行部署.我趋于幼稚,认为将文件和文件夹安装到另一台计算机上后,就可以将它们放到安装文件夹中了.我知道有一种方法可以将这些文件和文件夹添加到项目中,并进行设置,以使安装程序在安装时安装这些文件.

解决方案

我假设您正在使用Visual Studio 2010,并使用Visual Studio安装程序 Setup Project 创建一个MSI输出文件.

右键单击Setup项目,选择 View 菜单,然后选择文件系统.
您可以在其中定义要安装的文件和文件夹.

I am working on a C# application. Inside this program it looks through a directory and uses files in the same directory containing the exe files in the debug folder. I added a setup project, for deployment, to the solution for the application. I tend to be naive and figured I could just drop the files and folders into the installation folder after I install it on another computer. I know there is a way to add these files and folders to the projects and set it up to have the installer install these files at the time of installation.

解决方案

I assume you are working with Visual Studio 2010, and using Visual Studio Installer Setup Project to create an MSI output file.

Right click on the Setup project, select View menu, and select File System.
In there you are able to define files and folders to be installed.

这篇关于如何在Visual Studio C#项目的部署中包括文件和文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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