gpt4 book ai didi

visual-studio - Visual Studio 2005项目中的可部署内容……如何?

转载 作者:行者123 更新时间:2023-12-04 03:42:56 25 4
gpt4 key购买 nike

我有一个带有单个C ++项目的普通Visual Studio 2005解决方案,其中包含一些我想包括在构建过程中的非代码文件。

例如,我有一个.xml文件,在相对于我的项目目录的路径中,“内容”设置为“真”。根据我的理解,应该将其复制到与项目相同的相对路径中的输出目录。

alt text http://img27.imageshack.us/img27/9876/deployablecontent.gif

但是,什么也不会被复制。是什么赋予了?

目录结构是这样的:

./           <- This is the project directory.
./content <- This is where my "deployable" content is.
./include
./src
./build <- This is the temp directory used when compiling.
./dist <- This is the output directory.


执行调试构建后,我希望我的输出像这样:

./
./content
./include
./src
./build
./dist
./dist/debug <- Compiled code is now here.
./dist/debug/content <- My "deployable" files should be here.


实际上,将“ Content”设置为“ True”(如提供的屏幕截图所示)似乎没有任何作用。我只是误解了它是如何工作的?

最佳答案

我通常使用Post-Build事件将其他文件复制到输出中,但是您的问题很棘手。我发现如果右键单击项目并选择属性,则会显示一个不同的对话框,该对话框可让您指定在构建过程中要执行的操作。但是,我无法使用标准Windows命令创建与您想要的行为类似的行为。因此,您可能需要编写自己的程序以将文件复制到输出。

关于visual-studio - Visual Studio 2005项目中的可部署内容……如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/661057/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com