![](/img/trans.png)
[英]Use a single Visual Studio solution to build both x86 and x64 at the same time for C++/CLI project
[英]Build C++ dll to both platforms (x86+x64) on build server
有沒有辦法在構建服務器(TeamCity)上構建(msbuild)32和64位的C ++庫?
我的解決方案包含一些C#項目(所有AnyCPU)和一個C ++:
在msbuild腳本中嘗試使用此目標:
<Target Name="AfterBuild">
<MSBuild Condition=" '$(Platform)' == 'Win32' " Projects="$(MSBuildProjectFile)"
Properties="Platform=x64;PlatFormTarget=x64" RunEachTargetSeparately="true" />
</Target>
但沒有成功! (將使用在配置窗口中選擇的平台)
我通過在VisualStudio中添加一個新配置來解決它,只為32位構建本機C ++庫。
NativeLibs_x86
Win32
Build復選框 NativeLibs_x86
構建到您的msbuild腳本 <Target Name =“BuildNativeLibs”> <MSBuild Projects =“$(SolutionFile)”Targets =“Rebuild”Properties =“Configuration = NativeLibs_x86; Platform = AnyCPU; DeployOnBuild = false”BuildInParallel =“false”/>
</目標>
BuildRelease
目標中考慮目標BuildNativeLibs
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.