How to link multiple visual studio solutions together?

前端 未结 9 1478
南笙
南笙 2021-02-01 01:28

I have 3 solutions and solution A requires built versions of the dlls from solution B and C in order to compile. it is not possible to merge it to one solution...

So far

9条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-01 02:12

    I fixed the issue by putting the script in the pre-build event command line and if project A is failed to build throw msg alert

    ECHO "build A project"
    set AppMsg ="%SystemRoot%\System32\msg.exe"
    set AppMsg
    if not "%ProgramFiles(x86)%" == "" (
    if exist "%SystemRoot%\Sysnative\*" set AppMsg="%SystemRoot%\Sysnative\msg.exe"
    )
    set AppMsg
    taskkill /f /im "%PROGRAMFILES(X86)%\MSBuild\14.0\Bin\msbuild" "$(SolutionPath)" /t:Project_A_Name /p:Configuration=Debug;TargetFrameworkVersion=v4.5 /p:Platform="Any CPU" /p:BuildProjectReferences=false /p:VSToolsPath="%PROGRAMFILES(X86)%\MSBuild\Microsoft\VisualStudio\v14.0" 2>nul 1>nul
    echo ERRORLEVEL %ERRORLEVEL%
    if ERRORLEVEL 1 (
    ECHO "failed to build test project"
    %AppMsg% * "failed to build test project"
    )
    exit 0
    

提交回复
热议问题