Commit 3091274
authored
[build] Provide a default $(Configuration) value (#612)
When `Directory.Build.props` is imported by MSBuild, the
`$(Configuration)` property will only be defined if it was excplitily
provided on the command line. As such, when building the repo when
using **make**(1), it builds:
$ make prepare
$ make all
# works!
After `make all`, if we attempt to manually build a single `.csproj`,
it may fail:
$ msbuild tests/Java.Interop-Tests/Java.Interop-Tests.csproj
...
BuildInteropTestJar:
"" -source 1.6 -target 1.6 -bootclasspath "" -d "obj/Debug/it-classes" -classpath …
…: error MSB3073: The command """ -source 1.6 -target 1.6 …" exited with code 127.
Building a single `.csproj` works if the `Configuration` property is
explicitly provided:
$ msbuild tests/Java.Interop-Tests/Java.Interop-Tests.csproj /p:Configuration=Debug
# no error
Update `Directory.Build.props` so that if no `$(Configuration)` is
provided we default to the Debug configuration. This allows all the
relevant `$(Configuration)`-dependent properties to have correct and
consistent values, which allows projects to build as intended:
$ msbuild tests/Java.Interop-Tests/Java.Interop-Tests.csproj
# no errors1 parent cf3e7c2 commit 3091274
1 file changed
+8
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
0 commit comments