tag:help.appveyor.com,2012-11-13:/discussions/questions/46199-multi-project-build-with-different-build-platformsAppVeyor: Discussion 2020-04-03T18:47:41Ztag:help.appveyor.com,2012-11-13:Comment/480517452020-01-30T15:21:36Z2020-01-30T15:21:37ZMulti-project build with different build platforms<div><p>I have a Visual Studio solution that contains three projects.</p>
<ul>
<li>MonoTest.Shared</li>
<li>MonoTest.DirectX</li>
<li>MonoTest.OpenGL</li>
</ul>
<p>The Shared project is, obviously, a shared project that is referenced by the DirectX and OpenGL projects. I have managed to successfuly build the DirectX project but the OpenGl project fails with the following error: <code>The OutputPath property is not set for project 'MonoTest.OpenGL.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Release' Platform='x86'.</code></p>
<p>The DirectX project can only build on x86 platform, while the OpenGL project builds with Any CPU.</p>
<p>Is it possible to setup the matrix so each project can build for platforms? So DirectX: Release x86 + Debug x86 and OpenGL: Release: Any CPU + Debug Any CPU.</p>
<p>This is my current appveyor.yml file.</p>
<pre>
<code>version: 1.0.{build}
configuration:
- Release
- Debug
platform: x86
install:
- ps: >-
$source = "https://github.com/MonoGame/MonoGame/releases/download/v3.7.1/MonoGameSetup.exe"
$output = "MonoGameSetup.exe"
Start-FileDownload $source
Start-Process -Wait -FilePath $output /S
environment:
matrix:
- project_name: MonoTest.Another
- project_name: MonoTest.DirectX
- project_name: MonoTest.OpenGL
build:
project: $(project_name)/$(project_name).csproj
verbosity: minimal
test: off
matrix:
fast_finish: true</code>
</pre></div>Matttag:help.appveyor.com,2012-11-13:Comment/480517452020-01-31T10:04:59Z2020-01-31T10:05:00ZMulti-project build with different build platforms<div><p>Update. This config seemed to work. One minor annoyance is the list of build jobs, it shows</p>
<ul>
<li>DirectX</li>
<li>DirectX</li>
<li>OpenGL</li>
<li>OpenGL</li>
</ul>
<p>It would be nice to see which configuration it's using.</p>
<pre>
<code>version: 1.0.{build}
install:
- ps: >-
$source = "https://github.com/MonoGame/MonoGame/releases/download/v3.7.1/MonoGameSetup.exe"
$output = "MonoGameSetup.exe"
Start-FileDownload $source
Start-Process -Wait -FilePath $output /S
configuration:
- Release
- Debug
environment:
matrix:
# DirectX Job
- job_name: DirectX
project_name: MonoTest.DirectX
platform: x86
# OpenGL Job
- job_name: OpenGL
project_name: MonoTest.OpenGL
platform: AnyCPU
matrix:
fast_finish: true
build:
project: $(project_name)/$(project_name).csproj
parallel: true
verbosity: minimal
test: off</code>
</pre></div>Matttag:help.appveyor.com,2012-11-13:Comment/480517452020-01-31T21:43:16Z2020-01-31T21:43:16ZMulti-project build with different build platforms<div><p>You can enumerate all configurations explicitly instead:</p>
<pre>
<code>version: 1.0.{build}
install:
- ps: >-
$source = "https://github.com/MonoGame/MonoGame/releases/download/v3.7.1/MonoGameSetup.exe"
$output = "MonoGameSetup.exe"
Start-FileDownload $source
Start-Process -Wait -FilePath $output /S
environment:
matrix:
- job_name: DirectX, Debug
project_name: MonoTest.DirectX
platform: x86
configuration: Debug
- job_name: OpenGL, Debug
project_name: MonoTest.OpenGL
platform: AnyCPU
configuration: Debug
- job_name: DirectX, Release
project_name: MonoTest.DirectX
platform: x86
configuration: Release
- job_name: OpenGL, Release
project_name: MonoTest.OpenGL
platform: AnyCPU
configuration: Release
matrix:
fast_finish: true
build:
project: $(project_name)/$(project_name).csproj
parallel: true
verbosity: minimal
test: off</code>
</pre></div>Feodor Fitsner