Greetings all,
I'm working with a C# solution in VS 2010. Right now, since I'm targeting AnyCPU, when I want to build my installer, I can just select Release mode and hit build and everything is done for me.开发者_JS百科 However, pretty soon I'm going to have to add a C++ DLL project to the solution to accomplish some low-level stuff. To avoid having two different download links for x86 and x64, I'd like to include both builds in my installer. But, it will be very annoying if I have to have separate configurations for x86 and x64. I'll have to build one, then the other, then package it up. Is there some way I can get Visual Studio to compile both the x86 and x64 builds of the C++ project as part of Release mode?
Well, I found a solution. Just make two projects, one for x86 build and one for x64 build, referencing the same source files. It's ugly, but it works.
I think that you will have to manually edit the proj files to ensure that the msbuild instructions are correct. I suspect it's not a hard job.
Just add executing command to build such configuration in PostBuild event of C++ DLL project. Use macroses and help of "devenv /?".
AFAIR e.g.:
devenv $(SolutionName) /project $(ProjectName) /ProjectConfig "Release|x64"
精彩评论