diff --git a/.github/workflows/IKVM.yml b/.github/workflows/IKVM.yml index 0f1b0e46c0..cf2b893cb9 100644 --- a/.github/workflows/IKVM.yml +++ b/.github/workflows/IKVM.yml @@ -404,8 +404,8 @@ jobs: - IKVM.ByteCode.Tests - IKVM.Tests - IKVM.Java.Tests - - IKVM.Tools.Importer.Tests - IKVM.Tools.Exporter.Tests + - IKVM.Tools.Importer.Tests - IKVM.Tools.Tests - IKVM.JTReg.TestAdapter.Tests - IKVM.OpenJDK.Tests?TestPartition=0 @@ -418,78 +418,44 @@ jobs: - IKVM.OpenJDK.Tests?TestPartition=7 tfm: - net461 - - netcoreapp3.1 - net6.0 - - net7.0 sys: - windows - linux exclude: - tfm: net461 sys: linux - - run: IKVM.Java.Tests - tfm: net6.0 - - run: IKVM.Tools.Exporter.Tests - tfm: net6.0 - - run: IKVM.Tools.Importer.Tests - tfm: net6.0 - - run: IKVM.OpenJDK.Tests?TestPartition=0 - tfm: net6.0 - - run: IKVM.OpenJDK.Tests?TestPartition=1 - tfm: net6.0 - - run: IKVM.OpenJDK.Tests?TestPartition=2 - tfm: net6.0 - - run: IKVM.OpenJDK.Tests?TestPartition=3 - tfm: net6.0 - - run: IKVM.OpenJDK.Tests?TestPartition=4 - tfm: net6.0 - - run: IKVM.OpenJDK.Tests?TestPartition=5 - tfm: net6.0 - - run: IKVM.OpenJDK.Tests?TestPartition=6 - tfm: net6.0 - - run: IKVM.OpenJDK.Tests?TestPartition=7 - tfm: net6.0 - - run: IKVM.Java.Tests - tfm: net7.0 - run: IKVM.Tools.Exporter.Tests - tfm: net7.0 + tfm: net461 - run: IKVM.Tools.Importer.Tests - tfm: net7.0 - - run: IKVM.OpenJDK.Tests?TestPartition=0 - tfm: net7.0 - - run: IKVM.OpenJDK.Tests?TestPartition=1 - tfm: net7.0 - - run: IKVM.OpenJDK.Tests?TestPartition=2 - tfm: net7.0 - - run: IKVM.OpenJDK.Tests?TestPartition=3 - tfm: net7.0 - - run: IKVM.OpenJDK.Tests?TestPartition=4 - tfm: net7.0 - - run: IKVM.OpenJDK.Tests?TestPartition=5 - tfm: net7.0 - - run: IKVM.OpenJDK.Tests?TestPartition=6 - tfm: net7.0 - - run: IKVM.OpenJDK.Tests?TestPartition=7 - tfm: net7.0 + tfm: net461 + - run: IKVM.Tools.Tests + tfm: net461 include: - - run: IKVM.MSBuild.Tasks.Tests - tfm: net472 + - run: IKVM.ByteCode.Tests + tfm: netcoreapp3.1 sys: windows - - run: IKVM.MSBuild.Tasks.Tests + - run: IKVM.ByteCode.Tests + tfm: netcoreapp3.1 + sys: linux + - run: IKVM.Java.Tests tfm: netcoreapp3.1 sys: windows + - run: IKVM.Java.Tests + tfm: netcoreapp3.1 + sys: linux + - run: IKVM.JTReg.TestAdapter.Tests + tfm: net7.0 + sys: windows + - run: IKVM.JTReg.TestAdapter.Tests + tfm: net7.0 + sys: linux - run: IKVM.MSBuild.Tasks.Tests - tfm: net6.0 + tfm: net472 sys: windows - run: IKVM.MSBuild.Tasks.Tests tfm: net7.0 sys: windows - - run: IKVM.MSBuild.Tasks.Tests - tfm: netcoreapp3.1 - sys: linux - - run: IKVM.MSBuild.Tasks.Tests - tfm: net6.0 - sys: linux - run: IKVM.MSBuild.Tasks.Tests tfm: net7.0 sys: linux @@ -505,6 +471,27 @@ jobs: - run: IKVM.NET.Sdk.Tests tfm: net7.0 sys: linux + - run: IKVM.Tests + tfm: net7.0 + sys: windows + - run: IKVM.Tests + tfm: net7.0 + sys: linux + - run: IKVM.Tools.Exporter.Tests + tfm: net472 + sys: windows + - run: IKVM.Tools.Importer.Tests + tfm: net472 + sys: windows + - run: IKVM.Tools.Tests + tfm: net472 + sys: windows + - run: IKVM.Tools.Tests + tfm: net7.0 + sys: windows + - run: IKVM.Tools.Tests + tfm: net7.0 + sys: linux name: Test (${{ matrix.run }}:${{ matrix.tfm }}:${{ matrix.sys }}) needs: - build-ikvm diff --git a/ext/helloworld/net461/HelloWorldDotNet.deps.json b/ext/helloworld/net461/HelloWorldDotNet.deps.json new file mode 100644 index 0000000000..635d425250 --- /dev/null +++ b/ext/helloworld/net461/HelloWorldDotNet.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v3.1", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v3.1": { + "HelloWorldDotNet/1.0.0": { + "runtime": { + "HelloWorldDotNet.dll": {} + } + } + } + }, + "libraries": { + "HelloWorldDotNet/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/ext/helloworld/net461/HelloWorldDotNet.dll b/ext/helloworld/net461/HelloWorldDotNet.dll new file mode 100644 index 0000000000..2b01849077 Binary files /dev/null and b/ext/helloworld/net461/HelloWorldDotNet.dll differ diff --git a/ext/helloworld/net6.0/HelloWorldDotNet.deps.json b/ext/helloworld/net6.0/HelloWorldDotNet.deps.json new file mode 100644 index 0000000000..635d425250 --- /dev/null +++ b/ext/helloworld/net6.0/HelloWorldDotNet.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v3.1", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v3.1": { + "HelloWorldDotNet/1.0.0": { + "runtime": { + "HelloWorldDotNet.dll": {} + } + } + } + }, + "libraries": { + "HelloWorldDotNet/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/ext/helloworld/net6.0/HelloWorldDotNet.dll b/ext/helloworld/net6.0/HelloWorldDotNet.dll new file mode 100644 index 0000000000..ad2363e73e Binary files /dev/null and b/ext/helloworld/net6.0/HelloWorldDotNet.dll differ diff --git a/ext/helloworld/netcoreapp3.1/HelloWorldDotNet.deps.json b/ext/helloworld/netcoreapp3.1/HelloWorldDotNet.deps.json new file mode 100644 index 0000000000..635d425250 --- /dev/null +++ b/ext/helloworld/netcoreapp3.1/HelloWorldDotNet.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v3.1", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v3.1": { + "HelloWorldDotNet/1.0.0": { + "runtime": { + "HelloWorldDotNet.dll": {} + } + } + } + }, + "libraries": { + "HelloWorldDotNet/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/ext/helloworld/netcoreapp3.1/HelloWorldDotNet.dll b/ext/helloworld/netcoreapp3.1/HelloWorldDotNet.dll new file mode 100644 index 0000000000..ad2363e73e Binary files /dev/null and b/ext/helloworld/netcoreapp3.1/HelloWorldDotNet.dll differ diff --git a/src/IKVM.ByteCode/msbuild.binlog b/src/IKVM.ByteCode/msbuild.binlog new file mode 100644 index 0000000000..7523629995 Binary files /dev/null and b/src/IKVM.ByteCode/msbuild.binlog differ diff --git a/src/IKVM.Image.JDK-bin/IKVM.Image.JDK-bin.csproj b/src/IKVM.Image.JDK-bin/IKVM.Image.JDK-bin.csproj index 3198ab5aa6..00c5b0fb50 100644 --- a/src/IKVM.Image.JDK-bin/IKVM.Image.JDK-bin.csproj +++ b/src/IKVM.Image.JDK-bin/IKVM.Image.JDK-bin.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) false diff --git a/src/IKVM.Image.JDK.runtime.linux-arm/IKVM.Image.JDK.runtime.linux-arm.csproj b/src/IKVM.Image.JDK.runtime.linux-arm/IKVM.Image.JDK.runtime.linux-arm.csproj index 51bd7c8412..27a396f3d2 100644 --- a/src/IKVM.Image.JDK.runtime.linux-arm/IKVM.Image.JDK.runtime.linux-arm.csproj +++ b/src/IKVM.Image.JDK.runtime.linux-arm/IKVM.Image.JDK.runtime.linux-arm.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JDK Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\linux-arm\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-arm - ikvm\netcoreapp3.1\linux-arm\bin + ikvm\net6.0\linux-arm\bin diff --git a/src/IKVM.Image.JDK.runtime.linux-arm/buildTransitive/IKVM.Image.JDK.runtime.linux-arm.props b/src/IKVM.Image.JDK.runtime.linux-arm/buildTransitive/IKVM.Image.JDK.runtime.linux-arm.props index 85982ab64f..6f67383808 100644 --- a/src/IKVM.Image.JDK.runtime.linux-arm/buildTransitive/IKVM.Image.JDK.runtime.linux-arm.props +++ b/src/IKVM.Image.JDK.runtime.linux-arm/buildTransitive/IKVM.Image.JDK.runtime.linux-arm.props @@ -9,8 +9,8 @@ linux-arm %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 + + net6.0 linux-arm %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JDK.runtime.linux-arm/lib/net6.0/_._ b/src/IKVM.Image.JDK.runtime.linux-arm/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JDK.runtime.linux-arm/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JDK.runtime.linux-arm64/IKVM.Image.JDK.runtime.linux-arm64.csproj b/src/IKVM.Image.JDK.runtime.linux-arm64/IKVM.Image.JDK.runtime.linux-arm64.csproj index e076c85813..befd38242e 100644 --- a/src/IKVM.Image.JDK.runtime.linux-arm64/IKVM.Image.JDK.runtime.linux-arm64.csproj +++ b/src/IKVM.Image.JDK.runtime.linux-arm64/IKVM.Image.JDK.runtime.linux-arm64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JDK Runtime Image @@ -20,13 +20,13 @@ - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-arm64 - ikvm\netcoreapp3.1\linux-arm64\bin + ikvm\net6.0\linux-arm64\bin - + TargetFramework=$(TargetFramework) RuntimeIdentifier=linux-arm64 diff --git a/src/IKVM.Image.JDK.runtime.linux-arm64/buildTransitive/IKVM.Image.JDK.runtime.linux-arm64.props b/src/IKVM.Image.JDK.runtime.linux-arm64/buildTransitive/IKVM.Image.JDK.runtime.linux-arm64.props index 7985dc4850..d0a13c9562 100644 --- a/src/IKVM.Image.JDK.runtime.linux-arm64/buildTransitive/IKVM.Image.JDK.runtime.linux-arm64.props +++ b/src/IKVM.Image.JDK.runtime.linux-arm64/buildTransitive/IKVM.Image.JDK.runtime.linux-arm64.props @@ -9,8 +9,8 @@ linux-arm64 %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 + + net6.0 linux-arm64 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JDK.runtime.linux-arm64/lib/net6.0/_._ b/src/IKVM.Image.JDK.runtime.linux-arm64/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JDK.runtime.linux-arm64/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JDK.runtime.linux-musl-arm/IKVM.Image.JDK.runtime.linux-musl-arm.csproj b/src/IKVM.Image.JDK.runtime.linux-musl-arm/IKVM.Image.JDK.runtime.linux-musl-arm.csproj index e8f79f909e..1d99f82cb7 100644 --- a/src/IKVM.Image.JDK.runtime.linux-musl-arm/IKVM.Image.JDK.runtime.linux-musl-arm.csproj +++ b/src/IKVM.Image.JDK.runtime.linux-musl-arm/IKVM.Image.JDK.runtime.linux-musl-arm.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JDK Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\linux-musl-arm\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-musl-arm - ikvm\netcoreapp3.1\linux-musl-arm\bin + ikvm\net6.0\linux-musl-arm\bin diff --git a/src/IKVM.Image.JDK.runtime.linux-musl-arm/buildTransitive/IKVM.Image.JDK.runtime.linux-musl-arm.props b/src/IKVM.Image.JDK.runtime.linux-musl-arm/buildTransitive/IKVM.Image.JDK.runtime.linux-musl-arm.props index aee3c6ee17..1259b9a3e8 100644 --- a/src/IKVM.Image.JDK.runtime.linux-musl-arm/buildTransitive/IKVM.Image.JDK.runtime.linux-musl-arm.props +++ b/src/IKVM.Image.JDK.runtime.linux-musl-arm/buildTransitive/IKVM.Image.JDK.runtime.linux-musl-arm.props @@ -9,8 +9,8 @@ linux-musl-arm %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 + + net6.0 linux-musl-arm %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JDK.runtime.linux-musl-arm/lib/net6.0/_._ b/src/IKVM.Image.JDK.runtime.linux-musl-arm/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JDK.runtime.linux-musl-arm/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JDK.runtime.linux-musl-arm64/IKVM.Image.JDK.runtime.linux-musl-arm64.csproj b/src/IKVM.Image.JDK.runtime.linux-musl-arm64/IKVM.Image.JDK.runtime.linux-musl-arm64.csproj index 3af5c86d13..5df0d1076b 100644 --- a/src/IKVM.Image.JDK.runtime.linux-musl-arm64/IKVM.Image.JDK.runtime.linux-musl-arm64.csproj +++ b/src/IKVM.Image.JDK.runtime.linux-musl-arm64/IKVM.Image.JDK.runtime.linux-musl-arm64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JDK Runtime Image @@ -20,13 +20,13 @@ - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-musl-arm64 - ikvm\netcoreapp3.1\linux-musl-arm64\bin + ikvm\net6.0\linux-musl-arm64\bin - + TargetFramework=$(TargetFramework) RuntimeIdentifier=linux-musl-arm64 diff --git a/src/IKVM.Image.JDK.runtime.linux-musl-arm64/buildTransitive/IKVM.Image.JDK.runtime.linux-musl-arm64.props b/src/IKVM.Image.JDK.runtime.linux-musl-arm64/buildTransitive/IKVM.Image.JDK.runtime.linux-musl-arm64.props index 978f9bbd6e..593e90ac6d 100644 --- a/src/IKVM.Image.JDK.runtime.linux-musl-arm64/buildTransitive/IKVM.Image.JDK.runtime.linux-musl-arm64.props +++ b/src/IKVM.Image.JDK.runtime.linux-musl-arm64/buildTransitive/IKVM.Image.JDK.runtime.linux-musl-arm64.props @@ -4,13 +4,8 @@ - - net461 - linux-musl-arm64 - %(RecursiveDir)%(FileName)%(Extension) - - - netcoreapp3.1 + + net6.0 linux-musl-arm64 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JDK.runtime.linux-musl-arm64/lib/net6.0/_._ b/src/IKVM.Image.JDK.runtime.linux-musl-arm64/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JDK.runtime.linux-musl-arm64/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JDK.runtime.linux-musl-x64/IKVM.Image.JDK.runtime.linux-musl-x64.csproj b/src/IKVM.Image.JDK.runtime.linux-musl-x64/IKVM.Image.JDK.runtime.linux-musl-x64.csproj index 276c0d653d..617f9895a8 100644 --- a/src/IKVM.Image.JDK.runtime.linux-musl-x64/IKVM.Image.JDK.runtime.linux-musl-x64.csproj +++ b/src/IKVM.Image.JDK.runtime.linux-musl-x64/IKVM.Image.JDK.runtime.linux-musl-x64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JDK Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\linux-musl-x64\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-musl-x64 - ikvm\netcoreapp3.1\linux-musl-x64\bin + ikvm\net6.0\linux-musl-x64\bin diff --git a/src/IKVM.Image.JDK.runtime.linux-musl-x64/buildTransitive/IKVM.Image.JDK.runtime.linux-musl-x64.props b/src/IKVM.Image.JDK.runtime.linux-musl-x64/buildTransitive/IKVM.Image.JDK.runtime.linux-musl-x64.props index b5f6714fe8..2147f9d5d9 100644 --- a/src/IKVM.Image.JDK.runtime.linux-musl-x64/buildTransitive/IKVM.Image.JDK.runtime.linux-musl-x64.props +++ b/src/IKVM.Image.JDK.runtime.linux-musl-x64/buildTransitive/IKVM.Image.JDK.runtime.linux-musl-x64.props @@ -9,8 +9,8 @@ linux-musl-x64 %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 + + net6.0 linux-musl-x64 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JDK.runtime.linux-musl-x64/lib/net6.0/_._ b/src/IKVM.Image.JDK.runtime.linux-musl-x64/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JDK.runtime.linux-musl-x64/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JDK.runtime.linux-x64/IKVM.Image.JDK.runtime.linux-x64.csproj b/src/IKVM.Image.JDK.runtime.linux-x64/IKVM.Image.JDK.runtime.linux-x64.csproj index 330c7952aa..a426d2165f 100644 --- a/src/IKVM.Image.JDK.runtime.linux-x64/IKVM.Image.JDK.runtime.linux-x64.csproj +++ b/src/IKVM.Image.JDK.runtime.linux-x64/IKVM.Image.JDK.runtime.linux-x64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JDK Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\linux-x64\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-x64 - ikvm\netcoreapp3.1\linux-x64\bin + ikvm\net6.0\linux-x64\bin diff --git a/src/IKVM.Image.JDK.runtime.linux-x64/buildTransitive/IKVM.Image.JDK.runtime.linux-x64.props b/src/IKVM.Image.JDK.runtime.linux-x64/buildTransitive/IKVM.Image.JDK.runtime.linux-x64.props index 2073bfd9a5..a3ff8653ac 100644 --- a/src/IKVM.Image.JDK.runtime.linux-x64/buildTransitive/IKVM.Image.JDK.runtime.linux-x64.props +++ b/src/IKVM.Image.JDK.runtime.linux-x64/buildTransitive/IKVM.Image.JDK.runtime.linux-x64.props @@ -9,8 +9,8 @@ linux-x64 %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 + + net6.0 linux-x64 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JDK.runtime.linux-x64/lib/net6.0/_._ b/src/IKVM.Image.JDK.runtime.linux-x64/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JDK.runtime.linux-x64/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JDK.runtime.osx-x64/IKVM.Image.JDK.runtime.osx-x64.csproj b/src/IKVM.Image.JDK.runtime.osx-x64/IKVM.Image.JDK.runtime.osx-x64.csproj index f265df39d1..c830d4fe20 100644 --- a/src/IKVM.Image.JDK.runtime.osx-x64/IKVM.Image.JDK.runtime.osx-x64.csproj +++ b/src/IKVM.Image.JDK.runtime.osx-x64/IKVM.Image.JDK.runtime.osx-x64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JDK Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\osx-x64\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=osx-x64 - ikvm\netcoreapp3.1\osx-x64\bin + ikvm\net6.0\osx-x64\bin diff --git a/src/IKVM.Image.JDK.runtime.osx-x64/buildTransitive/IKVM.Image.JDK.runtime.osx-x64.props b/src/IKVM.Image.JDK.runtime.osx-x64/buildTransitive/IKVM.Image.JDK.runtime.osx-x64.props index 0f21af62db..59cec7c74f 100644 --- a/src/IKVM.Image.JDK.runtime.osx-x64/buildTransitive/IKVM.Image.JDK.runtime.osx-x64.props +++ b/src/IKVM.Image.JDK.runtime.osx-x64/buildTransitive/IKVM.Image.JDK.runtime.osx-x64.props @@ -4,8 +4,13 @@ - - netcoreapp3.1 + + net461 + osx-x64 + %(RecursiveDir)%(FileName)%(Extension) + + + net6.0 osx-x64 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JDK.runtime.osx-x64/lib/net6.0/_._ b/src/IKVM.Image.JDK.runtime.osx-x64/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JDK.runtime.osx-x64/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JDK.runtime.win7-x64/IKVM.Image.JDK.runtime.win7-x64.csproj b/src/IKVM.Image.JDK.runtime.win7-x64/IKVM.Image.JDK.runtime.win7-x64.csproj index 360cf6f69b..767e3514ba 100644 --- a/src/IKVM.Image.JDK.runtime.win7-x64/IKVM.Image.JDK.runtime.win7-x64.csproj +++ b/src/IKVM.Image.JDK.runtime.win7-x64/IKVM.Image.JDK.runtime.win7-x64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JDK Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\win7-x64\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=win7-x64 - ikvm\netcoreapp3.1\win7-x64\bin + ikvm\net6.0\win7-x64\bin diff --git a/src/IKVM.Image.JDK.runtime.win7-x64/buildTransitive/IKVM.Image.JDK.runtime.win7-x64.props b/src/IKVM.Image.JDK.runtime.win7-x64/buildTransitive/IKVM.Image.JDK.runtime.win7-x64.props index e3eb8346aa..cc194a8afd 100644 --- a/src/IKVM.Image.JDK.runtime.win7-x64/buildTransitive/IKVM.Image.JDK.runtime.win7-x64.props +++ b/src/IKVM.Image.JDK.runtime.win7-x64/buildTransitive/IKVM.Image.JDK.runtime.win7-x64.props @@ -9,8 +9,8 @@ win7-x64 %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 + + net6.0 win7-x64 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JDK.runtime.win7-x64/lib/net6.0/_._ b/src/IKVM.Image.JDK.runtime.win7-x64/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JDK.runtime.win7-x64/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JDK.runtime.win7-x86/IKVM.Image.JDK.runtime.win7-x86.csproj b/src/IKVM.Image.JDK.runtime.win7-x86/IKVM.Image.JDK.runtime.win7-x86.csproj index 9079784741..127ca9aee0 100644 --- a/src/IKVM.Image.JDK.runtime.win7-x86/IKVM.Image.JDK.runtime.win7-x86.csproj +++ b/src/IKVM.Image.JDK.runtime.win7-x86/IKVM.Image.JDK.runtime.win7-x86.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JDK Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\win7-x86\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=win7-x86 - ikvm\netcoreapp3.1\win7-x86\bin + ikvm\net6.0\win7-x86\bin diff --git a/src/IKVM.Image.JDK.runtime.win7-x86/buildTransitive/IKVM.Image.JDK.runtime.win7-x86.props b/src/IKVM.Image.JDK.runtime.win7-x86/buildTransitive/IKVM.Image.JDK.runtime.win7-x86.props index 32f8839e12..0e794e01af 100644 --- a/src/IKVM.Image.JDK.runtime.win7-x86/buildTransitive/IKVM.Image.JDK.runtime.win7-x86.props +++ b/src/IKVM.Image.JDK.runtime.win7-x86/buildTransitive/IKVM.Image.JDK.runtime.win7-x86.props @@ -9,8 +9,8 @@ win7-x86 %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 + + net6.0 win7-x86 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JDK.runtime.win7-x86/lib/net6.0/_._ b/src/IKVM.Image.JDK.runtime.win7-x86/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JDK.runtime.win7-x86/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JDK.runtime.win81-arm/IKVM.Image.JDK.runtime.win81-arm.csproj b/src/IKVM.Image.JDK.runtime.win81-arm/IKVM.Image.JDK.runtime.win81-arm.csproj index 03544536c4..49dfee84be 100644 --- a/src/IKVM.Image.JDK.runtime.win81-arm/IKVM.Image.JDK.runtime.win81-arm.csproj +++ b/src/IKVM.Image.JDK.runtime.win81-arm/IKVM.Image.JDK.runtime.win81-arm.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JDK Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\win81-arm\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=win81-arm - ikvm\netcoreapp3.1\win81-arm\bin + ikvm\net6.0\win81-arm\bin diff --git a/src/IKVM.Image.JDK.runtime.win81-arm/buildTransitive/IKVM.Image.JDK.runtime.win81-arm.props b/src/IKVM.Image.JDK.runtime.win81-arm/buildTransitive/IKVM.Image.JDK.runtime.win81-arm.props index e2fced6b83..ef69536500 100644 --- a/src/IKVM.Image.JDK.runtime.win81-arm/buildTransitive/IKVM.Image.JDK.runtime.win81-arm.props +++ b/src/IKVM.Image.JDK.runtime.win81-arm/buildTransitive/IKVM.Image.JDK.runtime.win81-arm.props @@ -9,8 +9,8 @@ win81-arm %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 + + net6.0 win81-arm %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JDK.runtime.win81-arm/lib/net6.0/_._ b/src/IKVM.Image.JDK.runtime.win81-arm/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JDK.runtime.win81-arm/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JDK/IKVM.Image.JDK.csproj b/src/IKVM.Image.JDK/IKVM.Image.JDK.csproj index d7fb84eee4..abe3050395 100644 --- a/src/IKVM.Image.JDK/IKVM.Image.JDK.csproj +++ b/src/IKVM.Image.JDK/IKVM.Image.JDK.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JDK Runtime Image diff --git a/src/IKVM.Image.JDK/lib/net6.0/_._ b/src/IKVM.Image.JDK/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JDK/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JRE-bin/IKVM.Image.JRE-bin.csproj b/src/IKVM.Image.JRE-bin/IKVM.Image.JRE-bin.csproj index 52a0de8246..fa5fd45569 100644 --- a/src/IKVM.Image.JRE-bin/IKVM.Image.JRE-bin.csproj +++ b/src/IKVM.Image.JRE-bin/IKVM.Image.JRE-bin.csproj @@ -1,8 +1,6 @@  - - - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) false diff --git a/src/IKVM.Image.JRE.runtime.linux-arm/IKVM.Image.JRE.runtime.linux-arm.csproj b/src/IKVM.Image.JRE.runtime.linux-arm/IKVM.Image.JRE.runtime.linux-arm.csproj index fd09328820..c6e47a0c3b 100644 --- a/src/IKVM.Image.JRE.runtime.linux-arm/IKVM.Image.JRE.runtime.linux-arm.csproj +++ b/src/IKVM.Image.JRE.runtime.linux-arm/IKVM.Image.JRE.runtime.linux-arm.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JRE Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\linux-arm\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-arm - ikvm\netcoreapp3.1\linux-arm\bin + ikvm\net6.0\linux-arm\bin diff --git a/src/IKVM.Image.JRE.runtime.linux-arm/buildTransitive/IKVM.Image.JRE.runtime.linux-arm.props b/src/IKVM.Image.JRE.runtime.linux-arm/buildTransitive/IKVM.Image.JRE.runtime.linux-arm.props index c2b47cc6c7..6f67383808 100644 --- a/src/IKVM.Image.JRE.runtime.linux-arm/buildTransitive/IKVM.Image.JRE.runtime.linux-arm.props +++ b/src/IKVM.Image.JRE.runtime.linux-arm/buildTransitive/IKVM.Image.JRE.runtime.linux-arm.props @@ -9,13 +9,8 @@ linux-arm %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 - linux-arm - %(RecursiveDir)%(FileName)%(Extension) - - - any + + net6.0 linux-arm %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JRE.runtime.linux-arm/lib/net6.0/_._ b/src/IKVM.Image.JRE.runtime.linux-arm/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JRE.runtime.linux-arm/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JRE.runtime.linux-arm64/IKVM.Image.JRE.runtime.linux-arm64.csproj b/src/IKVM.Image.JRE.runtime.linux-arm64/IKVM.Image.JRE.runtime.linux-arm64.csproj index 43fe2201a8..fe6c483591 100644 --- a/src/IKVM.Image.JRE.runtime.linux-arm64/IKVM.Image.JRE.runtime.linux-arm64.csproj +++ b/src/IKVM.Image.JRE.runtime.linux-arm64/IKVM.Image.JRE.runtime.linux-arm64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JRE Runtime Image @@ -20,13 +20,13 @@ - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-arm64 - ikvm\netcoreapp3.1\linux-arm64\bin + ikvm\net6.0\linux-arm64\bin - + TargetFramework=$(TargetFramework) RuntimeIdentifier=linux-arm64 diff --git a/src/IKVM.Image.JRE.runtime.linux-arm64/buildTransitive/IKVM.Image.JRE.runtime.linux-arm64.props b/src/IKVM.Image.JRE.runtime.linux-arm64/buildTransitive/IKVM.Image.JRE.runtime.linux-arm64.props index 00d9f68f95..d0a13c9562 100644 --- a/src/IKVM.Image.JRE.runtime.linux-arm64/buildTransitive/IKVM.Image.JRE.runtime.linux-arm64.props +++ b/src/IKVM.Image.JRE.runtime.linux-arm64/buildTransitive/IKVM.Image.JRE.runtime.linux-arm64.props @@ -9,13 +9,8 @@ linux-arm64 %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 - linux-arm64 - %(RecursiveDir)%(FileName)%(Extension) - - - any + + net6.0 linux-arm64 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JRE.runtime.linux-arm64/lib/net6.0/_._ b/src/IKVM.Image.JRE.runtime.linux-arm64/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JRE.runtime.linux-arm64/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JRE.runtime.linux-musl-arm/IKVM.Image.JRE.runtime.linux-musl-arm.csproj b/src/IKVM.Image.JRE.runtime.linux-musl-arm/IKVM.Image.JRE.runtime.linux-musl-arm.csproj index 3a2e912b14..07089cca9b 100644 --- a/src/IKVM.Image.JRE.runtime.linux-musl-arm/IKVM.Image.JRE.runtime.linux-musl-arm.csproj +++ b/src/IKVM.Image.JRE.runtime.linux-musl-arm/IKVM.Image.JRE.runtime.linux-musl-arm.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JRE Runtime Image @@ -20,14 +20,9 @@ - TargetFramework=net461 + TargetFramework=net6.0 RuntimeIdentifier=linux-musl-arm - ikvm\net461\linux-musl-arm\bin - - - TargetFramework=netcoreapp3.1 - RuntimeIdentifier=linux-musl-arm - ikvm\netcoreapp3.1\linux-musl-arm\bin + ikvm\net6.0\linux-musl-arm\bin diff --git a/src/IKVM.Image.JRE.runtime.linux-musl-arm/buildTransitive/IKVM.Image.JRE.runtime.linux-musl-arm.props b/src/IKVM.Image.JRE.runtime.linux-musl-arm/buildTransitive/IKVM.Image.JRE.runtime.linux-musl-arm.props index d550d5f2f7..1259b9a3e8 100644 --- a/src/IKVM.Image.JRE.runtime.linux-musl-arm/buildTransitive/IKVM.Image.JRE.runtime.linux-musl-arm.props +++ b/src/IKVM.Image.JRE.runtime.linux-musl-arm/buildTransitive/IKVM.Image.JRE.runtime.linux-musl-arm.props @@ -9,13 +9,8 @@ linux-musl-arm %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 - linux-musl-arm - %(RecursiveDir)%(FileName)%(Extension) - - - any + + net6.0 linux-musl-arm %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JRE.runtime.linux-musl-arm/lib/net6.0/_._ b/src/IKVM.Image.JRE.runtime.linux-musl-arm/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JRE.runtime.linux-musl-arm/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JRE.runtime.linux-musl-arm64/IKVM.Image.JRE.runtime.linux-musl-arm64.csproj b/src/IKVM.Image.JRE.runtime.linux-musl-arm64/IKVM.Image.JRE.runtime.linux-musl-arm64.csproj index d7122c6449..2949e2cc1a 100644 --- a/src/IKVM.Image.JRE.runtime.linux-musl-arm64/IKVM.Image.JRE.runtime.linux-musl-arm64.csproj +++ b/src/IKVM.Image.JRE.runtime.linux-musl-arm64/IKVM.Image.JRE.runtime.linux-musl-arm64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JRE Runtime Image @@ -20,13 +20,13 @@ - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-musl-arm64 - ikvm\netcoreapp3.1\linux-musl-arm64\bin + ikvm\net6.0\linux-musl-arm64\bin - + TargetFramework=$(TargetFramework) RuntimeIdentifier=linux-musl-arm64 diff --git a/src/IKVM.Image.JRE.runtime.linux-musl-arm64/buildTransitive/IKVM.Image.JRE.runtime.linux-musl-arm64.props b/src/IKVM.Image.JRE.runtime.linux-musl-arm64/buildTransitive/IKVM.Image.JRE.runtime.linux-musl-arm64.props index f557547d14..593e90ac6d 100644 --- a/src/IKVM.Image.JRE.runtime.linux-musl-arm64/buildTransitive/IKVM.Image.JRE.runtime.linux-musl-arm64.props +++ b/src/IKVM.Image.JRE.runtime.linux-musl-arm64/buildTransitive/IKVM.Image.JRE.runtime.linux-musl-arm64.props @@ -4,18 +4,8 @@ - - net461 - linux-musl-arm64 - %(RecursiveDir)%(FileName)%(Extension) - - - netcoreapp3.1 - linux-musl-arm64 - %(RecursiveDir)%(FileName)%(Extension) - - - any + + net6.0 linux-musl-arm64 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JRE.runtime.linux-musl-arm64/lib/net6.0/_._ b/src/IKVM.Image.JRE.runtime.linux-musl-arm64/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JRE.runtime.linux-musl-arm64/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JRE.runtime.linux-musl-x64/IKVM.Image.JRE.runtime.linux-musl-x64.csproj b/src/IKVM.Image.JRE.runtime.linux-musl-x64/IKVM.Image.JRE.runtime.linux-musl-x64.csproj index a214bfc8d4..4b6f07f79b 100644 --- a/src/IKVM.Image.JRE.runtime.linux-musl-x64/IKVM.Image.JRE.runtime.linux-musl-x64.csproj +++ b/src/IKVM.Image.JRE.runtime.linux-musl-x64/IKVM.Image.JRE.runtime.linux-musl-x64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JRE Runtime Image @@ -20,14 +20,9 @@ - TargetFramework=net461 + TargetFramework=net6.0 RuntimeIdentifier=linux-musl-x64 - ikvm\net461\linux-musl-x64\bin - - - TargetFramework=netcoreapp3.1 - RuntimeIdentifier=linux-musl-x64 - ikvm\netcoreapp3.1\linux-musl-x64\bin + ikvm\net6.0\linux-musl-x64\bin diff --git a/src/IKVM.Image.JRE.runtime.linux-musl-x64/buildTransitive/IKVM.Image.JRE.runtime.linux-musl-x64.props b/src/IKVM.Image.JRE.runtime.linux-musl-x64/buildTransitive/IKVM.Image.JRE.runtime.linux-musl-x64.props index 4d7b2aba9a..2147f9d5d9 100644 --- a/src/IKVM.Image.JRE.runtime.linux-musl-x64/buildTransitive/IKVM.Image.JRE.runtime.linux-musl-x64.props +++ b/src/IKVM.Image.JRE.runtime.linux-musl-x64/buildTransitive/IKVM.Image.JRE.runtime.linux-musl-x64.props @@ -9,13 +9,8 @@ linux-musl-x64 %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 - linux-musl-x64 - %(RecursiveDir)%(FileName)%(Extension) - - - any + + net6.0 linux-musl-x64 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JRE.runtime.linux-musl-x64/lib/net6.0/_._ b/src/IKVM.Image.JRE.runtime.linux-musl-x64/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JRE.runtime.linux-musl-x64/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JRE.runtime.linux-x64/IKVM.Image.JRE.runtime.linux-x64.csproj b/src/IKVM.Image.JRE.runtime.linux-x64/IKVM.Image.JRE.runtime.linux-x64.csproj index 6196888061..0b1a695c97 100644 --- a/src/IKVM.Image.JRE.runtime.linux-x64/IKVM.Image.JRE.runtime.linux-x64.csproj +++ b/src/IKVM.Image.JRE.runtime.linux-x64/IKVM.Image.JRE.runtime.linux-x64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JRE Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\linux-x64\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-x64 - ikvm\netcoreapp3.1\linux-x64\bin + ikvm\net6.0\linux-x64\bin diff --git a/src/IKVM.Image.JRE.runtime.linux-x64/buildTransitive/IKVM.Image.JRE.runtime.linux-x64.props b/src/IKVM.Image.JRE.runtime.linux-x64/buildTransitive/IKVM.Image.JRE.runtime.linux-x64.props index d22980952b..a3ff8653ac 100644 --- a/src/IKVM.Image.JRE.runtime.linux-x64/buildTransitive/IKVM.Image.JRE.runtime.linux-x64.props +++ b/src/IKVM.Image.JRE.runtime.linux-x64/buildTransitive/IKVM.Image.JRE.runtime.linux-x64.props @@ -9,13 +9,8 @@ linux-x64 %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 - linux-x64 - %(RecursiveDir)%(FileName)%(Extension) - - - any + + net6.0 linux-x64 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JRE.runtime.linux-x64/lib/net6.0/_._ b/src/IKVM.Image.JRE.runtime.linux-x64/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JRE.runtime.linux-x64/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JRE.runtime.osx-x64/IKVM.Image.JRE.runtime.osx-x64.csproj b/src/IKVM.Image.JRE.runtime.osx-x64/IKVM.Image.JRE.runtime.osx-x64.csproj index f7d89dec83..dd04883ab9 100644 --- a/src/IKVM.Image.JRE.runtime.osx-x64/IKVM.Image.JRE.runtime.osx-x64.csproj +++ b/src/IKVM.Image.JRE.runtime.osx-x64/IKVM.Image.JRE.runtime.osx-x64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JRE Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\osx-x64\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=osx-x64 - ikvm\netcoreapp3.1\osx-x64\bin + ikvm\net6.0\osx-x64\bin diff --git a/src/IKVM.Image.JRE.runtime.osx-x64/buildTransitive/IKVM.Image.JRE.runtime.osx-x64.props b/src/IKVM.Image.JRE.runtime.osx-x64/buildTransitive/IKVM.Image.JRE.runtime.osx-x64.props index d9d406cc01..59cec7c74f 100644 --- a/src/IKVM.Image.JRE.runtime.osx-x64/buildTransitive/IKVM.Image.JRE.runtime.osx-x64.props +++ b/src/IKVM.Image.JRE.runtime.osx-x64/buildTransitive/IKVM.Image.JRE.runtime.osx-x64.props @@ -4,13 +4,13 @@ - - netcoreapp3.1 + + net461 osx-x64 %(RecursiveDir)%(FileName)%(Extension) - - any + + net6.0 osx-x64 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JRE.runtime.osx-x64/lib/net6.0/_._ b/src/IKVM.Image.JRE.runtime.osx-x64/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JRE.runtime.osx-x64/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JRE.runtime.win7-x64/IKVM.Image.JRE.runtime.win7-x64.csproj b/src/IKVM.Image.JRE.runtime.win7-x64/IKVM.Image.JRE.runtime.win7-x64.csproj index ccc4d764cf..1c13d46d51 100644 --- a/src/IKVM.Image.JRE.runtime.win7-x64/IKVM.Image.JRE.runtime.win7-x64.csproj +++ b/src/IKVM.Image.JRE.runtime.win7-x64/IKVM.Image.JRE.runtime.win7-x64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JRE Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\win7-x64\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=win7-x64 - ikvm\netcoreapp3.1\win7-x64\bin + ikvm\net6.0\win7-x64\bin diff --git a/src/IKVM.Image.JRE.runtime.win7-x64/buildTransitive/IKVM.Image.JRE.runtime.win7-x64.props b/src/IKVM.Image.JRE.runtime.win7-x64/buildTransitive/IKVM.Image.JRE.runtime.win7-x64.props index dd96c2e270..cc194a8afd 100644 --- a/src/IKVM.Image.JRE.runtime.win7-x64/buildTransitive/IKVM.Image.JRE.runtime.win7-x64.props +++ b/src/IKVM.Image.JRE.runtime.win7-x64/buildTransitive/IKVM.Image.JRE.runtime.win7-x64.props @@ -9,13 +9,8 @@ win7-x64 %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 - win7-x64 - %(RecursiveDir)%(FileName)%(Extension) - - - any + + net6.0 win7-x64 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JRE.runtime.win7-x64/lib/net6.0/_._ b/src/IKVM.Image.JRE.runtime.win7-x64/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JRE.runtime.win7-x64/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JRE.runtime.win7-x86/IKVM.Image.JRE.runtime.win7-x86.csproj b/src/IKVM.Image.JRE.runtime.win7-x86/IKVM.Image.JRE.runtime.win7-x86.csproj index 22d4089283..63abca0a47 100644 --- a/src/IKVM.Image.JRE.runtime.win7-x86/IKVM.Image.JRE.runtime.win7-x86.csproj +++ b/src/IKVM.Image.JRE.runtime.win7-x86/IKVM.Image.JRE.runtime.win7-x86.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JRE Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\win7-x86\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=win7-x86 - ikvm\netcoreapp3.1\win7-x86\bin + ikvm\net6.0\win7-x86\bin diff --git a/src/IKVM.Image.JRE.runtime.win7-x86/buildTransitive/IKVM.Image.JRE.runtime.win7-x86.props b/src/IKVM.Image.JRE.runtime.win7-x86/buildTransitive/IKVM.Image.JRE.runtime.win7-x86.props index 039ccd9ce9..0e794e01af 100644 --- a/src/IKVM.Image.JRE.runtime.win7-x86/buildTransitive/IKVM.Image.JRE.runtime.win7-x86.props +++ b/src/IKVM.Image.JRE.runtime.win7-x86/buildTransitive/IKVM.Image.JRE.runtime.win7-x86.props @@ -9,13 +9,8 @@ win7-x86 %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 - win7-x86 - %(RecursiveDir)%(FileName)%(Extension) - - - any + + net6.0 win7-x86 %(RecursiveDir)%(FileName)%(Extension) diff --git a/src/IKVM.Image.JRE.runtime.win7-x86/lib/net6.0/_._ b/src/IKVM.Image.JRE.runtime.win7-x86/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JRE.runtime.win7-x86/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JRE.runtime.win81-arm/IKVM.Image.JRE.runtime.win81-arm.csproj b/src/IKVM.Image.JRE.runtime.win81-arm/IKVM.Image.JRE.runtime.win81-arm.csproj index 6c44f13bbf..f3a3c0e693 100644 --- a/src/IKVM.Image.JRE.runtime.win81-arm/IKVM.Image.JRE.runtime.win81-arm.csproj +++ b/src/IKVM.Image.JRE.runtime.win81-arm/IKVM.Image.JRE.runtime.win81-arm.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JRE Runtime Image @@ -25,9 +25,9 @@ ikvm\net461\win81-arm\bin - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=win81-arm - ikvm\netcoreapp3.1\win81-arm\bin + ikvm\net6.0\win81-arm\bin diff --git a/src/IKVM.Image.JRE.runtime.win81-arm/buildTransitive/IKVM.Image.JRE.runtime.win81-arm.props b/src/IKVM.Image.JRE.runtime.win81-arm/buildTransitive/IKVM.Image.JRE.runtime.win81-arm.props index b60f9e4a37..2638012178 100644 --- a/src/IKVM.Image.JRE.runtime.win81-arm/buildTransitive/IKVM.Image.JRE.runtime.win81-arm.props +++ b/src/IKVM.Image.JRE.runtime.win81-arm/buildTransitive/IKVM.Image.JRE.runtime.win81-arm.props @@ -9,16 +9,11 @@ win81-arm %(RecursiveDir)%(FileName)%(Extension) - - netcoreapp3.1 + + net6.0 win81-arm %(RecursiveDir)%(FileName)%(Extension) - - any - win81-arm - %(RecursiveDir)%(FileName)%(Extension) - diff --git a/src/IKVM.Image.JRE.runtime.win81-arm/lib/net6.0/_._ b/src/IKVM.Image.JRE.runtime.win81-arm/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JRE.runtime.win81-arm/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image.JRE/IKVM.Image.JRE.csproj b/src/IKVM.Image.JRE/IKVM.Image.JRE.csproj index fc07dc8615..9cc7973a06 100644 --- a/src/IKVM.Image.JRE/IKVM.Image.JRE.csproj +++ b/src/IKVM.Image.JRE/IKVM.Image.JRE.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 LICENSE.md README.md IKVM JRE Runtime Image diff --git a/src/IKVM.Image.JRE/lib/net6.0/_._ b/src/IKVM.Image.JRE/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image.JRE/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.Image/IKVM.Image.csproj b/src/IKVM.Image/IKVM.Image.csproj index ef40f4ba1c..ca1e3d3a37 100644 --- a/src/IKVM.Image/IKVM.Image.csproj +++ b/src/IKVM.Image/IKVM.Image.csproj @@ -3,7 +3,7 @@ - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 LICENSE.md README.md IKVM Runtime Image diff --git a/src/IKVM.Image/buildTransitive/IKVM.Image.targets b/src/IKVM.Image/buildTransitive/IKVM.Image.targets index 7299155f8d..10b9ea1d17 100644 --- a/src/IKVM.Image/buildTransitive/IKVM.Image.targets +++ b/src/IKVM.Image/buildTransitive/IKVM.Image.targets @@ -51,6 +51,11 @@ <_IkvmImageTargetFramework>netcoreapp3.1 + + + <_IkvmImageTargetFramework>net6.0 + + diff --git a/src/IKVM.Image/lib/net6.0/_._ b/src/IKVM.Image/lib/net6.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.Image/lib/net6.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.JTReg.TestAdapter.Core/IKVM.JTReg.TestAdapter.Core.csproj b/src/IKVM.JTReg.TestAdapter.Core/IKVM.JTReg.TestAdapter.Core.csproj index 6e6f08b69d..c76caec843 100644 --- a/src/IKVM.JTReg.TestAdapter.Core/IKVM.JTReg.TestAdapter.Core.csproj +++ b/src/IKVM.JTReg.TestAdapter.Core/IKVM.JTReg.TestAdapter.Core.csproj @@ -5,7 +5,7 @@ - net461;netcoreapp3.1 + net461;net6.0 false true true diff --git a/src/IKVM.JTReg.TestAdapter.Tests/IKVM.JTReg.TestAdapter.Tests.csproj b/src/IKVM.JTReg.TestAdapter.Tests/IKVM.JTReg.TestAdapter.Tests.csproj index 94f5e641d3..b7b4a62f32 100644 --- a/src/IKVM.JTReg.TestAdapter.Tests/IKVM.JTReg.TestAdapter.Tests.csproj +++ b/src/IKVM.JTReg.TestAdapter.Tests/IKVM.JTReg.TestAdapter.Tests.csproj @@ -5,7 +5,7 @@ - net461;netcoreapp3.1;net6.0;net7.0 + net461;net6.0;net7.0 false diff --git a/src/IKVM.JTReg.TestAdapter/IKVM.JTReg.TestAdapter.csproj b/src/IKVM.JTReg.TestAdapter/IKVM.JTReg.TestAdapter.csproj index 35a9fd600e..ff322140a9 100644 --- a/src/IKVM.JTReg.TestAdapter/IKVM.JTReg.TestAdapter.csproj +++ b/src/IKVM.JTReg.TestAdapter/IKVM.JTReg.TestAdapter.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0 false diff --git a/src/IKVM.Java-ref/IKVM.Java-ref.csproj b/src/IKVM.Java-ref/IKVM.Java-ref.csproj index 80863cc681..291624dc9d 100644 --- a/src/IKVM.Java-ref/IKVM.Java-ref.csproj +++ b/src/IKVM.Java-ref/IKVM.Java-ref.csproj @@ -1,7 +1,7 @@  IKVM.Java-ref - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 IKVM.Java true diff --git a/src/IKVM.Java.Extensions/IKVM.Java.Extensions.csproj b/src/IKVM.Java.Extensions/IKVM.Java.Extensions.csproj index ede6ccc882..9aa61eea39 100644 --- a/src/IKVM.Java.Extensions/IKVM.Java.Extensions.csproj +++ b/src/IKVM.Java.Extensions/IKVM.Java.Extensions.csproj @@ -1,7 +1,7 @@ - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 diff --git a/src/IKVM.Java.Tests/IKVM.Java.Tests.msbuildproj b/src/IKVM.Java.Tests/IKVM.Java.Tests.msbuildproj index a5c55c29d9..0846e9ce42 100644 --- a/src/IKVM.Java.Tests/IKVM.Java.Tests.msbuildproj +++ b/src/IKVM.Java.Tests/IKVM.Java.Tests.msbuildproj @@ -4,7 +4,7 @@ - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 diff --git a/src/IKVM.Java/IKVM.Java.msbuildproj b/src/IKVM.Java/IKVM.Java.msbuildproj index 1ba300d0d5..f77fc3ffbf 100644 --- a/src/IKVM.Java/IKVM.Java.msbuildproj +++ b/src/IKVM.Java/IKVM.Java.msbuildproj @@ -4,7 +4,7 @@ - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 true diff --git a/src/IKVM.MSBuild.Tasks.Tests/IKVM.MSBuild.Tasks.Tests.csproj b/src/IKVM.MSBuild.Tasks.Tests/IKVM.MSBuild.Tasks.Tests.csproj index 06318bc513..c464fc0258 100644 --- a/src/IKVM.MSBuild.Tasks.Tests/IKVM.MSBuild.Tasks.Tests.csproj +++ b/src/IKVM.MSBuild.Tasks.Tests/IKVM.MSBuild.Tasks.Tests.csproj @@ -1,6 +1,7 @@  - net472;netcoreapp3.1;net6.0;net7.0 + net472;net6.0;net7.0 + true @@ -29,24 +30,19 @@ - TargetFramework=net461 - - ikvmc\net461\any - - - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=win7-x64 - ikvmc\netcoreapp3.1\win7-x64 + ikvmc\net6.0\win7-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-x64 - ikvmc\netcoreapp3.1\linux-x64 + ikvmc\net6.0\linux-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=osx-x64 - ikvmc\netcoreapp3.1\osx-x64 + ikvmc\net6.0\osx-x64 diff --git a/src/IKVM.MSBuild.Tasks/IKVM.MSBuild.Tasks.csproj b/src/IKVM.MSBuild.Tasks/IKVM.MSBuild.Tasks.csproj index f5ad65eaf3..475d831d1d 100644 --- a/src/IKVM.MSBuild.Tasks/IKVM.MSBuild.Tasks.csproj +++ b/src/IKVM.MSBuild.Tasks/IKVM.MSBuild.Tasks.csproj @@ -1,6 +1,6 @@  - net472;netcoreapp3.1 + net472;net6.0 diff --git a/src/IKVM.MSBuild.Tasks/IkvmCompiler.cs b/src/IKVM.MSBuild.Tasks/IkvmCompiler.cs index 7cd4b145bb..ffef26d1f3 100644 --- a/src/IKVM.MSBuild.Tasks/IkvmCompiler.cs +++ b/src/IKVM.MSBuild.Tasks/IkvmCompiler.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using IKVM.Tools.Runner; -using IKVM.Tools.Runner.Compiler; +using IKVM.Tools.Runner.Importer; using Microsoft.Build.Framework; @@ -146,7 +146,7 @@ protected override async Task ExecuteAsync(IkvmToolTaskDiagnosticWriter wr Debug = false; } - var options = new IkvmCompilerOptions(); + var options = new IkvmImporterOptions(); options.ResponseFile = GetAbsolutePathIfNotNull(ResponseFile); options.Output = GetAbsolutePathIfNotNull(Output); options.Assembly = Assembly; @@ -155,22 +155,22 @@ protected override async Task ExecuteAsync(IkvmToolTaskDiagnosticWriter wr options.Target = Target?.ToLowerInvariant() switch { null => null, - "library" => IkvmCompilerTarget.Library, - "exe" => IkvmCompilerTarget.Exe, - "winexe" => IkvmCompilerTarget.WinExe, - "module" => IkvmCompilerTarget.Module, + "library" => IkvmImporterTarget.Library, + "exe" => IkvmImporterTarget.Exe, + "winexe" => IkvmImporterTarget.WinExe, + "module" => IkvmImporterTarget.Module, _ => throw new NotImplementedException(), }; options.Platform = Platform?.ToLowerInvariant() switch { null => null, - "anycpu" => IkvmCompilerPlatform.AnyCPU, - "anycpu32bitpreferred" => IkvmCompilerPlatform.AnyCPU32BitPreferred, - "x86" => IkvmCompilerPlatform.X86, - "x64" => IkvmCompilerPlatform.X64, - "arm" => IkvmCompilerPlatform.ARM, - "arm64" => IkvmCompilerPlatform.ARM64, + "anycpu" => IkvmImporterPlatform.AnyCPU, + "anycpu32bitpreferred" => IkvmImporterPlatform.AnyCPU32BitPreferred, + "x86" => IkvmImporterPlatform.X86, + "x64" => IkvmImporterPlatform.X64, + "arm" => IkvmImporterPlatform.ARM, + "arm64" => IkvmImporterPlatform.ARM64, _ => throw new NotImplementedException(), }; @@ -194,11 +194,11 @@ protected override async Task ExecuteAsync(IkvmToolTaskDiagnosticWriter wr if (Resources is not null) foreach (var resource in Resources) - options.Resources.Add(new IkvmCompilerResourceItem(GetAbsolutePathIfNotNull(resource.ItemSpec), resource.GetMetadata("ResourcePath"))); + options.Resources.Add(new IkvmImporterResourceItem(GetAbsolutePathIfNotNull(resource.ItemSpec), resource.GetMetadata("ResourcePath"))); if (ExternalResources is not null) foreach (var resource in ExternalResources) - options.ExternalResources.Add(new IkvmCompilerExternalResourceItem(GetAbsolutePathIfNotNull(resource.ItemSpec), resource.GetMetadata("ResourcePath"))); + options.ExternalResources.Add(new IkvmImporterExternalResourceItem(GetAbsolutePathIfNotNull(resource.ItemSpec), resource.GetMetadata("ResourcePath"))); options.CompressResources = CompressResources; options.Debug = Debug; @@ -274,7 +274,7 @@ protected override async Task ExecuteAsync(IkvmToolTaskDiagnosticWriter wr options.Input.Add(GetAbsolutePathIfNotNull(i.ItemSpec)); // kick off the launcher with the configured options - return await new IkvmCompilerLauncher(ToolPath, writer).ExecuteAsync(options, cancellationToken) == 0; + return await new IkvmImporterLauncher(ToolPath, writer).ExecuteAsync(options, cancellationToken) == 0; } } diff --git a/src/IKVM.MSBuild.Tasks/IkvmGetReferenceAssemblies.cs b/src/IKVM.MSBuild.Tasks/IkvmGetReferenceAssemblies.cs index ca0c919326..228cf1f4bd 100644 --- a/src/IKVM.MSBuild.Tasks/IkvmGetReferenceAssemblies.cs +++ b/src/IKVM.MSBuild.Tasks/IkvmGetReferenceAssemblies.cs @@ -1,9 +1,6 @@ using System.Collections.Generic; -using System.IO; using System.Linq; -using IKVM.Tools.Runner.Compiler; - using Microsoft.Build.Framework; using Microsoft.Build.Utilities; @@ -44,11 +41,7 @@ public override bool Execute() /// IEnumerable GetReferenceAssemblies() { - var l = new IkvmCompilerLauncher(ToolPath); - - // gets the reference assemblies - foreach (var path in Directory.GetFiles(l.GetReferenceAssemblyDirectory(), "*.dll")) - yield return path; + yield break; } } diff --git a/src/IKVM.MSBuild.Tools.runtime.linux-arm/IKVM.MSBuild.Tools.runtime.linux-arm.csproj b/src/IKVM.MSBuild.Tools.runtime.linux-arm/IKVM.MSBuild.Tools.runtime.linux-arm.csproj index b9cc676391..0c284d9694 100644 --- a/src/IKVM.MSBuild.Tools.runtime.linux-arm/IKVM.MSBuild.Tools.runtime.linux-arm.csproj +++ b/src/IKVM.MSBuild.Tools.runtime.linux-arm/IKVM.MSBuild.Tools.runtime.linux-arm.csproj @@ -1,6 +1,6 @@ - + - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 LICENSE.md README.md IKVM MSBuild Tools @@ -22,24 +22,14 @@ - TargetFramework=net461 + TargetFramework=net6.0 RuntimeIdentifier=linux-arm - ikvmc\net461\linux-arm - - - TargetFramework=netcoreapp3.1 - RuntimeIdentifier=linux-arm - ikvmc\netcoreapp3.1\linux-arm - - - TargetFramework=net461 - RuntimeIdentifier=linux-arm - ikvmstub\net461\linux-arm + ikvmc\net6.0\linux-arm - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-arm - ikvmstub\netcoreapp3.1\linux-arm + ikvmstub\net6.0\linux-arm diff --git a/src/IKVM.MSBuild.Tools.runtime.linux-arm/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.linux-arm.props b/src/IKVM.MSBuild.Tools.runtime.linux-arm/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.linux-arm.props index 731b5404dc..8499c374bc 100644 --- a/src/IKVM.MSBuild.Tools.runtime.linux-arm/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.linux-arm.props +++ b/src/IKVM.MSBuild.Tools.runtime.linux-arm/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.linux-arm.props @@ -4,10 +4,8 @@ - - - - + + diff --git a/src/IKVM.MSBuild.Tools.runtime.linux-arm64/IKVM.MSBuild.Tools.runtime.linux-arm64.csproj b/src/IKVM.MSBuild.Tools.runtime.linux-arm64/IKVM.MSBuild.Tools.runtime.linux-arm64.csproj index 9ed43a1340..2f9ef16ddd 100644 --- a/src/IKVM.MSBuild.Tools.runtime.linux-arm64/IKVM.MSBuild.Tools.runtime.linux-arm64.csproj +++ b/src/IKVM.MSBuild.Tools.runtime.linux-arm64/IKVM.MSBuild.Tools.runtime.linux-arm64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 LICENSE.md README.md IKVM MSBuild Tools @@ -22,14 +22,24 @@ - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-arm64 - ikvmc\netcoreapp3.1\linux-arm64 + ikvmc\net6.0\linux-arm64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-arm64 - ikvmstub\netcoreapp3.1\linux-arm64 + ikvmstub\net6.0\linux-arm64 + + + TargetFramework=net472 + RuntimeIdentifier=linux-arm64 + ikvmc\net472\linux-arm64 + + + TargetFramework=net472 + RuntimeIdentifier=linux-arm64 + ikvmstub\net472\linux-arm64 diff --git a/src/IKVM.MSBuild.Tools.runtime.linux-arm64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.linux-arm64.props b/src/IKVM.MSBuild.Tools.runtime.linux-arm64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.linux-arm64.props index 7ff817fe3b..860098c3bc 100644 --- a/src/IKVM.MSBuild.Tools.runtime.linux-arm64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.linux-arm64.props +++ b/src/IKVM.MSBuild.Tools.runtime.linux-arm64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.linux-arm64.props @@ -4,10 +4,10 @@ - - - - + + + + diff --git a/src/IKVM.MSBuild.Tools.runtime.linux-x64/IKVM.MSBuild.Tools.runtime.linux-x64.csproj b/src/IKVM.MSBuild.Tools.runtime.linux-x64/IKVM.MSBuild.Tools.runtime.linux-x64.csproj index 6e5c110d2b..8f9b8dabc2 100644 --- a/src/IKVM.MSBuild.Tools.runtime.linux-x64/IKVM.MSBuild.Tools.runtime.linux-x64.csproj +++ b/src/IKVM.MSBuild.Tools.runtime.linux-x64/IKVM.MSBuild.Tools.runtime.linux-x64.csproj @@ -1,6 +1,6 @@ - + - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 LICENSE.md README.md IKVM MSBuild Tools @@ -22,24 +22,24 @@ - TargetFramework=net461 + TargetFramework=net6.0 RuntimeIdentifier=linux-x64 - ikvmc\net461\linux-x64 + ikvmc\net6.0\linux-x64 - - TargetFramework=netcoreapp3.1 + + TargetFramework=net6.0 RuntimeIdentifier=linux-x64 - ikvmc\netcoreapp3.1\linux-x64 + ikvmstub\net6.0\linux-x64 - - TargetFramework=net461 + + TargetFramework=net472 RuntimeIdentifier=linux-x64 - ikvmstub\net461\linux-x64 + ikvmc\net472\linux-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net472 RuntimeIdentifier=linux-x64 - ikvmstub\netcoreapp3.1\linux-x64 + ikvmstub\net472\linux-x64 diff --git a/src/IKVM.MSBuild.Tools.runtime.linux-x64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.linux-x64.props b/src/IKVM.MSBuild.Tools.runtime.linux-x64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.linux-x64.props index 1145de2377..8d73dc8b1e 100644 --- a/src/IKVM.MSBuild.Tools.runtime.linux-x64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.linux-x64.props +++ b/src/IKVM.MSBuild.Tools.runtime.linux-x64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.linux-x64.props @@ -4,10 +4,10 @@ - - - - + + + + diff --git a/src/IKVM.MSBuild.Tools.runtime.osx-x64/IKVM.MSBuild.Tools.runtime.osx-x64.csproj b/src/IKVM.MSBuild.Tools.runtime.osx-x64/IKVM.MSBuild.Tools.runtime.osx-x64.csproj index a7feb21c8a..6510833af3 100644 --- a/src/IKVM.MSBuild.Tools.runtime.osx-x64/IKVM.MSBuild.Tools.runtime.osx-x64.csproj +++ b/src/IKVM.MSBuild.Tools.runtime.osx-x64/IKVM.MSBuild.Tools.runtime.osx-x64.csproj @@ -1,6 +1,6 @@ - + - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 LICENSE.md README.md IKVM MSBuild Tools @@ -22,24 +22,24 @@ - TargetFramework=net461 + TargetFramework=net6.0 RuntimeIdentifier=osx-x64 - ikvmc\net461\osx-x64 + ikvmc\net6.0\osx-x64 - - TargetFramework=netcoreapp3.1 + + TargetFramework=net6.0 RuntimeIdentifier=osx-x64 - ikvmc\netcoreapp3.1\osx-x64 + ikvmstub\net6.0\osx-x64 - - TargetFramework=net461 + + TargetFramework=net472 RuntimeIdentifier=osx-x64 - ikvmstub\net461\osx-x64 + ikvmc\net472\osx-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net472 RuntimeIdentifier=osx-x64 - ikvmstub\netcoreapp3.1\osx-x64 + ikvmstub\net472\osx-x64 diff --git a/src/IKVM.MSBuild.Tools.runtime.osx-x64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.osx-x64.props b/src/IKVM.MSBuild.Tools.runtime.osx-x64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.osx-x64.props index 6e4fdf7631..f7b63647f0 100644 --- a/src/IKVM.MSBuild.Tools.runtime.osx-x64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.osx-x64.props +++ b/src/IKVM.MSBuild.Tools.runtime.osx-x64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.osx-x64.props @@ -4,10 +4,10 @@ - - - - + + + + diff --git a/src/IKVM.MSBuild.Tools.runtime.win7-x64/IKVM.MSBuild.Tools.runtime.win7-x64.csproj b/src/IKVM.MSBuild.Tools.runtime.win7-x64/IKVM.MSBuild.Tools.runtime.win7-x64.csproj index 42c44de56c..f8ea465a49 100644 --- a/src/IKVM.MSBuild.Tools.runtime.win7-x64/IKVM.MSBuild.Tools.runtime.win7-x64.csproj +++ b/src/IKVM.MSBuild.Tools.runtime.win7-x64/IKVM.MSBuild.Tools.runtime.win7-x64.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 LICENSE.md README.md IKVM MSBuild Tools @@ -22,24 +22,24 @@ - TargetFramework=net461 + TargetFramework=net6.0 RuntimeIdentifier=win7-x64 - ikvmc\net461\win7-x64 + ikvmc\net6.0\win7-x64 - - TargetFramework=netcoreapp3.1 + + TargetFramework=net6.0 RuntimeIdentifier=win7-x64 - ikvmc\netcoreapp3.1\win7-x64 + ikvmstub\net6.0\win7-x64 - - TargetFramework=net461 + + TargetFramework=net472 RuntimeIdentifier=win7-x64 - ikvmstub\net461\win7-x64 + ikvmc\net472\win7-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net472 RuntimeIdentifier=win7-x64 - ikvmstub\netcoreapp3.1\win7-x64 + ikvmstub\net472\win7-x64 diff --git a/src/IKVM.MSBuild.Tools.runtime.win7-x64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.win7-x64.props b/src/IKVM.MSBuild.Tools.runtime.win7-x64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.win7-x64.props index 0ddcb853da..7b86ff06c2 100644 --- a/src/IKVM.MSBuild.Tools.runtime.win7-x64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.win7-x64.props +++ b/src/IKVM.MSBuild.Tools.runtime.win7-x64/buildTransitive/netstandard2.0/IKVM.MSBuild.Tools.runtime.win7-x64.props @@ -4,10 +4,10 @@ - - - - + + + + diff --git a/src/IKVM.MSBuild.Tools/IKVM.MSBuild.Tools.csproj b/src/IKVM.MSBuild.Tools/IKVM.MSBuild.Tools.csproj index 8219334fad..15bd549d4d 100644 --- a/src/IKVM.MSBuild.Tools/IKVM.MSBuild.Tools.csproj +++ b/src/IKVM.MSBuild.Tools/IKVM.MSBuild.Tools.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 LICENSE.md README.md IKVM MSBuild Tools diff --git a/src/IKVM.MSBuild.Tools/lib/netcoreapp3.1/_._ b/src/IKVM.MSBuild.Tools/lib/netcoreapp3.1/_._ deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/IKVM.MSBuild.Tools/lib/netstandard2.0/_._ b/src/IKVM.MSBuild.Tools/lib/netstandard2.0/_._ new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/IKVM.MSBuild.Tools/lib/netstandard2.0/_._ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/IKVM.MSBuild/IKVM.MSBuild.msbuildproj b/src/IKVM.MSBuild/IKVM.MSBuild.msbuildproj index d02957e7c6..15d5c4a6c8 100644 --- a/src/IKVM.MSBuild/IKVM.MSBuild.msbuildproj +++ b/src/IKVM.MSBuild/IKVM.MSBuild.msbuildproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 LICENSE.md README.md IKVM MSBuild Targets @@ -32,8 +32,8 @@ tasks\net472 - TargetFramework=netcoreapp3.1 - tasks\netcoreapp3.1 + TargetFramework=net6.0 + tasks\net6.0 diff --git a/src/IKVM.MSBuild/buildTransitive/netstandard2.0/IKVM.MSBuild.IkvmToolReference.targets b/src/IKVM.MSBuild/buildTransitive/netstandard2.0/IKVM.MSBuild.IkvmToolReference.targets index c859dd0432..5f4d0bb570 100644 --- a/src/IKVM.MSBuild/buildTransitive/netstandard2.0/IKVM.MSBuild.IkvmToolReference.targets +++ b/src/IKVM.MSBuild/buildTransitive/netstandard2.0/IKVM.MSBuild.IkvmToolReference.targets @@ -116,14 +116,19 @@ $(ResolveIkvmFrameworkReferencesDependsOn); - ResolveIkvmCompiler; + GetFrameworkPaths; + GetReferenceAssemblyPaths; + PrepareForBuild; + ResolveSDKReferences; + ExpandSDKReferences; + ResolveTargetingPackAssets; - + diff --git a/src/IKVM.MSBuild/buildTransitive/netstandard2.0/IKVM.MSBuild.Tasks.targets b/src/IKVM.MSBuild/buildTransitive/netstandard2.0/IKVM.MSBuild.Tasks.targets index a4847895e0..491d45e78a 100644 --- a/src/IKVM.MSBuild/buildTransitive/netstandard2.0/IKVM.MSBuild.Tasks.targets +++ b/src/IKVM.MSBuild/buildTransitive/netstandard2.0/IKVM.MSBuild.Tasks.targets @@ -4,7 +4,7 @@ - netcoreapp3.1 + net6.0 net472 TaskHostFactory @@ -20,11 +20,25 @@ + + + $(ResolveIkvmFrameworkReferencesDependsOn); + GetFrameworkPaths; + GetReferenceAssemblyPaths; + PrepareForBuild; + ResolveSDKReferences; + ExpandSDKReferences; + ResolveTargetingPackAssets; + + + - - - + + + + + diff --git a/src/IKVM.MSBuild/buildTransitive/netstandard2.0/IKVM.MSBuild.targets b/src/IKVM.MSBuild/buildTransitive/netstandard2.0/IKVM.MSBuild.targets index 89f4d55c01..6ecb22e8ad 100644 --- a/src/IKVM.MSBuild/buildTransitive/netstandard2.0/IKVM.MSBuild.targets +++ b/src/IKVM.MSBuild/buildTransitive/netstandard2.0/IKVM.MSBuild.targets @@ -4,9 +4,9 @@ - netcoreapp3.1 - net461 - netcoreapp3.1 + net6.0 + net472 + net6.0 win7-x86 win7-x64 linux-x64 @@ -72,4 +72,4 @@ --> - \ No newline at end of file + diff --git a/src/IKVM.MSBuild/lib/net461/_._ b/src/IKVM.MSBuild/lib/net461/_._ deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/IKVM.MSBuild/lib/net47/_._ b/src/IKVM.MSBuild/lib/net47/_._ deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/IKVM.MSBuild/lib/netcoreapp3.1/_._ b/src/IKVM.MSBuild/lib/netcoreapp3.1/_._ deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/IKVM.MSBuild.Tools/lib/net461/_._ b/src/IKVM.MSBuild/lib/netstandard2.0/_._ similarity index 100% rename from src/IKVM.MSBuild.Tools/lib/net461/_._ rename to src/IKVM.MSBuild/lib/netstandard2.0/_._ diff --git a/src/IKVM.NET.Sdk/targets/IKVM.Java.Core.Tasks.targets b/src/IKVM.NET.Sdk/targets/IKVM.Java.Core.Tasks.targets index be98c83088..826c13caa4 100644 --- a/src/IKVM.NET.Sdk/targets/IKVM.Java.Core.Tasks.targets +++ b/src/IKVM.NET.Sdk/targets/IKVM.Java.Core.Tasks.targets @@ -9,8 +9,6 @@ - - <_ReferenceExportReference Remove="@(_ReferenceExportReference)" /> <_ReferenceExportReference Include="@(ReferencePathWithRefAssemblies)" Condition=" '%(Filename)' != '%(ReferenceExport.Filename)' "/> @@ -81,7 +79,6 @@ - diff --git a/src/IKVM.OpenJDK.Tests/IKVM.OpenJDK.Tests.csproj b/src/IKVM.OpenJDK.Tests/IKVM.OpenJDK.Tests.csproj index be35706565..4a26f878b7 100644 --- a/src/IKVM.OpenJDK.Tests/IKVM.OpenJDK.Tests.csproj +++ b/src/IKVM.OpenJDK.Tests/IKVM.OpenJDK.Tests.csproj @@ -2,7 +2,7 @@ - net461;netcoreapp3.1 + net461;net6.0 false diff --git a/src/IKVM.OpenJDK.Tests/langtools/ExcludeList.txt b/src/IKVM.OpenJDK.Tests/langtools/ExcludeList.txt index 2e59df315d..9ed1f249fc 100644 --- a/src/IKVM.OpenJDK.Tests/langtools/ExcludeList.txt +++ b/src/IKVM.OpenJDK.Tests/langtools/ExcludeList.txt @@ -108,8 +108,9 @@ tools/sjavac/SJavacWrapper.java # likely fails because the file takes too long to build tools/javac/file/zip/T6836682.java linux-all -# executive decision: disabling this test because it's sensitive to the method order in the stubs, which is derived from the method order in the assembly metadata, which is supposed to be derived from the method order in the original class file. +# executive decision: disabling these test because they're sensitive to the method order in the stubs, which is derived from the method order in the assembly metadata, which is supposed to be derived from the method order in the original class file. # however, RuntimeByteCodeJavaType can't currently be guarenteed to emit methods in the exact correct order, since some of the method linking is recursive and ondemand. # so, until this is fixed, and we have a stable way to determine method order, we're disabling this guy # it did work previously, by accident, as far as I can tell tools/javac/lambda/MostSpecific09.java generic-all +tools/javac/lambda/8019480/T8019480.java generic-all diff --git a/src/IKVM.Reflection/Fusion.cs b/src/IKVM.Reflection/Fusion.cs index 10c7582a9e..5a8b9f7b69 100644 --- a/src/IKVM.Reflection/Fusion.cs +++ b/src/IKVM.Reflection/Fusion.cs @@ -47,13 +47,14 @@ static class Fusion /// /// Native implementation of CompareAssemblyIdentity. /// + /// /// /// /// /// /// /// - internal static bool CompareAssemblyIdentityNative(string assemblyIdentity1, bool unified1, string assemblyIdentity2, bool unified2, out AssemblyComparisonResult result) + internal static bool CompareAssemblyIdentityNative(string coreLibName, string assemblyIdentity1, bool unified1, string assemblyIdentity2, bool unified2, out AssemblyComparisonResult result) { Marshal.ThrowExceptionForHR(CompareAssemblyIdentity(assemblyIdentity1, unified1, assemblyIdentity2, unified2, out var equivalent, out result)); return equivalent; @@ -65,6 +66,7 @@ internal static bool CompareAssemblyIdentityNative(string assemblyIdentity1, boo /// /// Managed implementation of CompareAssemblyIdentity. /// + /// /// /// /// @@ -73,7 +75,7 @@ internal static bool CompareAssemblyIdentityNative(string assemblyIdentity1, boo /// /// /// - internal static bool CompareAssemblyIdentityPure(string assemblyIdentity1, bool unified1, string assemblyIdentity2, bool unified2, out AssemblyComparisonResult result) + internal static bool CompareAssemblyIdentityPure(string coreLibName, string assemblyIdentity1, bool unified1, string assemblyIdentity2, bool unified2, out AssemblyComparisonResult result) { ParsedAssemblyName name1; ParsedAssemblyName name2; @@ -97,7 +99,7 @@ internal static bool CompareAssemblyIdentityPure(string assemblyIdentity1, bool throw new ArgumentException(); } - if (name2.Name != null && name2.Name.Equals(Universe.CoreLibName, StringComparison.OrdinalIgnoreCase)) + if (name2.Name != null && name2.Name.Equals(coreLibName, StringComparison.OrdinalIgnoreCase)) { if (name1.Name != null && name1.Name.Equals(name2.Name, StringComparison.OrdinalIgnoreCase)) { diff --git a/src/IKVM.Reflection/Universe.cs b/src/IKVM.Reflection/Universe.cs index a3a4424c26..2d9eba5701 100644 --- a/src/IKVM.Reflection/Universe.cs +++ b/src/IKVM.Reflection/Universe.cs @@ -45,11 +45,11 @@ public sealed class Universe : IDisposable #if NETCOREAPP3_1_OR_GREATER - public static readonly string CoreLibName = "System.Runtime"; + public static readonly string DefaultCoreLibName = "System.Runtime"; #elif NETFRAMEWORK - public static readonly string CoreLibName = "mscorlib"; + public static readonly string DefaultCoreLibName = "mscorlib"; #endif @@ -61,6 +61,7 @@ public sealed class Universe : IDisposable internal static readonly bool CoreRuntime = true; #endif + readonly string coreLibName; readonly Dictionary canonicalizedTypes = new Dictionary(); readonly List assemblies = new List(); readonly List dynamicAssemblies = new List(); @@ -126,14 +127,25 @@ public sealed class Universe : IDisposable List resolvers = new List(); Predicate missingTypeIsValueType; - public Universe() - : this(UniverseOptions.None) + /// + /// Initializes a new instance. + /// + /// + public Universe(string coreLibName = null) : + this(UniverseOptions.None, coreLibName) { + } - public Universe(UniverseOptions options) + /// + /// Initializes a new instance. + /// + /// + /// + public Universe(UniverseOptions options, string coreLibName = null) { this.options = options; + this.coreLibName = coreLibName ?? DefaultCoreLibName; enableFunctionPointers = (options & UniverseOptions.EnableFunctionPointers) != 0; useNativeFusion = (options & UniverseOptions.DisableFusion) == 0 && GetUseNativeFusion(); returnPseudoCustomAttributes = (options & UniverseOptions.DisablePseudoCustomAttributeRetrieval) == 0; @@ -153,10 +165,15 @@ static bool GetUseNativeFusion() } } - internal Assembly CoreLib - { - get { return Load(CoreLibName); } - } + /// + /// Gets the name of the core library. + /// + public string CoreLibName => coreLibName; + + /// + /// Gets the core library. + /// + internal Assembly CoreLib => Load(coreLibName); /// /// Attempts to import the type from the core library. @@ -233,11 +250,11 @@ Type ResolvePrimitive(string name) internal Type System_Array => typeof_System_Array ??= ResolvePrimitive("Array"); - internal Type System_DateTime => typeof_System_DateTime ?? (typeof_System_DateTime = ImportCoreLibType("System", "DateTime")); + internal Type System_DateTime => typeof_System_DateTime ??= ImportCoreLibType("System", "DateTime"); - internal Type System_DBNull => typeof_System_DBNull ?? (typeof_System_DBNull = ImportCoreLibType("System", "DBNull")); + internal Type System_DBNull => typeof_System_DBNull ??= ImportCoreLibType("System", "DBNull"); - internal Type System_Decimal => typeof_System_Decimal ?? (typeof_System_Decimal = ImportCoreLibType("System", "Decimal")); + internal Type System_Decimal => typeof_System_Decimal ??= ImportCoreLibType("System", "Decimal"); internal Type System_AttributeUsageAttribute => typeof_System_AttributeUsageAttribute ??= ImportCoreLibType("System", "AttributeUsageAttribute"); @@ -294,7 +311,7 @@ Type ResolvePrimitive(string name) /// internal bool HasCoreLib { - get { return GetLoadedAssembly(CoreLibName) != null; } + get { return GetLoadedAssembly(coreLibName) != null; } } /// @@ -483,7 +500,7 @@ Assembly GetLoadedAssembly(string refname) var simpleName = GetSimpleAssemblyName(refname); for (int i = 0; i < assemblies.Count; i++) { - if (simpleName.Equals(assemblies[i].Name, StringComparison.OrdinalIgnoreCase) && CompareAssemblyIdentity(refname, false, assemblies[i].FullName, false, out var result)) + if (simpleName.Equals(assemblies[i].Name, StringComparison.OrdinalIgnoreCase) && CompareAssemblyIdentity(coreLibName, refname, false, assemblies[i].FullName, false, out var result)) { asm = assemblies[i]; assembliesByName.Add(refname, asm); @@ -499,7 +516,7 @@ Assembly GetDynamicAssembly(string refname) { var simpleName = GetSimpleAssemblyName(refname); foreach (var asm in dynamicAssemblies) - if (simpleName.Equals(asm.Name, StringComparison.OrdinalIgnoreCase) && CompareAssemblyIdentity(refname, false, asm.FullName, false, out var result)) + if (simpleName.Equals(asm.Name, StringComparison.OrdinalIgnoreCase) && CompareAssemblyIdentity(coreLibName, refname, false, asm.FullName, false, out var result)) return asm; return null; @@ -696,11 +713,11 @@ public Assembly[] GetAssemblies() return array; } - public bool CompareAssemblyIdentity(string assemblyIdentity1, bool unified1, string assemblyIdentity2, bool unified2, out AssemblyComparisonResult result) + public bool CompareAssemblyIdentity(string coreLibName,string assemblyIdentity1, bool unified1, string assemblyIdentity2, bool unified2, out AssemblyComparisonResult result) { return useNativeFusion - ? Fusion.CompareAssemblyIdentityNative(assemblyIdentity1, unified1, assemblyIdentity2, unified2, out result) - : Fusion.CompareAssemblyIdentityPure(assemblyIdentity1, unified1, assemblyIdentity2, unified2, out result); + ? Fusion.CompareAssemblyIdentityNative(coreLibName, assemblyIdentity1, unified1, assemblyIdentity2, unified2, out result) + : Fusion.CompareAssemblyIdentityPure(coreLibName,assemblyIdentity1, unified1, assemblyIdentity2, unified2, out result); } public AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access) diff --git a/src/IKVM.Runtime-ref/IKVM.Runtime-ref.csproj b/src/IKVM.Runtime-ref/IKVM.Runtime-ref.csproj index 53caf2f325..e56c290bd9 100644 --- a/src/IKVM.Runtime-ref/IKVM.Runtime-ref.csproj +++ b/src/IKVM.Runtime-ref/IKVM.Runtime-ref.csproj @@ -1,7 +1,7 @@  IKVM.Runtime-ref - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 IKVM.Runtime $(DefineConstants);EMITTERS;FIRST_PASS true diff --git a/src/IKVM.Runtime/ClassFile.cs b/src/IKVM.Runtime/ClassFile.cs index 304a5557e3..6d723acd90 100644 --- a/src/IKVM.Runtime/ClassFile.cs +++ b/src/IKVM.Runtime/ClassFile.cs @@ -293,7 +293,7 @@ internal ClassFile(RuntimeContext context, ClassReader reader, string inputClass for (int i = 0; i < reader.Attributes.Count; i++) { var attribute = reader.Attributes[i]; - + switch (GetConstantPoolUtf8String(utf8_cp, attribute.Info.Record.NameIndex)) { case "Deprecated": diff --git a/src/IKVM.Runtime/DynamicClassLoader.cs b/src/IKVM.Runtime/DynamicClassLoader.cs index 79082dc76a..00ddb090b3 100644 --- a/src/IKVM.Runtime/DynamicClassLoader.cs +++ b/src/IKVM.Runtime/DynamicClassLoader.cs @@ -51,12 +51,6 @@ namespace IKVM.Runtime class DynamicClassLoaderFactory { -#if NETFRAMEWORK - internal const string DynamicAssemblySuffixAndPublicKey = "-ikvm-runtime-injected, PublicKey=00240000048000009400000006020000002400005253413100040000010001009D674F3D63B8D7A4C428BD7388341B025C71AA61C6224CD53A12C21330A3159D300051FE2EED154FE30D70673A079E4529D0FD78113DCA771DA8B0C1EF2F77B73651D55645B0A4294F0AF9BF7078432E13D0F46F951D712C2FCF02EB15552C0FE7817FC0AED58E0984F86661BF64D882F29B619899DD264041E7D4992548EB9E"; -#else - internal const string DynamicAssemblySuffixAndPublicKey = "-ikvm-runtime-injected"; -#endif - readonly RuntimeContext context; internal readonly ConcurrentDictionary dynamicTypes = new(); DynamicClassLoader instance; @@ -74,7 +68,7 @@ public DynamicClassLoaderFactory(RuntimeContext context) // we attach to the AppDomain.TypeResolve event to be notified when the CLR cannot find a type, and we must provide it AppDomain.CurrentDomain.TypeResolve += new ResolveEventHandler(OnTypeResolve); - // exclude '' as a valie type name, as it overlaps with the pseudo-type for global fields and methods + // exclude '' as a valid type name, as it overlaps with the pseudo-type for global fields and methods dynamicTypes.TryAdd("", null); #endif } @@ -133,7 +127,7 @@ public DynamicClassLoader GetOrCreate(RuntimeClassLoader loader) // each assembly class loader gets its own dynamic class loader if (loader is RuntimeAssemblyClassLoader acl) { - var name = acl.MainAssembly.GetName().Name + DynamicAssemblySuffixAndPublicKey; + var name = acl.MainAssembly.GetName().Name + context.Options.DynamicAssemblySuffixAndPublicKey; foreach (var attr in acl.MainAssembly.GetCustomAttributes()) { if (attr.AssemblyName == name) diff --git a/src/IKVM.Runtime/IKVM.Runtime.csproj b/src/IKVM.Runtime/IKVM.Runtime.csproj index 0631d33f93..f2cdd83456 100644 --- a/src/IKVM.Runtime/IKVM.Runtime.csproj +++ b/src/IKVM.Runtime/IKVM.Runtime.csproj @@ -3,7 +3,7 @@ - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 $(DefineConstants);EMITTERS true true diff --git a/src/IKVM.Runtime/JVM.cs b/src/IKVM.Runtime/JVM.cs index 24790023d9..a110106d28 100644 --- a/src/IKVM.Runtime/JVM.cs +++ b/src/IKVM.Runtime/JVM.cs @@ -62,7 +62,7 @@ internal static partial class JVM #if FIRST_PASS == false && IMPORTER == false && EXPORTER == false - static readonly RuntimeContext context = new RuntimeContext(new Resolver(), false); + static readonly RuntimeContext context = new RuntimeContext(new RuntimeContextOptions(), new Resolver(), false); static readonly VfsTable vfs = VfsTable.BuildDefaultTable(new VfsRuntimeContext(context), Properties.HomePath); /// diff --git a/src/IKVM.Runtime/Java/Externs/java/net/PlainDatagramSocketImpl.cs b/src/IKVM.Runtime/Java/Externs/java/net/PlainDatagramSocketImpl.cs index 8f64b3583e..83c198d055 100644 --- a/src/IKVM.Runtime/Java/Externs/java/net/PlainDatagramSocketImpl.cs +++ b/src/IKVM.Runtime/Java/Externs/java/net/PlainDatagramSocketImpl.cs @@ -573,9 +573,24 @@ public static int peekData(object this_, object packet_) // read and error states if (RuntimeUtil.IsWindows) { - // wait for data to be available - if (socket.Poll(impl.timeout * 1000L > int.MaxValue ? int.MaxValue : impl.timeout * 1000, SelectMode.SelectRead) == false) + try + { + // wait for data to be available + if (socket.Poll(impl.timeout * 1000L > int.MaxValue ? int.MaxValue : impl.timeout * 1000, SelectMode.SelectRead) == false) + throw new global::java.net.SocketTimeoutException("Receive timed out."); + } + catch (SocketException e) when (e.SocketErrorCode == SocketError.TimedOut) + { throw new global::java.net.SocketTimeoutException("Receive timed out."); + } + catch (SocketException e) when (e.SocketErrorCode == SocketError.Interrupted) + { + throw new global::java.net.SocketException("Socket closed."); + } + catch + { + throw; + } } else { @@ -591,6 +606,14 @@ public static int peekData(object this_, object packet_) { throw new global::java.net.SocketTimeoutException("Receive timed out."); } + catch (SocketException e) when (e.SocketErrorCode == SocketError.Interrupted) + { + throw new global::java.net.SocketException("Socket closed."); + } + catch + { + throw; + } } } @@ -679,9 +702,24 @@ public static void receive0(object this_, object packet_) // read and error states if (RuntimeUtil.IsWindows) { - // wait for data to be available - if (socket.Poll(impl.timeout * 1000L > int.MaxValue ? int.MaxValue : impl.timeout * 1000, SelectMode.SelectRead) == false) + try + { + // wait for data to be available + if (socket.Poll(impl.timeout * 1000L > int.MaxValue ? int.MaxValue : impl.timeout * 1000, SelectMode.SelectRead) == false) + throw new global::java.net.SocketTimeoutException("Receive timed out."); + } + catch (SocketException e) when (e.SocketErrorCode == SocketError.TimedOut) + { throw new global::java.net.SocketTimeoutException("Receive timed out."); + } + catch (SocketException e) when (e.SocketErrorCode == SocketError.Interrupted) + { + throw new global::java.net.SocketException("Socket closed."); + } + catch + { + throw; + } } else { @@ -697,6 +735,14 @@ public static void receive0(object this_, object packet_) { throw new global::java.net.SocketTimeoutException("Receive timed out."); } + catch (SocketException e) when (e.SocketErrorCode == SocketError.Interrupted) + { + throw new global::java.net.SocketException("Socket closed."); + } + catch + { + throw; + } } } diff --git a/src/IKVM.Runtime/Java/Externs/java/net/SocketInputStream.cs b/src/IKVM.Runtime/Java/Externs/java/net/SocketInputStream.cs index 7fa75b90c6..63ceddaf79 100644 --- a/src/IKVM.Runtime/Java/Externs/java/net/SocketInputStream.cs +++ b/src/IKVM.Runtime/Java/Externs/java/net/SocketInputStream.cs @@ -41,6 +41,10 @@ public static int socketRead0(object this_, global::java.io.FileDescriptor fd, b return socket.Receive(b, off, len, SocketFlags.None); } } + catch (SocketException e) when (e.SocketErrorCode == SocketError.Interrupted) + { + throw new global::java.net.SocketException("Socket closed."); + } finally { socket.Blocking = previousBlocking; diff --git a/src/IKVM.Runtime/Java/Externs/java/net/SocketOutputStream.cs b/src/IKVM.Runtime/Java/Externs/java/net/SocketOutputStream.cs index 918d437e6a..faf6a34714 100644 --- a/src/IKVM.Runtime/Java/Externs/java/net/SocketOutputStream.cs +++ b/src/IKVM.Runtime/Java/Externs/java/net/SocketOutputStream.cs @@ -73,6 +73,10 @@ public static void socketWrite0(object this_, global::java.io.FileDescriptor fd, socket.SendTimeout = 0; socket.Send(data, off, Math.Min(len, data.Length - off), SocketFlags.None); } + catch (SocketException e) when (e.SocketErrorCode == SocketError.Interrupted) + { + throw new global::java.net.SocketException("Socket closed."); + } finally { socket.Blocking = prevBlocking; diff --git a/src/IKVM.Runtime/Java/Externs/sun/nio/ch/DotNetAsynchronousFileChannelImpl.cs b/src/IKVM.Runtime/Java/Externs/sun/nio/ch/DotNetAsynchronousFileChannelImpl.cs index ec86272ef1..5cb024eafb 100644 --- a/src/IKVM.Runtime/Java/Externs/sun/nio/ch/DotNetAsynchronousFileChannelImpl.cs +++ b/src/IKVM.Runtime/Java/Externs/sun/nio/ch/DotNetAsynchronousFileChannelImpl.cs @@ -784,6 +784,8 @@ static Task ReadAsync(global::sun.nio.ch.DotNetAsynchronousFileChannelI int pos = dst.position(); int lim = dst.limit(); int rem = pos <= lim ? lim - pos : 0; + if (rem == 0) + return Task.FromResult(new Integer(0)); if (pos > lim) return Task.FromException(new global::java.lang.IllegalArgumentException("Position after limit.")); @@ -845,13 +847,13 @@ async Task ImplAsync() var mem = mgr.Memory.Slice(pos, rem); var n = await stream.ReadAsync(mem, cancellationToken); dst.position(pos + n); - return new global::java.lang.Integer(n); + return new Integer(n); } else { var n = await stream.ReadAsync(dst.array(), dst.arrayOffset() + pos, rem, cancellationToken); dst.position(pos + n); - return new global::java.lang.Integer(n); + return new Integer(n); } #endif } @@ -905,22 +907,22 @@ async Task ImplAsync() throw new global::java.lang.IllegalArgumentException("Negative position"); if (IsOpen(self) == false) - return Task.FromException(new global::java.nio.channels.ClosedChannelException()); + return Task.FromException(new global::java.nio.channels.ClosedChannelException()); var stream = FileDescriptorAccessor.GetStream(self.fdObj); if (stream == null) - return Task.FromException(new global::java.nio.channels.ClosedChannelException()); + return Task.FromException(new global::java.nio.channels.ClosedChannelException()); if (stream.CanWrite == false) - return Task.FromException(new global::java.io.IOException("Stream does not support writing.")); + return Task.FromException(new global::java.io.IOException("Stream does not support writing.")); // check buffer int pos = src.position(); int lim = src.limit(); int rem = pos <= lim ? lim - pos : 0; if (rem == 0) - return Task.FromResult(new global::java.lang.Integer(0)); + return Task.FromResult(new global::java.lang.Integer(0)); if (pos > lim) - return Task.FromException(new global::java.lang.IllegalArgumentException("Position after limit.")); + return Task.FromException(new global::java.lang.IllegalArgumentException("Position after limit.")); if (cancellationToken.IsCancellationRequested) return null; @@ -980,13 +982,13 @@ async Task ImplAsync() var mem = mgr.Memory.Slice(pos, rem); await stream.WriteAsync(mem, cancellationToken); src.position(pos + rem); - return new global::java.lang.Integer(rem); + return new Integer(rem); } else { await stream.WriteAsync(src.array(), src.arrayOffset() + pos, rem, cancellationToken); src.position(pos + rem); - return new global::java.lang.Integer(rem); + return new Integer(rem); } #endif } diff --git a/src/IKVM.Runtime/Java/Externs/sun/nio/ch/FileChannelImpl.cs b/src/IKVM.Runtime/Java/Externs/sun/nio/ch/FileChannelImpl.cs index e9eecf7a5c..bb71a177c0 100644 --- a/src/IKVM.Runtime/Java/Externs/sun/nio/ch/FileChannelImpl.cs +++ b/src/IKVM.Runtime/Java/Externs/sun/nio/ch/FileChannelImpl.cs @@ -239,6 +239,10 @@ public static unsafe long transferTo0(object self, global::java.io.FileDescripto }; } + // if destination is a file, advance its current position by the amount read + if (FileDescriptorAccessor.GetStream(dst) is FileStream f2) + f2.Seek(result, SeekOrigin.Current); + return result; } } @@ -483,7 +487,7 @@ static long MapFileUnix(global::sun.nio.ch.FileChannelImpl self, int prot, long // inform the OS we will likely need this data shortly if (Syscall.posix_fadvise((int)fs.SafeFileHandle.DangerousGetHandle(), position, length, PosixFadviseAdvice.POSIX_FADV_WILLNEED) is int e and not 0) - throw new global::java.io.IOException("File mapping failed.", new UnixIOException(e)); + throw new global::java.io.IOException("File mapping failed.", new UnixIOException(e)); var i = Syscall.mmap(IntPtr.Zero, (ulong)length, p, f, (int)fs.SafeFileHandle.DangerousGetHandle(), position); if (i == Syscall.MAP_FAILED) diff --git a/src/IKVM.Runtime/LambdaMetafactory.cs b/src/IKVM.Runtime/LambdaMetafactory.cs index fd500b04ca..f30ae1b466 100644 --- a/src/IKVM.Runtime/LambdaMetafactory.cs +++ b/src/IKVM.Runtime/LambdaMetafactory.cs @@ -940,14 +940,14 @@ private static bool IsObjectMethod(RuntimeJavaMethod mw) private static bool MatchSignatures(RuntimeJavaMethod interfaceMethod, ClassFile.ConstantPoolItemMethodType samMethodType) { - return interfaceMethod.ReturnType == samMethodType.GetRetType() - && MatchTypes(interfaceMethod.GetParameters(), samMethodType.GetArgTypes()); + return interfaceMethod.ReturnType == samMethodType.GetRetType() && MatchTypes(interfaceMethod.GetParameters(), samMethodType.GetArgTypes()); } private static bool MatchSignatures(RuntimeJavaMethod mw1, RuntimeJavaMethod mw2) { - return mw1.ReturnType == mw2.ReturnType - && MatchTypes(mw1.GetParameters(), mw2.GetParameters()); + mw1.Link(); + mw2.Link(); + return mw1.ReturnType == mw2.ReturnType && MatchTypes(mw1.GetParameters(), mw2.GetParameters()); } private static bool MatchTypes(RuntimeJavaType[] ar1, RuntimeJavaType[] ar2) diff --git a/src/IKVM.Runtime/RuntimeByteCodeJavaType.FinishContext.cs b/src/IKVM.Runtime/RuntimeByteCodeJavaType.FinishContext.cs index 68a0a8bd61..63a12160e2 100644 --- a/src/IKVM.Runtime/RuntimeByteCodeJavaType.FinishContext.cs +++ b/src/IKVM.Runtime/RuntimeByteCodeJavaType.FinishContext.cs @@ -869,34 +869,34 @@ static void MarkConstantPoolUsageForAnnotationComponentValue(ElementValueReader private bool EmitInterlockedCompareAndSet(RuntimeJavaMethod method, string fieldName, CodeEmitter ilGenerator) { if (method.ReturnType != context.PrimitiveJavaTypeFactory.BOOLEAN) - { return false; - } - RuntimeJavaType[] parameters = method.GetParameters(); + + var parameters = method.GetParameters(); RuntimeJavaType target; int firstValueIndex; + if (method.IsStatic) { if (parameters.Length != 3) - { return false; - } + target = parameters[0]; firstValueIndex = 1; } else { if (parameters.Length != 2) - { return false; - } + target = method.DeclaringType; firstValueIndex = 0; } + if (target.IsUnloadable || target.IsPrimitive || target.IsNonPrimitiveValueType || target.IsGhost) { return false; } + var fieldType = parameters[firstValueIndex]; if (fieldType != parameters[firstValueIndex + 1]) { @@ -910,34 +910,32 @@ private bool EmitInterlockedCompareAndSet(RuntimeJavaMethod method, string field { return false; } + RuntimeJavaField casField = null; foreach (var fw in target.GetFields()) { if (fw.Name == fieldName) { if (casField != null) - { return false; - } + casField = fw; } } + if (casField == null) - { return false; - } + if (casField.IsStatic) - { return false; - } + + casField.Link(); if (casField.FieldTypeWrapper != fieldType) - { return false; - } + if (casField.IsPropertyAccessor) - { return false; - } + if (casField.DeclaringType.TypeAsBaseType == typeBuilder.DeclaringType) { // allow access to fields in outer class @@ -946,7 +944,7 @@ private bool EmitInterlockedCompareAndSet(RuntimeJavaMethod method, string field { return false; } - casField.Link(); + FieldInfo fi = casField.GetField(); if (fi == null) { diff --git a/src/IKVM.Runtime/RuntimeByteCodeJavaType.JavaTypeImpl.DelegateInvokeStubMethodWrapper.cs b/src/IKVM.Runtime/RuntimeByteCodeJavaType.JavaTypeImpl.DelegateInvokeStubMethodWrapper.cs index 7a0d1e065d..9ad510cc31 100644 --- a/src/IKVM.Runtime/RuntimeByteCodeJavaType.JavaTypeImpl.DelegateInvokeStubMethodWrapper.cs +++ b/src/IKVM.Runtime/RuntimeByteCodeJavaType.JavaTypeImpl.DelegateInvokeStubMethodWrapper.cs @@ -95,6 +95,7 @@ internal MethodInfo DoLink(TypeBuilder tb) ilgen.Emit(OpCodes.Stelem, elemType); } } + ilgen.BeginExceptionBlock(); ilgen.Emit(OpCodes.Ldarg_0); for (int i = 0; i < parameters.Length; i++) diff --git a/src/IKVM.Runtime/RuntimeContext.cs b/src/IKVM.Runtime/RuntimeContext.cs index 9c490f7fd5..84eeed4a74 100644 --- a/src/IKVM.Runtime/RuntimeContext.cs +++ b/src/IKVM.Runtime/RuntimeContext.cs @@ -22,6 +22,7 @@ namespace IKVM.Runtime class RuntimeContext { + readonly RuntimeContextOptions options; readonly IManagedTypeResolver resolver; readonly bool bootstrap; readonly ConcurrentDictionary singletons = new ConcurrentDictionary(); @@ -73,8 +74,9 @@ class RuntimeContext /// /// /// - public RuntimeContext(IManagedTypeResolver resolver, bool bootstrap, StaticCompiler staticCompiler) + public RuntimeContext(RuntimeContextOptions options, IManagedTypeResolver resolver, bool bootstrap, StaticCompiler staticCompiler) { + this.options = options ?? throw new ArgumentNullException(nameof(options)); this.resolver = resolver ?? throw new ArgumentNullException(nameof(resolver)); this.bootstrap = bootstrap; this.staticCompiler = staticCompiler; @@ -85,10 +87,12 @@ public RuntimeContext(IManagedTypeResolver resolver, bool bootstrap, StaticCompi /// /// Initializes a new instance. /// + /// /// /// - public RuntimeContext(IManagedTypeResolver resolver, bool bootstrap) + public RuntimeContext(RuntimeContextOptions options, IManagedTypeResolver resolver, bool bootstrap) { + this.options = options ?? throw new ArgumentNullException(nameof(options)); this.resolver = resolver ?? throw new ArgumentNullException(nameof(resolver)); this.bootstrap = bootstrap; } @@ -103,6 +107,11 @@ public RuntimeContext(IManagedTypeResolver resolver, bool bootstrap) /// public T GetOrCreateSingleton(Func create) => (T)singletons.GetOrAdd(typeof(T), _ => create()); + /// + /// Gets the associated with this instance of the runtime. + /// + public RuntimeContextOptions Options => options; + /// /// Gets the associated with this instance of the runtime. /// diff --git a/src/IKVM.Runtime/RuntimeContextOptions.cs b/src/IKVM.Runtime/RuntimeContextOptions.cs new file mode 100644 index 0000000000..c89914b558 --- /dev/null +++ b/src/IKVM.Runtime/RuntimeContextOptions.cs @@ -0,0 +1,31 @@ +namespace IKVM.Runtime +{ + + internal class RuntimeContextOptions + { + +#if NETFRAMEWORK + internal const string DefaultDynamicAssemblySuffixAndPublicKey = "-ikvm-runtime-injected, PublicKey=00240000048000009400000006020000002400005253413100040000010001009D674F3D63B8D7A4C428BD7388341B025C71AA61C6224CD53A12C21330A3159D300051FE2EED154FE30D70673A079E4529D0FD78113DCA771DA8B0C1EF2F77B73651D55645B0A4294F0AF9BF7078432E13D0F46F951D712C2FCF02EB15552C0FE7817FC0AED58E0984F86661BF64D882F29B619899DD264041E7D4992548EB9E"; +#else + internal const string DefaultDynamicAssemblySuffixAndPublicKey = "-ikvm-runtime-injected"; +#endif + + readonly string dynamicAssemblySuffixAndPublicKey; + + /// + /// Initializes a new instance. + /// + /// + public RuntimeContextOptions(string dynamicAssemblySuffixAndPublicKey = null) + { + this.dynamicAssemblySuffixAndPublicKey = dynamicAssemblySuffixAndPublicKey ?? DefaultDynamicAssemblySuffixAndPublicKey; + } + + /// + /// Gets the suffix and public key to add to dynamically generated assemblies. + /// + public string DynamicAssemblySuffixAndPublicKey => dynamicAssemblySuffixAndPublicKey; + + } + +} diff --git a/src/IKVM.Runtime/RuntimeJavaMethod.cs b/src/IKVM.Runtime/RuntimeJavaMethod.cs index 3c63ec567a..882a49d12a 100644 --- a/src/IKVM.Runtime/RuntimeJavaMethod.cs +++ b/src/IKVM.Runtime/RuntimeJavaMethod.cs @@ -346,6 +346,7 @@ internal void AssertLinked() { Tracer.Error(Tracer.Runtime, "AssertLinked failed: " + this.DeclaringType.Name + "::" + this.Name + this.Signature); } + Debug.Assert(parameterTypeWrappers != null && returnTypeWrapper != null, this.DeclaringType.Name + "::" + this.Name + this.Signature); } diff --git a/src/IKVM.Tests.Util/DotNetSdkResolver.cs b/src/IKVM.Tests.Util/DotNetSdkResolver.cs new file mode 100644 index 0000000000..73db3b6cbb --- /dev/null +++ b/src/IKVM.Tests.Util/DotNetSdkResolver.cs @@ -0,0 +1,143 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +using CliWrap; + +namespace IKVM.Tests.Util +{ + + /// + /// Provides a method to rsolve the current .NET SDK. + /// + public static class DotNetSdkResolver + { + + public static string ResolvePath(string dotnetExePath) + { + var output = GetInfo(dotnetExePath ?? "dotnet"); + if (output == null || output.Count == 0) + return null; + + // parse output for base path + var basePath = ParseBasePath(output) ?? ParseInstalledSdksPath(output); + if (string.IsNullOrWhiteSpace(basePath)) + return null; + + return basePath; + } + + /// + /// Invokes the 'dotnet' exe and captures its output. + /// + /// + /// + static List GetInfo(string dotnetExePath) + { + // Ensure that we set the DOTNET_CLI_UI_LANGUAGE environment variable to "en-US" before + // running 'dotnet --info'. Otherwise, we may get localized results + // Also unset some MSBuild variables, see https://github.com/OmniSharp/omnisharp-roslyn/blob/df160f86ce906bc566fe3e04e38a4077bd6023b4/src/OmniSharp.Abstractions/Services/DotNetCliService.cs#L36 + var environmentVariables = new Dictionary + { + ["DOTNET_CLI_UI_LANGUAGE"] = "en-US", + ["MSBUILD_EXE_PATH"] = null, + ["COREHOST_TRACE"] = "0", + ["MSBuildExtensionsPath"] = null, + }; + + var lines = new List(); + var task = (Cli.Wrap(dotnetExePath) + .WithArguments("--info") + .WithEnvironmentVariables(environmentVariables) + | lines.Add) + .ExecuteAsync(new CancellationTokenSource(10000).Token); + task.GetAwaiter().GetResult(); + + return lines; + } + + /// + /// Searches the 'dotnet' executable output for the base path. + /// + /// + /// + static string ParseBasePath(List lines) + { + foreach (var line in lines.Where(x => x != null)) + { + var colonIndex = line.IndexOf(':'); + if (colonIndex >= 0 && line.Substring(0, colonIndex).Trim().Equals("Base Path", StringComparison.OrdinalIgnoreCase)) + { + var basePath = line.Substring(colonIndex + 1).Trim(); + + // Make sure the base path matches the runtime architecture if on Windows + // Note that this only works for the default installation locations under "Program Files" + if (basePath.Contains(@"\Program Files\") && !System.Environment.Is64BitProcess) + { + var newBasePath = basePath.Replace(@"\Program Files\", @"\Program Files (x86)\"); + if (Directory.Exists(newBasePath)) + basePath = newBasePath; + } + else if (basePath.Contains(@"\Program Files (x86)\") && System.Environment.Is64BitProcess) + { + var newBasePath = basePath.Replace(@"\Program Files (x86)\", @"\Program Files\"); + if (Directory.Exists(newBasePath)) + basePath = newBasePath; + } + + return basePath; + } + } + + return null; + } + + /// + /// Parse the 'dotnet' executable output for the fallback path by considering SDKs. + /// + /// + /// + /// + static string ParseInstalledSdksPath(List lines) + { + var index = lines.IndexOf(".NET SDKs installed:"); + if (index == -1) + { + index = lines.IndexOf(".NET Core SDKs installed:"); + if (index == -1) + return null; + } + + index++; + + while (true) + { + if (index >= lines.Count - 1) + throw new InvalidOperationException("Could not find the .NET SDK."); + + // Not a version number or an empty string? + var temp = lines[index].Trim(); + if (string.IsNullOrWhiteSpace(temp) || !char.IsDigit(temp[0])) + { + index--; + break; + } + + index++; + } + + var segments = lines[index] + .Split(new[] { '[', ']' }, StringSplitOptions.RemoveEmptyEntries) + .Where(x => !string.IsNullOrWhiteSpace(x)) + .Select(x => x.Trim()) + .ToArray(); + + return $"{segments[1]}{Path.DirectorySeparatorChar}{segments[0]}{Path.DirectorySeparatorChar}"; + } + + } + +} diff --git a/src/IKVM.Tests.Util/DotNetSdkUtil.cs b/src/IKVM.Tests.Util/DotNetSdkUtil.cs new file mode 100644 index 0000000000..64574f6f2c --- /dev/null +++ b/src/IKVM.Tests.Util/DotNetSdkUtil.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection.Metadata; +using System.Reflection.PortableExecutable; + +using Microsoft.Build.Utilities; + +namespace IKVM.Tests.Util +{ + public static class DotNetSdkUtil + { + + /// + /// Returns true if the given file is an assembly. + /// + /// + /// + public static bool IsAssembly(string path) + { + try + { + using var st = File.OpenRead(path); + using var pe = new PEReader(st); + var md = pe.GetMetadataReader(); + md.GetAssemblyDefinition(); + return true; + } + catch + { + return false; + } + } + + /// + /// Gets the paths to the reference assemblies of the specified TFM for the target framework. + /// + /// + /// + /// + /// + /// + public static IList GetPathToReferenceAssemblies(string tfm, string targetFrameworkIdentifier, string targetFrameworkVersion) + { + if (targetFrameworkIdentifier == ".NETFramework") + return ToolLocationHelper.GetPathToReferenceAssemblies(targetFrameworkIdentifier, targetFrameworkVersion, ""); + if (targetFrameworkIdentifier == ".NETCore") + return GetCorePathToReferenceAssemblies(tfm, targetFrameworkVersion); + + throw new InvalidOperationException(); + } + + /// + /// Discovers the reference assembly paths for .NET Core TFM and framework version. + /// + /// + /// + /// + /// + static IList GetCorePathToReferenceAssemblies(string tfm, string targetFrameworkVersion) + { + // parse requested version + if (Version.TryParse(targetFrameworkVersion, out var targetVer) == false) + throw new InvalidOperationException(); + + // back up to pack directory and get list of ref packs + var sdkBase = DotNetSdkResolver.ResolvePath(null) ?? throw new InvalidOperationException(); + var packDir = Path.Combine(sdkBase, "..", "..", "packs", "Microsoft.NETCore.App.Ref"); + var sdkVers = Directory.EnumerateDirectories(packDir).Select(Path.GetFileName); + + // identify maximum matching version + var thisVer = new Version(0, 0); + foreach (var ver in sdkVers) + if (Version.TryParse(ver, out var v)) + if (v > thisVer && v.Major == targetVer.Major && v.Minor == targetVer.Minor) + thisVer = v; + + // no higher version found + if (thisVer == new Version(0, 0)) + return null; + + // check for TFM refs directory + var refsDir = Path.Combine(packDir, thisVer.ToString(), "ref", tfm); + if (Directory.Exists(refsDir) == false) + throw new InvalidOperationException(); + + // find all ref assemblies + return new[] { refsDir }; + } + + } + +} diff --git a/src/IKVM.Tests.Util/IKVM.Tests.Util.csproj b/src/IKVM.Tests.Util/IKVM.Tests.Util.csproj index 2cbd73255a..1ea6976b32 100644 --- a/src/IKVM.Tests.Util/IKVM.Tests.Util.csproj +++ b/src/IKVM.Tests.Util/IKVM.Tests.Util.csproj @@ -1,8 +1,14 @@  - net461;netcoreapp3.1 + net461;net6.0;net7.0 + + + + + + diff --git a/src/IKVM.Tests/IKVM.Tests.csproj b/src/IKVM.Tests/IKVM.Tests.csproj index 4cbce60393..b6a6180cf8 100644 --- a/src/IKVM.Tests/IKVM.Tests.csproj +++ b/src/IKVM.Tests/IKVM.Tests.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1;net6.0;net7.0 + net461;net6.0;net7.0 true true false @@ -25,9 +25,8 @@ - - + @@ -62,74 +61,82 @@ TargetFramework=netcoreapp3.1 lib\netcoreapp3.1\ + + TargetFramework=net6.0 + lib\net6.0\ + + + TargetFramework=net6.0 + lib\net6.0\ + - TargetFramework=net461 + TargetFramework=net472 RuntimeIdentifier=win7-x64 - ikvmc\net461\win7-x64 + ikvmc\net472\win7-x64 - TargetFramework=net461 + TargetFramework=net472 RuntimeIdentifier=win7-x64 - ikvmstub\net461\win7-x64 + ikvmstub\net472\win7-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=win7-x64 - ikvmc\netcoreapp3.1\win7-x64 + ikvmc\net6.0\win7-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=win7-x64 - ikvmstub\netcoreapp3.1\win7-x64 + ikvmstub\net6.0\win7-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-x64 - ikvmc\netcoreapp3.1\linux-x64 + ikvmc\net6.0\linux-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-x64 - ikvmstub\netcoreapp3.1\linux-x64 + ikvmstub\net6.0\linux-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-arm - ikvmc\netcoreapp3.1\linux-arm + ikvmc\net6.0\linux-arm - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-arm - ikvmstub\netcoreapp3.1\linux-arm + ikvmstub\net6.0\linux-arm - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-arm64 - ikvmc\netcoreapp3.1\linux-arm64 + ikvmc\net6.0\linux-arm64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-arm64 - ikvmstub\netcoreapp3.1\linux-arm64 + ikvmstub\net6.0\linux-arm64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=osx-x64 - ikvmc\netcoreapp3.1\osx-x64 + ikvmc\net6.0\osx-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=osx-x64 - ikvmstub\netcoreapp3.1\osx-x64 + ikvmstub\net6.0\osx-x64 diff --git a/src/IKVM.Tests/Java/ikvm/runtime/AssemblyClassLoaderTests.cs b/src/IKVM.Tests/Java/ikvm/runtime/AssemblyClassLoaderTests.cs index 4b2856bcda..d28c6ed6eb 100644 --- a/src/IKVM.Tests/Java/ikvm/runtime/AssemblyClassLoaderTests.cs +++ b/src/IKVM.Tests/Java/ikvm/runtime/AssemblyClassLoaderTests.cs @@ -1,14 +1,17 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Threading.Tasks; using FluentAssertions; +using IKVM.Runtime.Extensions; +using IKVM.Tests.Util; using IKVM.Tools.Runner; -using IKVM.Tools.Runner.Compiler; +using IKVM.Tools.Runner.Importer; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -19,6 +22,8 @@ namespace IKVM.Tests.Java.ikvm.runtime public class AssemblyClassLoaderTests { + static readonly string TESTBASE = Path.GetDirectoryName(typeof(AssemblyClassLoaderTests).Assembly.Location); + Assembly helloworldDll; public TestContext TestContext { get; set; } @@ -30,10 +35,20 @@ public class AssemblyClassLoaderTests [TestInitialize] public async Task Setup() { -#if NETCOREAPP - var tfm = "netcoreapp3.1"; -#else - var tfm = "net461"; +#if NET7_0 + var ikvmTool = "net6.0"; + var ikvmLibs = Path.Combine(TESTBASE, "lib", "net6.0"); + var libPaths = DotNetSdkUtil.GetPathToReferenceAssemblies("net7.0", ".NETCore", "7.0"); +#endif +#if NET6_0 + var ikvmTool = "net6.0"; + var ikvmLibs = Path.Combine(TESTBASE, "lib", "net6.0"); + var libPaths = DotNetSdkUtil.GetPathToReferenceAssemblies("net6.0", ".NETCore", "6.0"); +#endif +#if NET461 + var ikvmTool = "net472"; + var ikvmLibs = Path.Combine(TESTBASE, "lib", "net461"); + var libPaths = DotNetSdkUtil.GetPathToReferenceAssemblies("net461", ".NETFramework", "4.7.2"); #endif var n = Guid.NewGuid().ToString("n"); @@ -45,25 +60,24 @@ public async Task Setup() rid = "win7-x64"; if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) rid = "linux-x64"; + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + rid = "osx-x64"; var e = new List(); - var l = new IkvmCompilerLauncher(Path.Combine(Path.GetDirectoryName(typeof(AssemblyClassLoaderTests).Assembly.Location), "ikvmc", tfm, rid), new IkvmToolDelegateDiagnosticListener(evt => { e.Add(evt); TestContext.WriteLine(evt.Message, evt.MessageArgs); })); - var o = new IkvmCompilerOptions() + var l = new IkvmImporterLauncher(Path.Combine(Path.GetDirectoryName(typeof(AssemblyClassLoaderTests).Assembly.Location), "ikvmc", ikvmTool, rid), new IkvmToolDelegateDiagnosticListener(evt => { e.Add(evt); TestContext.WriteLine(evt.Message, evt.MessageArgs); })); + var z = libPaths.Append(ikvmLibs).ToArray(); + var o = new IkvmImporterOptions() { - Runtime = Path.Combine("lib", tfm, "IKVM.Runtime.dll"), + Runtime = Path.Combine(ikvmLibs, "IKVM.Runtime.dll"), ResponseFile = $"{n}_ikvmc.rsp", Input = { Path.Combine("helloworld", "helloworld-2.0.jar") }, Assembly = $"helloworld_{n}", Version = "1.0.0.0", NoStdLib = true, Output = p, + Lib = z }; - o.References.Add(Path.Combine("lib", tfm, "IKVM.Java.dll")); - o.References.Add(Path.Combine("lib", tfm, "IKVM.Runtime.dll")); - foreach (var f in Directory.GetFiles(l.GetReferenceAssemblyDirectory())) - o.References.Add(f); - var exitCode = await l.ExecuteAsync(o); exitCode.Should().Be(0); @@ -71,7 +85,7 @@ public async Task Setup() } [TestMethod] - public void Can_get_package() + public void CanGetPackage() { var t = helloworldDll.GetType("sample.HelloworldImpl"); var k = ((global::java.lang.Class)t).getPackage(); @@ -79,7 +93,7 @@ public void Can_get_package() } [TestMethod] - public void Can_get_resource() + public void CanGetResource() { var t = helloworldDll.GetType("sample.HelloworldImpl"); var k = ((global::java.lang.Class)t).getResource("/helloworld.composite"); diff --git a/src/IKVM.Tests/Java/java/net/DatagramSocketTests.cs b/src/IKVM.Tests/Java/java/net/DatagramSocketTests.cs index 06aa099105..8180377632 100644 --- a/src/IKVM.Tests/Java/java/net/DatagramSocketTests.cs +++ b/src/IKVM.Tests/Java/java/net/DatagramSocketTests.cs @@ -20,7 +20,7 @@ public class DatagramSocketTests { [TestMethod] - public void Can_listen_on_any() + public void CanListenOnAny() { using var s = new global::java.net.DatagramSocket(0); s.isClosed().Should().BeFalse(); @@ -33,7 +33,7 @@ public void Can_listen_on_any() } [TestMethod] - public void Can_listen_on_specific() + public void CanListenOnPort() { using var s = new global::java.net.DatagramSocket(42343); s.isClosed().Should().BeFalse(); @@ -46,7 +46,7 @@ public void Can_listen_on_specific() } [TestMethod] - public void Can_listen_on_wildcard() + public void CanListenOnWildcard() { using var s = new global::java.net.DatagramSocket(40104, global::java.net.InetAddress.getByName("0.0.0.0")); s.isClosed().Should().BeFalse(); @@ -229,30 +229,30 @@ public void ReuseBuffer() } [TestMethod] - public void ShouldAbortCancelWhenClosed() + public void ShouldThrowWhenClosedOnReceive() { - using var ds = new DatagramSocket(0); - var ex = (SocketException)null; - - var task = Task.Run(() => - { - try - { - var p = new DatagramPacket(new byte[100], 100); - ds.receive(p); - } - catch (SocketException e) - { - ex = e; - } - }); + using var s = new DatagramSocket(0); + var p = new DatagramPacket(new byte[1024], 1024); + var task = Task.Run(() => s.receive(p)); global::java.lang.Thread.sleep(1000); - ds.close(); + s.close(); global::java.lang.Thread.sleep(1000); - task.Wait(); + task.Invoking(t => t.Wait()).Should().Throw(); + } - ex.Should().BeAssignableTo(); + [TestMethod] + public void ShouldThrowWhenClosedOnReceiveWithTimeout() + { + using var s = new DatagramSocket(0); + s.setSoTimeout(5000); + var p = new DatagramPacket(new byte[1024], 1024); + var task = Task.Run(() => s.receive(p)); + + global::java.lang.Thread.sleep(1000); + s.close(); + global::java.lang.Thread.sleep(1000); + task.Invoking(t => t.Wait()).Should().Throw(); } [TestMethod] diff --git a/src/IKVM.Tests/Java/java/net/SocketTests.cs b/src/IKVM.Tests/Java/java/net/SocketTests.cs index 6443a6119f..7df749ef22 100644 --- a/src/IKVM.Tests/Java/java/net/SocketTests.cs +++ b/src/IKVM.Tests/Java/java/net/SocketTests.cs @@ -1,4 +1,5 @@ using System.Linq; +using System.Threading.Tasks; using FluentAssertions; @@ -81,6 +82,79 @@ public void ConnectWithNoListeningServerShouldThrowConnectException() client.connect(new InetSocketAddress(InetAddress.getByName("127.0.0.1"), port), 8888); } + [TestMethod] + public void ShouldThrowSocketExceptionWhenClosedDuringRead() + { + var b = false; + + var ss = new ServerSocket(0); + var lh = InetAddress.getLocalHost(); + var s = new Socket(); + s.connect(new InetSocketAddress(lh, ss.getLocalPort())); + + var s2 = ss.accept(); + var t = Task.Run(() => + { + try + { + var i = s.getInputStream(); + var n = i.read(); + throw new System.Exception(); + } + catch (SocketException) + { + b = true; + } + catch (Exception) + { + throw; + } + }); + + Thread.sleep(1000); + s.close(); + Thread.sleep(1000); + b.Should().BeTrue(); + t.Wait(); + } + + [TestMethod] + public void ShouldThrowSocketExceptionWhenClosedDuringReadWithTimeout() + { + var b = false; + + var ss = new ServerSocket(0); + var lh = InetAddress.getLocalHost(); + var s = new Socket(); + s.connect(new InetSocketAddress(lh, ss.getLocalPort())); + + var s2 = ss.accept(); + var t = Task.Run(() => + { + try + { + s.setSoTimeout(5000); + var i = s.getInputStream(); + var n = i.read(); + throw new System.Exception(); + } + catch (SocketException) + { + b = true; + } + catch (Exception) + { + throw; + } + }); + + Thread.sleep(1000); + s.close(); + Thread.sleep(1000); + b.Should().BeTrue(); + t.Wait(); + } + } } diff --git a/src/IKVM.Tests/Java/java/nio/channels/FileChannelTests.cs b/src/IKVM.Tests/Java/java/nio/channels/FileChannelTests.cs index 1d7c8a5a45..a4a6e32d1f 100644 --- a/src/IKVM.Tests/Java/java/nio/channels/FileChannelTests.cs +++ b/src/IKVM.Tests/Java/java/nio/channels/FileChannelTests.cs @@ -181,6 +181,8 @@ public void CanTransferFromFileInputStreamToFileOutputStream() using var dstChannel = dstStream.getChannel(); var n = dstChannel.transferFrom(srcChannel, 0, int.MaxValue); + n.Should().Be(1024); + srcChannel.position().Should().Be(1024); var f1 = Files.readAllBytes(srcPath.toPath()); var f2 = Files.readAllBytes(dstPath.toPath()); @@ -204,6 +206,8 @@ public void CanTransferToFileInputStreamFromFileOutputStream() using var dstChannel = dstStream.getChannel(); var n = srcChannel.transferTo(0, int.MaxValue, dstChannel); + n.Should().Be(1024); + dstChannel.position().Should().Be(1024); var f1 = Files.readAllBytes(srcPath.toPath()); var f2 = Files.readAllBytes(dstPath.toPath()); @@ -227,6 +231,8 @@ public void CanTransferToFileOutputStreamFromRandomAccessFile() using var dstChannel = dstStream.getChannel(); var n = srcChannel.transferTo(0, int.MaxValue, dstChannel); + n.Should().Be(1024); + dstChannel.position().Should().Be(1024); var f1 = Files.readAllBytes(srcPath.toPath()); var f2 = Files.readAllBytes(dstPath.toPath()); @@ -250,6 +256,8 @@ public void CanTransferToRandomAccessFileFromFileOutputStream() using var dstChannel = dstFile.getChannel(); var n = srcChannel.transferTo(0, int.MaxValue, dstChannel); + n.Should().Be(1024); + dstChannel.position().Should().Be(1024); var f1 = Files.readAllBytes(srcPath.toPath()); var f2 = Files.readAllBytes(dstPath.toPath()); @@ -273,6 +281,8 @@ public void CanTransferToRandomAccessFileFromRandomAccessFile() using var dstChannel = dstFile.getChannel(); var n = srcChannel.transferTo(0, int.MaxValue, dstChannel); + n.Should().Be(1024); + dstChannel.position().Should().Be(1024); var f1 = Files.readAllBytes(srcPath.toPath()); var f2 = Files.readAllBytes(dstPath.toPath()); diff --git a/src/IKVM.Tools.Exporter.Tests/IKVM.Tools.Exporter.Tests.csproj b/src/IKVM.Tools.Exporter.Tests/IKVM.Tools.Exporter.Tests.csproj index 6f57792eba..fc2a418c0c 100644 --- a/src/IKVM.Tools.Exporter.Tests/IKVM.Tools.Exporter.Tests.csproj +++ b/src/IKVM.Tools.Exporter.Tests/IKVM.Tools.Exporter.Tests.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net472;net6.0 true @@ -22,4 +22,31 @@ + + + TargetFramework=net461 + lib\net461\ + + + TargetFramework=net461 + lib\net461\ + + + TargetFramework=netcoreapp3.1 + lib\netcoreapp3.1\ + + + TargetFramework=netcoreapp3.1 + lib\netcoreapp3.1\ + + + TargetFramework=net6.0 + lib\net6.0\ + + + TargetFramework=net6.0 + lib\net6.0\ + + + \ No newline at end of file diff --git a/src/IKVM.Tools.Exporter/IKVM.Tools.Exporter.csproj b/src/IKVM.Tools.Exporter/IKVM.Tools.Exporter.csproj index 2455ac344e..710fa48800 100644 --- a/src/IKVM.Tools.Exporter/IKVM.Tools.Exporter.csproj +++ b/src/IKVM.Tools.Exporter/IKVM.Tools.Exporter.csproj @@ -1,13 +1,14 @@  - net461;netcoreapp3.1 + net472;net6.0 $(DefineConstants);EXPORTER true - + true + @@ -86,6 +87,7 @@ + diff --git a/src/IKVM.Tools.Exporter/IkvmExporterInternal.cs b/src/IKVM.Tools.Exporter/IkvmExporterInternal.cs index 4ea6cc6483..dcf4cc121c 100644 --- a/src/IKVM.Tools.Exporter/IkvmExporterInternal.cs +++ b/src/IKVM.Tools.Exporter/IkvmExporterInternal.cs @@ -3,6 +3,9 @@ using System.IO; using System.IO.Compression; using System.Linq; +using System.Reflection.Metadata; +using System.Reflection.PortableExecutable; +using System.Security.Cryptography.Xml; using IKVM.Reflection; using IKVM.Runtime; @@ -116,8 +119,16 @@ public static int Execute(IkvmExporterOptions options) references.Add(options.Assembly); } + // discover the core lib from the references + var coreLibName = FindCoreLibName(references, libpaths); + if (coreLibName == null) + { + Console.Error.WriteLine("Error: core library not found"); + return 1; + } + // build universe and resolver against universe and references - var universe = new Universe(); + var universe = new Universe(coreLibName); var assemblyResolver = new AssemblyResolver(); assemblyResolver.Warning += new AssemblyResolver.WarningEvent(Resolver_Warning); assemblyResolver.Init(universe, options.NoStdLib, references, libpaths); @@ -180,7 +191,7 @@ public static int Execute(IkvmExporterOptions options) } compiler = new StaticCompiler(universe, assemblyResolver, runtimeAssembly); - context = new RuntimeContext(new ManagedResolver(compiler, null), true, compiler); + context = new RuntimeContext(new RuntimeContextOptions(), new ManagedResolver(compiler, null), true, compiler); context.ClassLoaderFactory.SetBootstrapClassLoader(new RuntimeBootstrapClassLoader(context)); } else @@ -207,7 +218,7 @@ public static int Execute(IkvmExporterOptions options) } compiler = new StaticCompiler(universe, assemblyResolver, runtimeAssembly); - context = new RuntimeContext(new ManagedResolver(compiler, baseAssembly), false, compiler); + context = new RuntimeContext(new RuntimeContextOptions(), new ManagedResolver(compiler, baseAssembly), false, compiler); } if (context.AttributeHelper.IsJavaModule(assembly.ManifestModule)) @@ -266,6 +277,57 @@ public static int Execute(IkvmExporterOptions options) return rc; } + /// + /// Finds the first potential core library in the reference set. + /// + /// + /// + /// + static string FindCoreLibName(List references, List libpaths) + { + foreach (var reference in references) + if (GetAssemblyNameIfCoreLib(reference) is string coreLibName) + return coreLibName; + + return null; + } + + /// + /// Returns true if the given assembly is a core library. + /// + /// + /// + static string GetAssemblyNameIfCoreLib(string path) + { + if (File.Exists(path) == false) + return null; + + using var st = File.OpenRead(path); + using var pe = new PEReader(st); + var mr = pe.GetMetadataReader(); + + foreach (var handle in mr.TypeDefinitions) + if (IsSystemObject(mr, handle)) + return mr.GetString(mr.GetAssemblyDefinition().Name); + + return null; + } + + /// + /// Returns true if the given type definition handle refers to "System.Object". + /// + /// + /// + /// + static bool IsSystemObject(MetadataReader reader, TypeDefinitionHandle th) + { + var td = reader.GetTypeDefinition(th); + var ns = reader.GetString(td.Namespace); + var nm = reader.GetString(td.Name); + + return ns == "System" && nm == "Object"; + } + static void Resolver_Warning(AssemblyResolver.WarningId warning, string message, string[] parameters) { if (warning != AssemblyResolver.WarningId.HigherVersion) diff --git a/src/IKVM.Tools.Importer.Tests/IKVM.Tools.Importer.Tests.csproj b/src/IKVM.Tools.Importer.Tests/IKVM.Tools.Importer.Tests.csproj index 06323f21b9..ecf57ae729 100644 --- a/src/IKVM.Tools.Importer.Tests/IKVM.Tools.Importer.Tests.csproj +++ b/src/IKVM.Tools.Importer.Tests/IKVM.Tools.Importer.Tests.csproj @@ -1,7 +1,6 @@  - net461;netcoreapp3.1 - true + net472;net6.0 @@ -32,4 +31,31 @@ + + + TargetFramework=net461 + lib\net461\ + + + TargetFramework=net461 + lib\net461\ + + + TargetFramework=netcoreapp3.1 + lib\netcoreapp3.1\ + + + TargetFramework=netcoreapp3.1 + lib\netcoreapp3.1\ + + + TargetFramework=net6.0 + lib\net6.0\ + + + TargetFramework=net6.0 + lib\net6.0\ + + + \ No newline at end of file diff --git a/src/IKVM.Tools.Importer.Tests/IkvmImporterTests.cs b/src/IKVM.Tools.Importer.Tests/IkvmImporterTests.cs index 106706cd3e..bf3093d2ea 100644 --- a/src/IKVM.Tools.Importer.Tests/IkvmImporterTests.cs +++ b/src/IKVM.Tools.Importer.Tests/IkvmImporterTests.cs @@ -1,6 +1,6 @@ using System; +using System.Collections.Generic; using System.IO; -using System.Linq; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; @@ -22,9 +22,21 @@ namespace IKVM.Tools.Importer.Tests public class IkvmImporterTests { - [TestMethod] - public async Task CanImportSimpleTest() + static readonly string TESTBASE = Path.GetDirectoryName(typeof(IkvmImporterTests).Assembly.Location); + + [DataTestMethod] + [DataRow("net461", "net472", ".NETFramework", "4.7.2")] + [DataRow("net461", "net481", ".NETFramework", "4.8.1")] + [DataRow("netcoreapp3.1", "netcoreapp3.1", ".NETCore", "3.1")] + [DataRow("net6.0", "net6.0", ".NETCore", "6.0")] + [DataRow("net6.0", "net7.0", ".NETCore", "7.0")] + public async Task CanImportSimpleTest(string ikvmFramework, string targetFramework, string targetFrameworkIdentifier, string targetFrameworkVersion) { + if (targetFramework == "netcoreapp3.1" && RuntimeInformation.IsOSPlatform(OSPlatform.Windows) == false) + return; + if (targetFrameworkIdentifier == ".NETFramework" && RuntimeInformation.IsOSPlatform(OSPlatform.Windows) == false) + return; + var s = new StreamReader(typeof(IkvmImporterTests).Assembly.GetManifestResourceStream("IKVM.Tools.Importer.Tests.IkvmImporterTests.java")).ReadToEnd(); var f = new InMemoryCodeUnit("ikvm.tools.importer.tests.IkvmImporterTests", s); var c = new InMemoryCompiler(new[] { f }); @@ -32,16 +44,29 @@ public async Task CanImportSimpleTest() var j = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("n") + ".jar"); c.WriteJar(j); -#if NETFRAMEWORK - var a = new[] { $"-lib:{RuntimeEnvironment.GetRuntimeDirectory()}" }; -#else - var a = DependencyContext.Default.CompileLibraries.SelectMany(i => i.ResolveReferencePaths()).Select(i => $"-r:{i}"); -#endif + var ikvmLibs = Path.Combine(TESTBASE, "lib", ikvmFramework); + var libPaths = DotNetSdkUtil.GetPathToReferenceAssemblies(targetFramework, targetFrameworkIdentifier, targetFrameworkVersion); + // add references to libraries var asm = Path.ChangeExtension(j, ".dll"); - var ret = await IkvmImporterTool.Main(a.Concat(new[] { "-nostdlib", "-assembly:IKVM.Tools.Importer.Tests.Java", $"-out:{asm}", j }).ToArray(), CancellationToken.None); + var args = new List(); + foreach (var i in libPaths) + args.Add($"-lib:{i}"); + foreach (var dll in Directory.GetFiles(ikvmLibs, "*.dll")) + args.Add($"-reference:{dll}"); + + // add additional command options + args.Add($"-runtime:{Path.Combine(ikvmLibs, "IKVM.Runtime.dll")}"); + args.Add("-nostdlib"); + args.Add("-assembly:IKVM.Tools.Importer.Tests.Java"); + args.Add($"-out:{asm}"); + args.Add(j); + + // initiate the import + var ret = await IkvmImporterTool.Main(args.ToArray(), CancellationToken.None); ret.Should().Be(0); File.Exists(asm).Should().BeTrue(); + new FileInfo(asm).Length.Should().BeGreaterThanOrEqualTo(128); } } diff --git a/src/IKVM.Tools.Importer/AssemblyResolver.cs b/src/IKVM.Tools.Importer/AssemblyResolver.cs index 2fcffc42d9..42f98e00cc 100644 --- a/src/IKVM.Tools.Importer/AssemblyResolver.cs +++ b/src/IKVM.Tools.Importer/AssemblyResolver.cs @@ -71,19 +71,11 @@ internal void Init(Universe universe, bool nostdlib, IList references, I // (note that, unlike the C# compiler, we don't add the CLR directory if -nostdlib has been specified) libpath.Add(Environment.CurrentDirectory); - if (!nostdlib) - { - //#if NETCOREAPP3_1 - // libpath.Add(Universe.ReferenceAssembliesDirectory); - //#else + if (nostdlib == false) libpath.Add(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()); - //#endif - } - foreach (string str in userLibPaths) - { + foreach (var str in userLibPaths) AddLibraryPaths(str, true); - } AddLibraryPaths(Environment.GetEnvironmentVariable("LIB") ?? "", false); @@ -93,7 +85,7 @@ internal void Init(Universe universe, bool nostdlib, IList references, I } else { - coreLibVersion = universe.Load(Universe.CoreLibName).GetName().Version; + coreLibVersion = universe.Load(universe.CoreLibName).GetName().Version; } #if IMPORTER @@ -115,7 +107,7 @@ internal Assembly LoadFile(string path) // to avoid problems (i.e. weird exceptions), we don't allow assemblies to load that reference a newer version of mscorlib foreach (AssemblyName asmref in module.GetReferencedAssemblies()) { - if (asmref.Name == Universe.CoreLibName && asmref.Version > coreLibVersion) + if (asmref.Name == universe.CoreLibName && asmref.Version > coreLibVersion) { Console.Error.WriteLine("Error: unable to load assembly '{0}' as it depends on a higher version of mscorlib than the one currently loaded", path); Environment.Exit(1); @@ -339,11 +331,11 @@ Assembly LoadCoreLib(IList references) { if (references != null) { - foreach (string r in references) + foreach (var r in references) { try { - if (AssemblyName.GetAssemblyName(r).Name == Universe.CoreLibName) + if (AssemblyName.GetAssemblyName(r).Name == universe.CoreLibName) { return LoadFile(r); } @@ -355,10 +347,10 @@ Assembly LoadCoreLib(IList references) } } - foreach (string coreLib in FindAssemblyPath(Universe.CoreLibName + ".dll")) + foreach (var coreLib in FindAssemblyPath(universe.CoreLibName + ".dll")) return LoadFile(coreLib); - Console.Error.WriteLine($"Error: unable to find '{Universe.CoreLibName}.dll'."); + Console.Error.WriteLine($"Error: unable to find '{universe.CoreLibName}.dll'."); Environment.Exit(1); return null; } diff --git a/src/IKVM.Tools.Importer/CompilerClassLoader.cs b/src/IKVM.Tools.Importer/CompilerClassLoader.cs index 37f5494f67..169b6dda24 100644 --- a/src/IKVM.Tools.Importer/CompilerClassLoader.cs +++ b/src/IKVM.Tools.Importer/CompilerClassLoader.cs @@ -178,7 +178,7 @@ internal ModuleBuilder CreateModuleBuilder() ? options.sharedclassloader[0].assemblyName : assemblyName; if (!DisableDynamicBinding) - Context.AttributeHelper.SetInternalsVisibleToAttribute(assemblyBuilder, mainAssemblyName + DynamicClassLoaderFactory.DynamicAssemblySuffixAndPublicKey); + Context.AttributeHelper.SetInternalsVisibleToAttribute(assemblyBuilder, mainAssemblyName + Context.Options.DynamicAssemblySuffixAndPublicKey); return moduleBuilder; } diff --git a/src/IKVM.Tools.Importer/IKVM.Tools.Importer.csproj b/src/IKVM.Tools.Importer/IKVM.Tools.Importer.csproj index 6d58d6a763..d3f1a77ade 100644 --- a/src/IKVM.Tools.Importer/IKVM.Tools.Importer.csproj +++ b/src/IKVM.Tools.Importer/IKVM.Tools.Importer.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net472;net6.0 $(DefineConstants);IMPORTER;EMITTERS true true @@ -13,6 +13,7 @@ + diff --git a/src/IKVM.Tools.Importer/IkvmImporterContext.NetFramework.cs b/src/IKVM.Tools.Importer/IkvmImporterContext.NetFramework.cs index 4eb1c9a242..967b6dbd7f 100644 --- a/src/IKVM.Tools.Importer/IkvmImporterContext.NetFramework.cs +++ b/src/IKVM.Tools.Importer/IkvmImporterContext.NetFramework.cs @@ -91,6 +91,10 @@ public void Dispose() if (appDomain != null) AppDomain.Unload(appDomain); } + catch + { + // ignore + } finally { appDomain = null; diff --git a/src/IKVM.Tools.Importer/IkvmImporterInternal.cs b/src/IKVM.Tools.Importer/IkvmImporterInternal.cs index 68c34f7f20..0d7c4378cb 100644 --- a/src/IKVM.Tools.Importer/IkvmImporterInternal.cs +++ b/src/IKVM.Tools.Importer/IkvmImporterInternal.cs @@ -172,17 +172,16 @@ static int Compile(string[] args) var importer = new IkvmImporterInternal(); var targets = new List(); var rootTarget = new CompilerOptions(); - var context = new RuntimeContext(new ManagedResolver(compiler), argList.Contains("-bootstrap"), compiler); + var context = new RuntimeContext(new RuntimeContextOptions(), new ManagedResolver(compiler), argList.Contains("-bootstrap"), compiler); compiler.rootTarget = rootTarget; importer.ParseCommandLine(context, compiler, argList.GetEnumerator(), targets, rootTarget); - compiler.Init(nonDeterministicOutput); + compiler.Init(nonDeterministicOutput, libpaths); resolver.Warning += (warning, message, parameters) => loader_Warning(compiler, warning, message, parameters); resolver.Init(compiler.Universe, nostdlib, rootTarget.unresolvedReferences, libpaths); ResolveReferences(compiler, targets); ResolveStrongNameKeys(targets); - if (targets.Count == 0) { throw new FatalCompilerErrorException(Message.NoTargetsFound); @@ -565,9 +564,8 @@ void ContinueParseCommandLine(RuntimeContext context, StaticCompiler compiler, I { string r = s.Substring(s.IndexOf(':') + 1); if (r == "") - { throw new FatalCompilerErrorException(Message.MissingFileSpecification, s); - } + ArrayAppend(ref options.unresolvedReferences, r); } else if (s.StartsWith("-recurse:")) @@ -1098,6 +1096,7 @@ static void ResolveReferences(StaticCompiler compiler, List tar } } } + // verify that we didn't reference any secondary assemblies of a shared class loader group foreach (CompilerOptions target in targets) { diff --git a/src/IKVM.Tools.Importer/StaticCompiler.cs b/src/IKVM.Tools.Importer/StaticCompiler.cs index e90f84e96f..f999c12450 100644 --- a/src/IKVM.Tools.Importer/StaticCompiler.cs +++ b/src/IKVM.Tools.Importer/StaticCompiler.cs @@ -24,8 +24,13 @@ Jeroen Frijters using System; using System.Collections.Concurrent; +using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.IO.Pipelines; +using System.Reflection.Metadata; +using System.Reflection.PortableExecutable; +using System.Security.Cryptography.Xml; using IKVM.Reflection; using IKVM.Runtime; @@ -34,6 +39,7 @@ Jeroen Frijters namespace IKVM.Tools.Importer { + class StaticCompiler { @@ -45,25 +51,81 @@ class StaticCompiler internal CompilerOptions rootTarget; internal int errorCount; - internal Universe Universe - { - get - { - Debug.Assert(universe != null); - return universe; - } - } + internal Universe Universe => universe; - internal void Init(bool nonDeterministicOutput) + internal void Init(bool nonDeterministicOutput, IList libpaths) { var options = UniverseOptions.ResolveMissingMembers | UniverseOptions.EnableFunctionPointers; if (!nonDeterministicOutput) options |= UniverseOptions.DeterministicOutput; - universe = new Universe(options); + // discover the core lib from the references + var coreLibName = FindCoreLibName(rootTarget.unresolvedReferences, libpaths); + if (coreLibName == null) + Console.Error.WriteLine("Error: core library not found"); + + universe = new Universe(options, coreLibName); universe.ResolvedMissingMember += ResolvedMissingMember; } + /// + /// Finds the first potential core library in the reference set. + /// + /// + /// + /// + static string FindCoreLibName(IList references, IList libpaths) + { + if (references != null) + foreach (var reference in references) + if (GetAssemblyNameIfCoreLib(reference) is string coreLibName) + return coreLibName; + + if (libpaths != null) + foreach (var libpath in libpaths) + foreach (var dll in Directory.GetFiles(libpath, "*.dll")) + if (GetAssemblyNameIfCoreLib(dll) is string coreLibName) + return coreLibName; + + return null; + } + + /// + /// Returns true if the given assembly is a core library. + /// + /// + /// + static string GetAssemblyNameIfCoreLib(string path) + { + if (File.Exists(path) == false) + return null; + + using var st = File.OpenRead(path); + using var pe = new PEReader(st); + var mr = pe.GetMetadataReader(); + + foreach (var handle in mr.TypeDefinitions) + if (IsSystemObject(mr, handle)) + return mr.GetString(mr.GetAssemblyDefinition().Name); + + return null; + } + + /// + /// Returns true if the given type definition handle refers to "System.Object". + /// + /// + /// + /// + static bool IsSystemObject(MetadataReader reader, TypeDefinitionHandle th) + { + var td = reader.GetTypeDefinition(th); + var ns = reader.GetString(td.Namespace); + var nm = reader.GetString(td.Name); + + return ns == "System" && nm == "Object"; + } + void ResolvedMissingMember(Module requestingModule, MemberInfo member) { if (requestingModule != null && member is Type) diff --git a/src/IKVM.Tools.Runner/Exporter/IkvmExporterLauncher.cs b/src/IKVM.Tools.Runner/Exporter/IkvmExporterLauncher.cs index 2583f1e10d..a57426b499 100644 --- a/src/IKVM.Tools.Runner/Exporter/IkvmExporterLauncher.cs +++ b/src/IKVM.Tools.Runner/Exporter/IkvmExporterLauncher.cs @@ -8,7 +8,7 @@ using CliWrap; -using IKVM.Tools.Runner.Compiler; +using IKVM.Tools.Runner.Importer; using IKVM.Tools.Runner.Internal; namespace IKVM.Tools.Runner.Exporter @@ -38,7 +38,7 @@ public IkvmExporterLauncher(string toolPath, IIkvmToolDiagnosticEventListener li /// /// public IkvmExporterLauncher(IIkvmToolDiagnosticEventListener listener) : - this(Path.Combine(Path.GetDirectoryName(typeof(IkvmCompilerLauncher).Assembly.Location), TOOLNAME), listener) + this(Path.Combine(Path.GetDirectoryName(typeof(IkvmImporterLauncher).Assembly.Location), TOOLNAME), listener) { } diff --git a/src/IKVM.Tools.Runner/IKVM.Tools.Runner.csproj b/src/IKVM.Tools.Runner/IKVM.Tools.Runner.csproj index acc56adee5..12d4089146 100644 --- a/src/IKVM.Tools.Runner/IKVM.Tools.Runner.csproj +++ b/src/IKVM.Tools.Runner/IKVM.Tools.Runner.csproj @@ -1,6 +1,6 @@  - net461;netcoreapp3.1 + net461;net6.0;net7.0 true diff --git a/src/IKVM.Tools.Runner/IkvmToolLauncher.cs b/src/IKVM.Tools.Runner/IkvmToolLauncher.cs index 981d5f86e9..767be1ed4c 100644 --- a/src/IKVM.Tools.Runner/IkvmToolLauncher.cs +++ b/src/IKVM.Tools.Runner/IkvmToolLauncher.cs @@ -57,7 +57,6 @@ public string GetToolExe(OSPlatform platform, Architecture architecture) /// /// Gets the path to executable for the given environment. /// - /// /// /// /// @@ -66,20 +65,6 @@ public string GetToolExe() return GetToolExe(GetOSPlatform(), RuntimeInformation.OSArchitecture); } - /// - /// Gets the path to the reference assemblies for the given environment. - /// - /// - /// - /// - /// - /// - /// - public string GetReferenceAssemblyDirectory() - { - return Path.Combine(toolPath, "refs"); - } - /// /// Gets the current OS platform. /// diff --git a/src/IKVM.Tools.Runner/Compiler/IkvmCompilerExternalResourceItem.cs b/src/IKVM.Tools.Runner/Importer/IkvmImporterExternalResourceItem.cs similarity index 87% rename from src/IKVM.Tools.Runner/Compiler/IkvmCompilerExternalResourceItem.cs rename to src/IKVM.Tools.Runner/Importer/IkvmImporterExternalResourceItem.cs index 03c559c627..858d8ed6fb 100644 --- a/src/IKVM.Tools.Runner/Compiler/IkvmCompilerExternalResourceItem.cs +++ b/src/IKVM.Tools.Runner/Importer/IkvmImporterExternalResourceItem.cs @@ -1,12 +1,12 @@ using System; -namespace IKVM.Tools.Runner.Compiler +namespace IKVM.Tools.Runner.Importer { /// /// Describes an external resource option. /// - public class IkvmCompilerExternalResourceItem + public class IkvmImporterExternalResourceItem { /// @@ -15,7 +15,7 @@ public class IkvmCompilerExternalResourceItem /// /// /// - public IkvmCompilerExternalResourceItem(string filePath, string resourcePath) + public IkvmImporterExternalResourceItem(string filePath, string resourcePath) { if (string.IsNullOrEmpty(filePath)) throw new ArgumentException($"'{nameof(filePath)}' cannot be null or empty.", nameof(filePath)); diff --git a/src/IKVM.Tools.Runner/Compiler/IkvmCompilerLauncher.cs b/src/IKVM.Tools.Runner/Importer/IkvmImporterLauncher.cs similarity index 94% rename from src/IKVM.Tools.Runner/Compiler/IkvmCompilerLauncher.cs rename to src/IKVM.Tools.Runner/Importer/IkvmImporterLauncher.cs index 92cd647b62..9ee51fe528 100644 --- a/src/IKVM.Tools.Runner/Compiler/IkvmCompilerLauncher.cs +++ b/src/IKVM.Tools.Runner/Importer/IkvmImporterLauncher.cs @@ -10,13 +10,13 @@ using IKVM.Tools.Runner.Internal; -namespace IKVM.Tools.Runner.Compiler +namespace IKVM.Tools.Runner.Importer { /// /// Provides methods to launch the IKVM compiler. /// - public class IkvmCompilerLauncher : IkvmToolLauncher + public class IkvmImporterLauncher : IkvmToolLauncher { static readonly string TOOLNAME = "ikvmc"; @@ -26,7 +26,7 @@ public class IkvmCompilerLauncher : IkvmToolLauncher /// /// /// - public IkvmCompilerLauncher(string toolPath, IIkvmToolDiagnosticEventListener listener) : + public IkvmImporterLauncher(string toolPath, IIkvmToolDiagnosticEventListener listener) : base(TOOLNAME, toolPath, listener) { @@ -36,8 +36,8 @@ public IkvmCompilerLauncher(string toolPath, IIkvmToolDiagnosticEventListener li /// Initializes a new instance. /// /// - public IkvmCompilerLauncher(IIkvmToolDiagnosticEventListener listener) : - this(Path.Combine(Path.GetDirectoryName(typeof(IkvmCompilerLauncher).Assembly.Location), TOOLNAME), listener) + public IkvmImporterLauncher(IIkvmToolDiagnosticEventListener listener) : + this(Path.Combine(Path.GetDirectoryName(typeof(IkvmImporterLauncher).Assembly.Location), TOOLNAME), listener) { } @@ -46,7 +46,7 @@ public IkvmCompilerLauncher(IIkvmToolDiagnosticEventListener listener) : /// Initializes a new instance. /// /// - public IkvmCompilerLauncher(string toolPath) : + public IkvmImporterLauncher(string toolPath) : this(toolPath, new IkvmToolDelegateDiagnosticListener(evt => Task.CompletedTask)) { @@ -58,7 +58,7 @@ public IkvmCompilerLauncher(string toolPath) : /// /// /// - public async Task ExecuteAsync(IkvmCompilerOptions options, CancellationToken cancellationToken = default) + public async Task ExecuteAsync(IkvmImporterOptions options, CancellationToken cancellationToken = default) { if (options is null) throw new ArgumentNullException(nameof(options)); @@ -78,16 +78,16 @@ public async Task ExecuteAsync(IkvmCompilerOptions options, CancellationTok { switch (options.Target) { - case IkvmCompilerTarget.Library: + case IkvmImporterTarget.Library: w.WriteLine($"-target:library"); break; - case IkvmCompilerTarget.Exe: + case IkvmImporterTarget.Exe: w.WriteLine($"-target:exe"); break; - case IkvmCompilerTarget.WinExe: + case IkvmImporterTarget.WinExe: w.WriteLine($"-target:winexe"); break; - case IkvmCompilerTarget.Module: + case IkvmImporterTarget.Module: w.WriteLine($"-target:module"); break; } diff --git a/src/IKVM.Tools.Runner/Compiler/IkvmCompilerOptions.cs b/src/IKVM.Tools.Runner/Importer/IkvmImporterOptions.cs similarity index 90% rename from src/IKVM.Tools.Runner/Compiler/IkvmCompilerOptions.cs rename to src/IKVM.Tools.Runner/Importer/IkvmImporterOptions.cs index 91a0c4b0c4..78f48d25e7 100644 --- a/src/IKVM.Tools.Runner/Compiler/IkvmCompilerOptions.cs +++ b/src/IKVM.Tools.Runner/Importer/IkvmImporterOptions.cs @@ -1,12 +1,12 @@ using System.Collections.Generic; -namespace IKVM.Tools.Runner.Compiler +namespace IKVM.Tools.Runner.Importer { /// - /// Options available to the IKVM compiler tool. + /// Options available to the IKVM importer tool. /// - public class IkvmCompilerOptions + public class IkvmImporterOptions { /// @@ -42,12 +42,12 @@ public class IkvmCompilerOptions /// /// Target to build. /// - public IkvmCompilerTarget? Target { get; set; } + public IkvmImporterTarget? Target { get; set; } /// /// Platform to build. /// - public IkvmCompilerPlatform? Platform { get; set; } + public IkvmImporterPlatform? Platform { get; set; } /// /// Path to the key to use for strong name signing. @@ -91,9 +91,9 @@ public class IkvmCompilerOptions /// /// Set of resources to embed within the assembly. /// - public List Resources { get; } = new List(); + public List Resources { get; } = new List(); - public List ExternalResources { get; } = new List(); + public List ExternalResources { get; } = new List(); /// /// Whether resources should be compressed. diff --git a/src/IKVM.Tools.Runner/Compiler/IkvmCompilerPlatform.cs b/src/IKVM.Tools.Runner/Importer/IkvmImporterPlatform.cs similarity index 60% rename from src/IKVM.Tools.Runner/Compiler/IkvmCompilerPlatform.cs rename to src/IKVM.Tools.Runner/Importer/IkvmImporterPlatform.cs index df54fb3e74..bb763f03d8 100644 --- a/src/IKVM.Tools.Runner/Compiler/IkvmCompilerPlatform.cs +++ b/src/IKVM.Tools.Runner/Importer/IkvmImporterPlatform.cs @@ -1,7 +1,7 @@ -namespace IKVM.Tools.Runner.Compiler +namespace IKVM.Tools.Runner.Importer { - public enum IkvmCompilerPlatform + public enum IkvmImporterPlatform { AnyCPU, diff --git a/src/IKVM.Tools.Runner/Compiler/IkvmCompilerResourceItem.cs b/src/IKVM.Tools.Runner/Importer/IkvmImporterResourceItem.cs similarity index 88% rename from src/IKVM.Tools.Runner/Compiler/IkvmCompilerResourceItem.cs rename to src/IKVM.Tools.Runner/Importer/IkvmImporterResourceItem.cs index 622476ab30..f7ab111e08 100644 --- a/src/IKVM.Tools.Runner/Compiler/IkvmCompilerResourceItem.cs +++ b/src/IKVM.Tools.Runner/Importer/IkvmImporterResourceItem.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.Text; -namespace IKVM.Tools.Runner.Compiler +namespace IKVM.Tools.Runner.Importer { /// /// Describes a resource option. /// - public class IkvmCompilerResourceItem + public class IkvmImporterResourceItem { /// @@ -16,7 +16,7 @@ public class IkvmCompilerResourceItem /// /// /// - public IkvmCompilerResourceItem(string filePath, string resourcePath) + public IkvmImporterResourceItem(string filePath, string resourcePath) { if (string.IsNullOrEmpty(filePath)) throw new ArgumentException($"'{nameof(filePath)}' cannot be null or empty.", nameof(filePath)); diff --git a/src/IKVM.Tools.Runner/Compiler/IkvmCompilerTarget.cs b/src/IKVM.Tools.Runner/Importer/IkvmImporterTarget.cs similarity index 52% rename from src/IKVM.Tools.Runner/Compiler/IkvmCompilerTarget.cs rename to src/IKVM.Tools.Runner/Importer/IkvmImporterTarget.cs index 1f73f2e826..c967542006 100644 --- a/src/IKVM.Tools.Runner/Compiler/IkvmCompilerTarget.cs +++ b/src/IKVM.Tools.Runner/Importer/IkvmImporterTarget.cs @@ -1,7 +1,7 @@ -namespace IKVM.Tools.Runner.Compiler +namespace IKVM.Tools.Runner.Importer { - public enum IkvmCompilerTarget + public enum IkvmImporterTarget { Library, diff --git a/src/IKVM.Tools.Tests/IKVM.Tools.Tests.csproj b/src/IKVM.Tools.Tests/IKVM.Tools.Tests.csproj index 396ca1d611..7c0da5ec18 100644 --- a/src/IKVM.Tools.Tests/IKVM.Tools.Tests.csproj +++ b/src/IKVM.Tools.Tests/IKVM.Tools.Tests.csproj @@ -1,17 +1,17 @@  - net461;netcoreapp3.1;net6.0;net7.0 + net472;net6.0;net7.0 - - + + @@ -38,52 +38,60 @@ TargetFramework=netcoreapp3.1 lib\netcoreapp3.1\ + + TargetFramework=net6.0 + lib\net6.0\ + + + TargetFramework=net6.0 + lib\net6.0\ + - TargetFramework=net461 + TargetFramework=net472 RuntimeIdentifier=win7-x64 - ikvmc\net461\win7-x64 + ikvmc\net472\win7-x64 - TargetFramework=net461 + TargetFramework=net472 RuntimeIdentifier=win7-x64 - ikvmstub\net461\win7-x64 + ikvmstub\net472\win7-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=win7-x64 - ikvmc\netcoreapp3.1\win7-x64 + ikvmc\net6.0\win7-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=win7-x64 - ikvmstub\netcoreapp3.1\win7-x64 + ikvmstub\net6.0\win7-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-x64 - ikvmc\netcoreapp3.1\linux-x64 + ikvmc\net6.0\linux-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=linux-x64 - ikvmstub\netcoreapp3.1\linux-x64 + ikvmstub\net6.0\linux-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=osx-x64 - ikvmc\netcoreapp3.1\osx-x64 + ikvmc\net6.0\osx-x64 - TargetFramework=netcoreapp3.1 + TargetFramework=net6.0 RuntimeIdentifier=osx-x64 - ikvmstub\netcoreapp3.1\osx-x64 + ikvmstub\net6.0\osx-x64 diff --git a/src/IKVM.Tools.Tests/Runner/Compiler/IkvmCompilerLauncherTests.cs b/src/IKVM.Tools.Tests/Runner/Compiler/IkvmCompilerLauncherTests.cs deleted file mode 100644 index 9b4e03a04e..0000000000 --- a/src/IKVM.Tools.Tests/Runner/Compiler/IkvmCompilerLauncherTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.InteropServices; -using System.Threading.Tasks; - -using FluentAssertions; - -using IKVM.Tools.Runner.Compiler; - -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace IKVM.Tools.Runner.Test.Compiler -{ - - [TestClass] - public class IkvmCompilerLauncherTests - { - - static readonly string TESTBASE = Path.GetDirectoryName(typeof(IkvmCompilerLauncherTests).Assembly.Location); - - public TestContext TestContext { get; set; } - - async Task CompileJar(string tfm) - { - var libs = Path.Combine(TESTBASE, "lib", tfm); - - var p = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString(), "helloworld", tfm, "helloworld-2.0.dll"); - Directory.CreateDirectory(Path.GetDirectoryName(p)); - - var rid = ""; - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - rid = "win7-x64"; - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - rid = "linux-x64"; - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - rid = "osx-x64"; - - var e = new List(); - var l = new IkvmCompilerLauncher(Path.Combine(Path.GetDirectoryName(typeof(IkvmCompilerLauncherTests).Assembly.Location), "ikvmc", tfm, rid), new IkvmToolDelegateDiagnosticListener(evt => { e.Add(evt); TestContext.WriteLine(evt.Message, evt.MessageArgs); })); - var o = new IkvmCompilerOptions() - { - Runtime = Path.Combine(TESTBASE, "lib", tfm, "IKVM.Runtime.dll"), - ResponseFile = $"CompileJar_{tfm}_ikvmc.rsp", - Input = { Path.Combine(TESTBASE, "helloworld", "helloworld-2.0.jar") }, - Assembly = "helloworld-2.0", - Version = "1.0.0.0", - NoStdLib = true, - Output = p, - }; - - foreach (var dll in Directory.GetFiles(l.GetReferenceAssemblyDirectory())) - o.References.Add(dll); - foreach (var dll in Directory.GetFiles(libs, "*.dll")) - o.References.Add(dll); - - var exitCode = await l.ExecuteAsync(o); - exitCode.Should().Be(0); - } - - [TestMethod] - public Task Can_compile_netframework_jar() - { - // Framework building not supported on ~Windows - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) == false) - return Task.CompletedTask; - - return CompileJar("net461"); - } - - [TestMethod] - public Task Can_compile_netcore_jar() - { - return CompileJar("netcoreapp3.1"); - } - - } - -} diff --git a/src/IKVM.Tools.Tests/Runner/Exporter/IkvmExporterLauncherTests.cs b/src/IKVM.Tools.Tests/Runner/Exporter/IkvmExporterLauncherTests.cs index 50c873377a..66fa4e13df 100644 --- a/src/IKVM.Tools.Tests/Runner/Exporter/IkvmExporterLauncherTests.cs +++ b/src/IKVM.Tools.Tests/Runner/Exporter/IkvmExporterLauncherTests.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; -using System.Threading.Tasks; using FluentAssertions; +using IKVM.Tests.Util; using IKVM.Tools.Runner; using IKVM.Tools.Runner.Exporter; @@ -22,13 +22,32 @@ public class IkvmExporterLauncherTests public TestContext TestContext { get; set; } - async Task Can_export_dll(string tfm) + [DataTestMethod] + [DataRow("net472", "net461", "net472", ".NETFramework", "4.7.2")] + [DataRow("net472", "net461", "net481", ".NETFramework", "4.8.1")] + [DataRow("net472", "netcoreapp3.1", "netcoreapp3.1", ".NETCore", "3.1")] + [DataRow("net472", "net6.0", "net6.0", ".NETCore", "6.0")] + [DataRow("net6.0", "net461", "net472", ".NETFramework", "4.7.2")] + [DataRow("net6.0", "net461", "net481", ".NETFramework", "4.8.1")] + [DataRow("net6.0", "netcoreapp3.1", "netcoreapp3.1", ".NETCore", "3.1")] + [DataRow("net6.0", "net6.0", "net6.0", ".NETCore", "6.0")] + [DataRow("net6.0", "net6.0", "net7.0", ".NETCore", "7.0")] + public async System.Threading.Tasks.Task CanExportDll(string toolFramework, string ikvmFramework, string targetFramework, string targetFrameworkIdentifier, string targetFrameworkVersion) { - var libs = Path.Combine(TESTBASE, "lib", tfm); + if (toolFramework == "net472" && RuntimeInformation.IsOSPlatform(OSPlatform.Windows) == false) + return; + if (targetFramework == "netcoreapp3.1" && RuntimeInformation.IsOSPlatform(OSPlatform.Windows) == false) + return; + if (targetFrameworkIdentifier == ".NETFramework" && RuntimeInformation.IsOSPlatform(OSPlatform.Windows) == false) + return; - var a = Path.Combine(TESTBASE, "helloworld", tfm, "HelloWorldDotNet.dll"); + var ikvmLibs = Path.Combine(TESTBASE, "lib", ikvmFramework); + var refsPath = DotNetSdkUtil.GetPathToReferenceAssemblies(targetFramework, targetFrameworkIdentifier, targetFrameworkVersion) ; + + var a = Path.Combine(TESTBASE, "helloworld", ikvmFramework, "HelloWorldDotNet.dll"); var p = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString(), Path.ChangeExtension(a, ".jar")); - Directory.CreateDirectory(Path.GetDirectoryName(p)); + var d = Path.GetDirectoryName(p); + Directory.CreateDirectory(d); var rid = ""; if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) @@ -39,7 +58,7 @@ async Task Can_export_dll(string tfm) rid = "osx-x64"; var e = new List(); - var l = new IkvmExporterLauncher(Path.Combine(Path.GetDirectoryName(typeof(IkvmExporterLauncherTests).Assembly.Location), "ikvmstub", tfm, rid), new IkvmToolDelegateDiagnosticListener(evt => { e.Add(evt); TestContext.WriteLine(evt.Message, evt.MessageArgs); })); + var l = new IkvmExporterLauncher(Path.Combine(Path.GetDirectoryName(typeof(IkvmExporterLauncherTests).Assembly.Location), "ikvmstub", toolFramework, rid), new IkvmToolDelegateDiagnosticListener(evt => { e.Add(evt); TestContext.WriteLine(evt.Message, evt.MessageArgs); })); var o = new IkvmExporterOptions() { NoStdLib = true, @@ -47,31 +66,19 @@ async Task Can_export_dll(string tfm) Output = p, }; - foreach (var dll in Directory.GetFiles(l.GetReferenceAssemblyDirectory())) - o.References.Add(dll); - foreach (var dll in Directory.GetFiles(libs, "*.dll")) + foreach (var dll in Directory.GetFiles(ikvmLibs, "*.dll")) o.References.Add(dll); + foreach (var dir in refsPath) + foreach (var dll in Directory.GetFiles(dir, "*.dll")) + if (DotNetSdkUtil.IsAssembly(dll)) + o.References.Add(dll); var exitCode = await l.ExecuteAsync(o); + File.Exists(p).Should().BeTrue(); + new FileInfo(p).Length.Should().BeGreaterThanOrEqualTo(64); exitCode.Should().Be(0); } - [TestMethod] - public Task Can_export_netframework_dll() - { - // Framework not supported on ~Windows - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) == false) - return Task.CompletedTask; - - return Can_export_dll("net461"); - } - - [TestMethod] - public Task Can_export_netcore_jar() - { - return Can_export_dll("netcoreapp3.1"); - } - } } diff --git a/src/IKVM.Tools.Tests/Runner/Importer/IkvmImporterLauncherTests.cs b/src/IKVM.Tools.Tests/Runner/Importer/IkvmImporterLauncherTests.cs new file mode 100644 index 0000000000..307c91967f --- /dev/null +++ b/src/IKVM.Tools.Tests/Runner/Importer/IkvmImporterLauncherTests.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.InteropServices; + +using FluentAssertions; + +using IKVM.Tests.Util; +using IKVM.Tools.Runner; +using IKVM.Tools.Runner.Importer; + +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace IKVM.Tools.Tests.Runner.Importer +{ + + [TestClass] + public class IkvmImporterLauncherTests + { + + static readonly string TESTBASE = Path.GetDirectoryName(typeof(IkvmImporterLauncherTests).Assembly.Location); + + public TestContext TestContext { get; set; } + + [DataTestMethod] + [DataRow("net472", "net461", "net472", ".NETFramework", "4.7.2")] + [DataRow("net472", "net461", "net481", ".NETFramework", "4.8.1")] + [DataRow("net472", "netcoreapp3.1", "netcoreapp3.1", ".NETCore", "3.1")] + [DataRow("net472", "net6.0", "net6.0", ".NETCore", "6.0")] + [DataRow("net6.0", "net461", "net472", ".NETFramework", "4.7.2")] + [DataRow("net6.0", "net461", "net481", ".NETFramework", "4.8.1")] + [DataRow("net6.0", "netcoreapp3.1", "netcoreapp3.1", ".NETCore", "3.1")] + [DataRow("net6.0", "net6.0", "net6.0", ".NETCore", "6.0")] + [DataRow("net6.0", "net6.0", "net7.0", ".NETCore", "7.0")] + public async System.Threading.Tasks.Task CanImportJar(string toolFramework, string ikvmFramework, string targetFrameworkMoniker, string targetFrameworkIdentifier, string targetFrameworkVersion) + { + if (toolFramework == "net472" && RuntimeInformation.IsOSPlatform(OSPlatform.Windows) == false) + return; + if (targetFrameworkMoniker == "netcoreapp3.1" && RuntimeInformation.IsOSPlatform(OSPlatform.Windows) == false) + return; + if (targetFrameworkIdentifier == ".NETFramework" && RuntimeInformation.IsOSPlatform(OSPlatform.Windows) == false) + return; + + var ikvmLibs = Path.Combine(TESTBASE, "lib", ikvmFramework); + var refsPath = DotNetSdkUtil.GetPathToReferenceAssemblies(targetFrameworkMoniker, targetFrameworkIdentifier, targetFrameworkVersion); + + var p = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString(), "helloworld", "helloworld-2.0.dll"); + var d = Path.GetDirectoryName(p); + Directory.CreateDirectory(d); + + var rid = ""; + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + rid = "win7-x64"; + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + rid = "linux-x64"; + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + rid = "osx-x64"; + + var e = new List(); + var l = new IkvmImporterLauncher(Path.Combine(Path.GetDirectoryName(typeof(IkvmImporterLauncherTests).Assembly.Location), "ikvmc", toolFramework, rid), new IkvmToolDelegateDiagnosticListener(evt => { e.Add(evt); TestContext.WriteLine(evt.Message, evt.MessageArgs); })); + var o = new IkvmImporterOptions() + { + Runtime = Path.Combine(ikvmLibs, "IKVM.Runtime.dll"), + ResponseFile = Path.Combine(d, "ikvmc.rsp"), + Input = { Path.Combine(TESTBASE, "helloworld", "helloworld-2.0.jar") }, + Assembly = "helloworld-2.0", + Version = "1.0.0.0", + NoStdLib = true, + Output = p, + }; + + foreach (var dll in Directory.GetFiles(ikvmLibs, "*.dll")) + o.References.Add(dll); + foreach (var dir in refsPath) + foreach (var dll in Directory.GetFiles(dir, "*.dll")) + if (DotNetSdkUtil.IsAssembly(dll)) + o.References.Add(dll); + + var exitCode = await l.ExecuteAsync(o); + File.Exists(p).Should().BeTrue(); + new FileInfo(p).Length.Should().BeGreaterThanOrEqualTo(64); + exitCode.Should().Be(0); + } + + } + +} diff --git a/src/IKVM.Util/IKVM.Util.csproj b/src/IKVM.Util/IKVM.Util.csproj index 8668ca5519..5c6c3fdb3f 100644 --- a/src/IKVM.Util/IKVM.Util.csproj +++ b/src/IKVM.Util/IKVM.Util.csproj @@ -1,6 +1,6 @@ - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 true diff --git a/src/IKVM/IKVM.csproj b/src/IKVM/IKVM.csproj index f7d77192c0..97f920c317 100644 --- a/src/IKVM/IKVM.csproj +++ b/src/IKVM/IKVM.csproj @@ -1,7 +1,7 @@  - net461;netcoreapp3.1 + net461;netcoreapp3.1;net6.0 LICENSE.md README.md Java SE 8 Virtual Machine for .NET diff --git a/src/dist-bin/dist-bin.csproj b/src/dist-bin/dist-bin.csproj index 444c44cfd7..8984a0e63d 100644 --- a/src/dist-bin/dist-bin.csproj +++ b/src/dist-bin/dist-bin.csproj @@ -8,6 +8,7 @@ + diff --git a/src/dist-image/dist-image.csproj b/src/dist-image/dist-image.csproj index 7f266d73d1..df1916becf 100644 --- a/src/dist-image/dist-image.csproj +++ b/src/dist-image/dist-image.csproj @@ -17,17 +17,17 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/src/dist-tests/dist-tests.csproj b/src/dist-tests/dist-tests.csproj index 4d70564468..6e159dfa2e 100644 --- a/src/dist-tests/dist-tests.csproj +++ b/src/dist-tests/dist-tests.csproj @@ -11,32 +11,29 @@ + + + - - - - - + - - - - + + + + - - - + diff --git a/src/dist-tools/dist-tools.csproj b/src/dist-tools/dist-tools.csproj index 015995599a..7987c27adb 100644 --- a/src/dist-tools/dist-tools.csproj +++ b/src/dist-tools/dist-tools.csproj @@ -7,25 +7,20 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/src/ikvmc/ikvmc.csproj b/src/ikvmc/ikvmc.csproj index bf570706a4..8ff57289d0 100644 --- a/src/ikvmc/ikvmc.csproj +++ b/src/ikvmc/ikvmc.csproj @@ -1,9 +1,9 @@  Exe - net461;netcoreapp3.1 + net472;net6.0 $(_SupportedToolRuntimes) - true + true diff --git a/src/ikvmstub/ikvmstub.csproj b/src/ikvmstub/ikvmstub.csproj index bb57c3096f..0e8f641af8 100644 --- a/src/ikvmstub/ikvmstub.csproj +++ b/src/ikvmstub/ikvmstub.csproj @@ -1,9 +1,9 @@  Exe - netcoreapp3.1;net461 + net472;net6.0 $(_SupportedToolRuntimes) - true + true diff --git a/src/jar/jar.msbuildproj b/src/jar/jar.msbuildproj index 347954c8b3..85dc4c3f87 100644 --- a/src/jar/jar.msbuildproj +++ b/src/jar/jar.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) sun.tools.jar.Main ikvm.tools.jar diff --git a/src/jarsigner/jarsigner.msbuildproj b/src/jarsigner/jarsigner.msbuildproj index 1fd191877f..7c4ca1159d 100644 --- a/src/jarsigner/jarsigner.msbuildproj +++ b/src/jarsigner/jarsigner.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) sun.security.tools.jarsigner.Main ikvm.tools.jarsigner diff --git a/src/java/java.csproj b/src/java/java.csproj index ca055889c6..f6fa4f0626 100644 --- a/src/java/java.csproj +++ b/src/java/java.csproj @@ -1,7 +1,7 @@  Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) ikvm.tools.java diff --git a/src/javac-ref/javac-ref.msbuildproj b/src/javac-ref/javac-ref.msbuildproj index f187b39811..949a7e566e 100644 --- a/src/javac-ref/javac-ref.msbuildproj +++ b/src/javac-ref/javac-ref.msbuildproj @@ -6,7 +6,7 @@ Exe javac - net461;netcoreapp3.1 + net461;net472;net6.0 $(_SupportedImageRuntimes) com.sun.tools.javac.Main ikvm.tools.javac diff --git a/src/javac/javac.msbuildproj b/src/javac/javac.msbuildproj index 3aef54f01c..18b4929623 100644 --- a/src/javac/javac.msbuildproj +++ b/src/javac/javac.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) com.sun.tools.javac.Main ikvm.tools.javac diff --git a/src/javadoc/javadoc.msbuildproj b/src/javadoc/javadoc.msbuildproj index f7ad049d70..819bcad439 100644 --- a/src/javadoc/javadoc.msbuildproj +++ b/src/javadoc/javadoc.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) com.sun.tools.javadoc.Main ikvm.tools.javadoc diff --git a/src/javah/javah.msbuildproj b/src/javah/javah.msbuildproj index b3bcc6adfe..b14ca436d4 100644 --- a/src/javah/javah.msbuildproj +++ b/src/javah/javah.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) com.sun.tools.javah.Main ikvm.tools.javah diff --git a/src/javap/javap.msbuildproj b/src/javap/javap.msbuildproj index cb6bc080ed..d4188433f0 100644 --- a/src/javap/javap.msbuildproj +++ b/src/javap/javap.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) com.sun.tools.javap.Main ikvm.tools.javap diff --git a/src/jdeps/jdeps.msbuildproj b/src/jdeps/jdeps.msbuildproj index 9e66cb0ae0..7a9931f078 100644 --- a/src/jdeps/jdeps.msbuildproj +++ b/src/jdeps/jdeps.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) com.sun.tools.jdeps.Main ikvm.tools.jdeps diff --git a/src/keytool/keytool.msbuildproj b/src/keytool/keytool.msbuildproj index 3e0a311753..6b406b4753 100644 --- a/src/keytool/keytool.msbuildproj +++ b/src/keytool/keytool.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) sun.security.tools.keytool.Main ikvm.tools.keytool diff --git a/src/native2ascii/native2ascii.msbuildproj b/src/native2ascii/native2ascii.msbuildproj index 2fda390b15..0d6ea7b572 100644 --- a/src/native2ascii/native2ascii.msbuildproj +++ b/src/native2ascii/native2ascii.msbuildproj @@ -1,10 +1,11 @@ - + + Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) sun.tools.native2ascii.Main ikvm.tools.native2ascii diff --git a/src/orbd/orbd.msbuildproj b/src/orbd/orbd.msbuildproj index f5140ae06a..56c4fc9597 100644 --- a/src/orbd/orbd.msbuildproj +++ b/src/orbd/orbd.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) com.sun.corba.se.impl.activation.ORBD ikvm.tools.orbd diff --git a/src/policytool/policytool.msbuildproj b/src/policytool/policytool.msbuildproj index a10ab7c899..d2835ad281 100644 --- a/src/policytool/policytool.msbuildproj +++ b/src/policytool/policytool.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) sun.security.tools.policytool.PolicyTool ikvm.tools.policytool diff --git a/src/rmic/rmic.msbuildproj b/src/rmic/rmic.msbuildproj index 9843433489..60abb0d082 100644 --- a/src/rmic/rmic.msbuildproj +++ b/src/rmic/rmic.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) sun.rmi.rmic.Main ikvm.tools.rmic diff --git a/src/schemagen/schemagen.msbuildproj b/src/schemagen/schemagen.msbuildproj index e66a763005..6448842ab2 100644 --- a/src/schemagen/schemagen.msbuildproj +++ b/src/schemagen/schemagen.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) com.sun.tools.internal.jxc.SchemaGenerator ikvm.tools.schemagen diff --git a/src/wsgen/wsgen.msbuildproj b/src/wsgen/wsgen.msbuildproj index cde946e3de..847b51d5ef 100644 --- a/src/wsgen/wsgen.msbuildproj +++ b/src/wsgen/wsgen.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) com.sun.tools.internal.ws.WsGen ikvm.tools.wsgen diff --git a/src/wsimport/wsimport.msbuildproj b/src/wsimport/wsimport.msbuildproj index d019e4032b..65a37c50ef 100644 --- a/src/wsimport/wsimport.msbuildproj +++ b/src/wsimport/wsimport.msbuildproj @@ -5,7 +5,7 @@ Exe - net461;netcoreapp3.1 + net461;net6.0 $(_SupportedImageRuntimes) com.sun.tools.internal.ws.WsImport ikvm.tools.wsimport diff --git a/testenvironments.json b/testenvironments.json index 9e94f92b25..051d6ff28a 100644 --- a/testenvironments.json +++ b/testenvironments.json @@ -13,3 +13,4 @@ } ] } +