Closed wasabii closed 1 year ago
Copied from #281, as this is a distinct issue.
This problem was also reported by @NightOwl888 at https://github.com/ikvm-revived/ikvm-maven/issues/29
A workaround should be to ensure that your invocation of MSBuild is not running in parallel. That is, ensure you aren't passing /m to MSBuild, and aren't setting BuildInParallel.
The underlying issue was the IkvmCompilerTask (and others) yielding to the engine to continue potential parallel tasks, while IkvmCompiler itself attempted to determine files by using Environment.CurrentDirectory. MSBuild sets Environment.CurrentDirectory to the current project path. But, if you yield back to the engine, MSBuild is free to reset it to whatever Project it is working on at the moment. Environment.CurrentDirectory is a process wide value.
Solution was to resolve relative paths to absolute paths before yielding back to the engine. That way no relative resolution is attempted down the code path.
Great. Any chance we can roll a prerelease?
https://www.nuget.org/packages/IKVM/8.4.5-prerelease0001
Can ya'll please test this?
The error is gone. But now I am getting mysterious warnings that don't have a warning message. In the logs, the threads are numbered so I can see they are all happening on the IKVM.Tests project and none of the other projects are now complaining.
The fact that they are repeating 3 times can be explained by the project targeting 3 TFMs even though the first 2 don't report the TFM.
I am targeting IKVM.Maven.Sdk 1.2.0 and IKVM 8.4.5-prerelease0001. These warnings didn't occur when I was targeting IKVM.Maven.Sdk 1.2.0 and IKVM 8.4.0.
Here is an example. I removed the satellite assembly copy code to rule that out.
Build succeeded.
"D:\a\1\s\IkvmPublishDemo.sln" (default target) (1:2) ->
"D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj" (default target) (3:18) ->
"D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj" (Build target) (3:20) ->
(_CompileIkvmReferences target) ->
C:\Users\VssAdministrator\.nuget\packages\ikvm\8.4.5-prerelease0001\buildTransitive\netstandard2.0\IKVM.Tasks.targets(31,9): warning : ikvmc (8.4.5-prerelease.1+5.Branch.hotfix-8.4.5.Sha.66c1b7ebb582c8eac4f114eb922c1e665c7080f6) [D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj]
C:\Users\VssAdministrator\.nuget\packages\ikvm\8.4.5-prerelease0001\buildTransitive\netstandard2.0\IKVM.Tasks.targets(31,9): warning : Copyright c 2023 Jeroen Frijters, Windward Studios, Jerome Haltom, Shad Storhaug [D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj]
C:\Users\VssAdministrator\.nuget\packages\ikvm\8.4.5-prerelease0001\buildTransitive\netstandard2.0\IKVM.Tasks.targets(31,9): warning : [D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj]
"D:\a\1\s\IkvmPublishDemo.sln" (default target) (1:2) ->
"D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj" (default target) (3:18) ->
"D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj" (Build target) (3:21) ->
C:\Users\VssAdministrator\.nuget\packages\ikvm\8.4.5-prerelease0001\buildTransitive\netstandard2.0\IKVM.Tasks.targets(31,9): warning : ikvmc (8.4.5-prerelease.1+5.Branch.hotfix-8.4.5.Sha.66c1b7ebb582c8eac4f114eb922c1e665c7080f6) [D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj]
C:\Users\VssAdministrator\.nuget\packages\ikvm\8.4.5-prerelease0001\buildTransitive\netstandard2.0\IKVM.Tasks.targets(31,9): warning : Copyright c 2023 Jeroen Frijters, Windward Studios, Jerome Haltom, Shad Storhaug [D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj]
C:\Users\VssAdministrator\.nuget\packages\ikvm\8.4.5-prerelease0001\buildTransitive\netstandard2.0\IKVM.Tasks.targets(31,9): warning : [D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj]
"D:\a\1\s\IkvmPublishDemo.sln" (default target) (1:2) ->
"D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj" (default target) (3:18) ->
"D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj" (Build target) (3:19) ->
C:\Users\VssAdministrator\.nuget\packages\ikvm\8.4.5-prerelease0001\buildTransitive\netstandard2.0\IKVM.Tasks.targets(31,9): warning : ikvmc (8.4.5-prerelease.1+5.Branch.hotfix-8.4.5.Sha.66c1b7ebb582c8eac4f114eb922c1e665c7080f6) [D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj::TargetFramework=net6.0]
C:\Users\VssAdministrator\.nuget\packages\ikvm\8.4.5-prerelease0001\buildTransitive\netstandard2.0\IKVM.Tasks.targets(31,9): warning : Copyright c 2023 Jeroen Frijters, Windward Studios, Jerome Haltom, Shad Storhaug [D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj::TargetFramework=net6.0]
C:\Users\VssAdministrator\.nuget\packages\ikvm\8.4.5-prerelease0001\buildTransitive\netstandard2.0\IKVM.Tasks.targets(31,9): warning : [D:\a\1\s\tests\ICU4N.Tests\ICU4N.Tests.csproj::TargetFramework=net6.0]
9 Warning(s)
0 Error(s)
That's the copyright message. Pretty sure those have been around for awhile. I removed the copyright message on the dev branch, but haven't done anything with it on release.
We've had a previous bug report about it, so I know it's been around for awhile.
8.4.5 has solved the problems here.