How do I setup Visual Studio 2008 to include all files in the project root when debugging?
在调试时如何设置Visual Studio 2008以包含项目根目录中的所有文件?
I have a few files in the project root folder which are not copied to the bin/debug folder so when I am about to debug the application I have to manually copy the files. I'm looking for a way to make VS automatically include these files in the debug build process. Any hints?
我在项目根文件夹中有一些文件没有复制到bin / debug文件夹,因此当我要调试应用程序时,我必须手动复制文件。我正在寻找一种方法让VS在调试构建过程中自动包含这些文件。任何提示?
Thank you. /Adam
谢谢。 /亚当
3 个解决方案
#1
For non-source and non-resource files (so are not part of the compilation), set the "Copy To Output Directory" setting in that file's properties to something other than "Do Not Copy".
对于非源文件和非资源文件(因此不是编译的一部分),请将该文件属性中的“复制到输出目录”设置设置为“不复制”以外的其他设置。
#2
Try to include the files into the solution and once they appear in your project's tree, set the "Copy to Output Directory" property to one of "Copy always" or "Copy if newer"
尝试将文件包含到解决方案中,一旦它们出现在项目的树中,将“复制到输出目录”属性设置为“始终复制”或“如果更新则复制”之一
#3
I find it easiest to keep them in the bin folder, but add them as to the solution as solution items. That way they're part of the solution, kept under source control, etc., but are always in the right place when you need them at runtime.
我发现最简单的方法是将它们保存在bin文件夹中,但将它们作为解决方案项添加到解决方案中。这样他们就是解决方案的一部分,保持在源代码控制之下,但是在运行时需要它们时总是在正确的位置。
#1
For non-source and non-resource files (so are not part of the compilation), set the "Copy To Output Directory" setting in that file's properties to something other than "Do Not Copy".
对于非源文件和非资源文件(因此不是编译的一部分),请将该文件属性中的“复制到输出目录”设置设置为“不复制”以外的其他设置。
#2
Try to include the files into the solution and once they appear in your project's tree, set the "Copy to Output Directory" property to one of "Copy always" or "Copy if newer"
尝试将文件包含到解决方案中,一旦它们出现在项目的树中,将“复制到输出目录”属性设置为“始终复制”或“如果更新则复制”之一
#3
I find it easiest to keep them in the bin folder, but add them as to the solution as solution items. That way they're part of the solution, kept under source control, etc., but are always in the right place when you need them at runtime.
我发现最简单的方法是将它们保存在bin文件夹中,但将它们作为解决方案项添加到解决方案中。这样他们就是解决方案的一部分,保持在源代码控制之下,但是在运行时需要它们时总是在正确的位置。