Commit e070ce3
authored
[build] Remove <Imports/> now covered by Directory.Build.props (#607)
In commit 95f698b, we renamed `Configuration.props` to
`Directory.Build.props`.
`Directory.Build.props` is special in that MSBuild will
[automatically import the file][0] if it's in the "current" directory
or any parent directory:
> When MSBuild runs, *Microsoft.Common.props* searches your directory
> structure for the *Directory.Build.props* file (and
> *Microsoft.Common.targets* looks for *Directory.Build.targets*).
Unfortunately, commit 95f698b introduced some build warnings
because of this change, as some projects were still manually
importing file which were now being imported by
`Directory.Build.props`, resulting in warnings such as:
tests\Java.Interop-Tests\Java.Interop-Tests.csproj(33,3): Warning MSB4011:
"d:\a\1\s\bin\BuildRelease\JdkInfo.props" cannot be imported again.
It was already imported at "d:\a\1\s\Directory.Build.props (13,3)".
This is most likely a build authoring error.
This subsequent import will be ignored.
Remove unnecessary `<Import/>`s from the project files, to reduce the
number of MSB4011 warnings reported.
Note that this does not fix *all* MSB4011 warnings. In particular
`build-tools/jnienv-gen/jnienv-gen.csproj` still reports warnings, as
it hasn't been migrated to be a Short-Form project yet.
[0]: https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2019#directorybuildprops-and-directorybuildtargets1 parent e7c5f54 commit e070ce3
File tree
4 files changed
+0
-8
lines changed- src/java-interop
- tests
- Java.Interop-PerformanceTests
- Java.Interop-Tests
- Java.Interop.Export-Tests
4 files changed
+0
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| |||
0 commit comments