将文件从项目子文件夹放入输出目录 [英] Place files from project sub-folder into output directory

查看:99
本文介绍了将文件从项目子文件夹放入输出目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在C#项目中创建一个文件夹以包含一些配置文件。但是,我不希望将这些文件复制到 bin\Release\MyFolder 。我希望将它们直接复制到 bin\Release 。我认为这可以通过拥有虚拟文件夹(例如解决方案文件夹)来实现,但我不知道该怎么做。

I want to create a folder inside a C# project to contain some configuration files. However, I don't want these files to be copied to bin\Release\MyFolder. I'd rather have them copied to bin\Release directly. I'm thinking this may be doable by having a "virtual" folder, like solution folders, but I don't know how to do it.

有没有办法在Visual Studio 2008(C#)项目中创建虚拟文件夹?甚至更好,如何指定(文本)文件输出应定向到主输出文件夹?

Is there a way to create a virtual folder in Visual Studio 2008 (C#) projects? Or even better, how can I specify that the (text) file output should be directed to the main output folder?

推荐答案

复制带有构建后事件的文件。

Copy the file with a Post-build event.

这篇关于将文件从项目子文件夹放入输出目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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