Commit d0f28fd
committed
Java.Interop.Export-Tests depends on jcw-gen
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10949922&view=logs&j=fc903661-9840-55b3-f380-f59f595bd021&t=96c38280-19e2-5308-b6a5-3c71c0cffc81
Context: #1302
PR #1302 is failing on Windows for a non-obvious reason:
Java.Interop.Export-Tests -> D:\a\1\s\bin\TestRelease-net8.0\Java.Interop.Export-Tests.dll
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but dotnet-D:\a\1\s\bin\Release-net8.0\/jcw-gen.dll does not exist. Could not execute because the specified command or file was not found. * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH. ##[error]tests\Java.Interop.Export-Tests\Java.Interop.Export-Tests.targets(20,5): Error MSB3073: The command "dotnet "D:\a\1\s\bin\Release-net8.0\/jcw-gen.dll" "D:\a\1\s\bin\TestRelease-net8.0\Java.Interop.Export-Tests.dll" --codegen-target JavaInterop1 -o "obj\\Release-net8.0\/java" -L "D:\a\1\s\src\Java.Base\bin\Release\ref\." -L "D:\a\1\s\bin\Release-net8.0\ref\." -L "D:\a\1\s\bin\TestRelease-net8.0\ref\." -L "C:\hostedtoolcache\windows\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.7\ref\net8.0\." -L "C:\Users\VssAdministrator\.nuget\packages\microsoft.testplatform.testhost\17.5.0-preview-20221003-04\lib\netcoreapp3.1\." -L "C:\Users\VssAdministrator\.nuget\packages\microsoft.codecoverage\17.5.0-preview-20221003-04\lib\netcoreapp3.1\." -L "C:\Users\VssAdministrator\.nuget\packages\mono.linq.expressions\2.0.0\lib\netstandard2.0\." -L "C:\Users\VssAdministrator\.nuget\packages\mono.options\6.12.0.148\lib\netstandard2.0\." -L "C:\Users\VssAdministrator\.nuget\packages\newtonsoft.json\13.0.1\lib\netstandard2.0\." -L "C:\Users\VssAdministrator\.nuget\packages\nuget.frameworks\5.11.0\lib\netstandard2.0\." -L "C:\Users\VssAdministrator\.nuget\packages\nunit\3.13.2\lib\netstandard2.0\." -L "D:\a\1\s\external\xamarin-android-tools\bin\Release\net6.0\ref\."" exited with code 1. D:\a\1\s\tests\Java.Interop.Export-Tests\Java.Interop.Export-Tests.targets(20,5): error MSB3073: The command "dotnet "D:\a\1\s\bin\Release-net8.0\/jcw-gen.dll" "D:\a\1\s\bin\TestRelease-net8.0\Java.Interop.Export-Tests.dll" --codegen-target JavaInterop1 -o "obj\\Release-net8.0\/java" -L "D:\a\1\s\src\Java.Base\bin\Release\ref\." -L "D:\a\1\s\bin\Release-net8.0\ref\." -L "D:\a\1\s\bin\TestRelease-net8.0\ref\." -L "C:\hostedtoolcache\windows\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.7\ref\net8.0\." -L "C:\Users\VssAdministrator\.nuget\packages\microsoft.testplatform.testhost\17.5.0-preview-20221003-04\lib\netcoreapp3.1\." -L "C:\Users\VssAdministrator\.nuget\packages\microsoft.codecoverage\17.5.0-preview-20221003-04\lib\netcoreapp3.1\." -L "C:\Users\VssAdministrator\.nuget\packages\mono.linq.expressions\2.0.0\lib\netstandard2.0\." -L "C:\Users\VssAdministrator\.nuget\packages\mono.options\6.12.0.148\lib\netstandard2.0\." -L "C:\Users\VssAdministrator\.nuget\packages\newtonsoft.json\13.0.1\lib\netstandard2.0\." -L "C:\Users\VssAdministrator\.nuget\packages\nuget.frameworks\5.11.0\lib\netstandard2.0\." -L "C:\Users\VssAdministrator\.nuget\packages\nunit\3.13.2\lib\netstandard2.0\." -L "D:\a\1\s\external\xamarin-android-tools\bin\Release\net6.0\ref\."" exited with code 1. [D:\a\1\s\tests\Java.Interop.Export-Tests\Java.Interop.Export-Tests.csproj]
Given that *later* in the build, we see:
jcw-gen -> D:\a\1\s\bin\Release-net8.0\jcw-gen.dll
it looks like we have a build ordering issue, and
`tests/Java.Interop.Export-Tests` is being run *before* `jcw-gen`?
Add a `@(PackagReference)` to `Java.Interop.Export-Tests.csproj`
to ensure `jcw-gen.csproj` is built first.1 parent be24451 commit d0f28fd
File tree
1 file changed
+4
-0
lines changed- tests/Java.Interop.Export-Tests
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
0 commit comments