You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
Repository navigation
Commit 88d6093
Browse filesBrowse the repository at this point in the historyBrowse files
`dotnet build Java.Interop.sln` didn't work unless `-m:1` was used:
% make prepare-core JI_MAX_JDK=8
% dotnet build -target:Prepare -p:MaxJdkVersion=8 Java.Interop.sln
% dotnet build Java.Interop.sln
…
…/tests/Java.Interop.Export-Tests/Java.Interop.Export-Tests.csproj(35,5): error MSB3073: The command ""/Users/jon/android-toolchain/jdk-1.8/bin/javac" -classpath …" exited with code 1.
…/tests/Java.Interop.Export-Tests/Java.Interop.Export-Tests.csproj(35,5): error MSB3073: The command ""/Users/jon/android-toolchain/jdk-1.8/bin/javac" -classpath …" exited with code 1.
…/tests/Java.Interop-Tests/Java.Interop-Tests.csproj(60,5): error MSB3073: The command ""/Users/jon/android-toolchain/jdk-1.8/bin/javac" -source 1.8 -target 1.8 -bootclasspath …" exited with code 1.
…/tests/Java.Interop-Tests/Java.Interop-Tests.csproj(60,5): error MSB3073: The command ""/Users/jon/android-toolchain/jdk-1.8/bin/javac" -source 1.8 -target 1.8 -bootclasspath …" exited with code 1.
Using `dotnet build -m:1` avoids the above MSB3073 errors; see also
commit 1de5501, which added `-m:1` to CI builds.
Fix these parallel build issues so that `-m:1` isn't needed. This is
principally done by removing `Java.Interop.BootstrapTasks.csproj`
from `Java.Interop.sln`, and adding it to a new
`Java.Interop.BootstrapTasks.sln` solution. The `Prepare` target is
updated to explicitly Restore and Build the new
`Java.Interop.BootstrapTasks.dll` solution.
Note that the Restore and Build target invocations must be separate;
using [`Targets="Restore;Build"` will not work][0].
Update `Java.Interop.BootstrapTasks.csproj` to *no longer* `<Import/>`
`VersionInfo.targets`, as this causes a circular dependency
(`VersionInfo.targets` uses tasks from
`Java.Interop.BootstrapTasks.dll`). This is fine, as
`Java.Interop.BootstrapTasks.dll` doesn't need to be versioned.
Review our custom `.targets` files, and replace
`BeforeTargets="BeforeBuild"` with `BeforeTargets="Build"` or
`BeforeTargets="BeforeCompile"` (as appropriate).
Building before the `BeforeBuild` target is problematic, as the
`BeforeBuild` target runs before `@(ProjectReference)`d projects are
built, meaning dependencies may not exist. (Oops.)
TODO: Instead of having two `.sln` files, try to instead use
`<UsingTask/>` with `AssemblyFile` and `TasFactory` set, as done in
[rainersigwald/build-task-in-solution-demo][1] and the
[`InvokeCustomTaskDemo` target][2]. This *may* avoid the need for
a separate `.sln` (and `Prepare` target invocation?).
[0]: dotnet/msbuild#2811 (comment)
[1]: https://github.com/rainersigwald/build-task-in-solution-demo
[2]: https://github.com/rainersigwald/build-task-in-solution-demo/blob/17508937bb9edb0b817820146f85adf0da331515/Task/DemoFunctionality.targets#L4-L10
0 commit comments