本文介绍了我们如何创建一个仅导出某些文件却什么也不做的.VCXPROJ?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,

我有一个VC ++解决方案(通过Visual Studio 2010创建).在此代码库中,我有10个项目,构建解决方案后,我得到10个dll作为最终输出.

同样在此代码库中,我有一个名为 3rdparty 的文件夹,其中有一些第三方dll.现在,我的要求是我要导出所有这些dll以及此解决方案生成的10个dll.

问题:
我无法从10个项目中的任何一个导出 3rdparty dll.所以我做了什么,我创建了一个单独的vcxproj(第11个),名为 ThirdPartExporter.vcxproj ,在这里我没有放置任何代码,只是使用了它的 Post Build Events 设置进行复制最终输出文件夹中的所有 3rdparty dll.现在的问题是,即使使用 Rebuild 选项,构建解决方案也永远不会构建该项目.因此,我必须显式重建 ThirdPartExporter.vcxproj ,以便将 3rdparty dll复制到输出文件夹中.因此,我无法导出具有构建后事件设置的 3rdparty dll,因为每次都必须显式重建 ThirdPartExporter.vcxproj .

我想要什么:
我想创建一个没有任何代码的单独的vcxproj.但是,在重建解决方案时,它会将所有dll从 3rdparty 文件夹复制(导出)到最终输出文件夹.

在这方面有人可以帮我吗?

在此先感谢,
Aseem Sharma

Hi friends,

I have a VC++ solution (created through Visual Studio 2010). In this code base, I have 10 projects and after building the solution I get 10 dlls as the final output.

Also in this code base, I have a folder called 3rdparty where I have some third party dlls. Now my requirement is that I want to export all of those dlls along with 10 dlls that this solution produces.

Problem:
I cannot export 3rdparty dlls from any of the 10 projects. So what I did, I created a separate vcxproj (the eleventh one) named ThirdPartExporter.vcxproj where I did not put any code but just used its Post Build Events settings to copy all the 3rdparty dlls in the final output folder. Now, the problem is that building solution never build this project even with Rebuild option. So I have to explicitly rebuild ThirdPartExporter.vcxproj to copy 3rdparty dlls in the output folder. So I cannot export 3rdparty dlls with Post Build Events settings as I have to rebuild ThirdPartExporter.vcxproj explicitly every time.

What I want:
I want to create a separate vcxproj which does not has any code. But while rebuilding the solution it copy (export) all the dlls from 3rdparty folder to the final output folder.

Can anybody help me in this regard?

Thanks in Advance,
Aseem Sharma

推荐答案




这篇关于我们如何创建一个仅导出某些文件却什么也不做的.VCXPROJ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 14:11