Consider this scenario:
- You have
expansion-deps.projitems
which contains the@(JdkIncludePath)
item group. - You have
expansion.props
which uses@(JdkIncludePath)
to generate a$(_JdkIncludePaths)
property - You have
expansion.projitems
which creates a new@(_HostRuntime)
item group which uses$(JdkIncludePath)
within the%(_HostRuntime.CFlags)
item metadata - You print out
%(_HostRuntime.CFlags)
.
Incredibly, behavior differs between xbuild
, msbuild
in mono 4.6, and msbuild
in mono 4.8.
With xbuild
(all versions) the value of $(_JdkIncludePaths)
is printed:
$ xbuild /v:minimal expansion.targets
XBuild Engine Version 14.0
Mono, Version 4.8.0.0
Copyright (C) 2005-2013 Various Mono authors
CFlags: works-with-mono-4.6: -I/something -I/something-else
CFlags: works-with-mono-4.8: -I/something -I/something-else
With msbuild
from Mono 4.6, the value of $(_JdkIncludePaths)
is printed. (TODO: obtain actual output.)
With msbuild
from Mono 4.8, the value of $(_JdkIncludePaths)
is not printed:
$ msbuild /v:minimal expansion.targets
Microsoft (R) Build Engine version 15.1.0.0
Copyright (C) Microsoft Corporation. All rights reserved.
CFlags: works-with-mono-4.6:
CFlags: works-with-mono-4.8: -I/something -I/something-else
The %(_HostRuntime.CFlags)
value for works-with-mono-4.8
doesn't use $(_JdkIncludePaths)
. Instead, it uses @(JdkIncludePath)
:
<_HostRuntime Include="works-with-mono-4.8">
<CFlags>@(JdkIncludePath->'-I%(Identity)', ' ')</CFlags>
</_HostRuntime>
Of course, the canonical version is...what's MSBuild on Windows output? MSBuild/Windows matches xbuild:
>msbuild /v:minimal expansion.targets
Microsoft (R) Build Engine version 14.0.24730.2
Copyright (C) Microsoft Corporation. All rights reserved.
CFlags: works-with-mono-4.6: -I/something -I/something-else
CFlasg: works-with-mono-4.8: -I/something -I/something-else