Skip to content

Commit 1bab47d

Browse files
jpobstpjcollins
andauthored
[build] Target net7.0 (#988)
Context: dotnet/android#6598 Context: dotnet/android#7028 Update `$(TargetFrameworks)` across the various `.csproj` files to use `$(DotNetTargetFramework)`, as xamarin/xamarin-android does. Additionally, set `$(DotNetTargetFramework)`=net7.0 (.NET 7). Similar to commit e7bacc3, Mono cannot be used to build against .NET 7 reference assemblies: /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1232,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v7.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK. Fix this by updating the **Mac - Mono** CI job to *build* with .NET 7, while Mono-focused unit tests are still run with Mono. Note: dotnet/android#7028 will be required in order to bump Java.Interop within xamarin-android. Co-authored-by: Peter Collins <[email protected]>
1 parent 1f27ab5 commit 1bab47d

File tree

34 files changed

+51
-51
lines changed

34 files changed

+51
-51
lines changed

Directory.Build.props

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
<_OutputPath>$(MSBuildThisFileDirectory)bin\Build$(Configuration)\</_OutputPath>
99
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
1010
<ProduceReferenceAssemblyInOutDir>true</ProduceReferenceAssemblyInOutDir>
11-
11+
<DotNetTargetFrameworkVersion>7.0</DotNetTargetFrameworkVersion>
12+
<DotNetTargetFramework>net$(DotNetTargetFrameworkVersion)</DotNetTargetFramework>
1213
<!--
1314
Workaround for https://github.com/NuGet/Home/issues/6461 (VSWin Only)
1415
Even though we don't build NuGet packages, it still attempts to build the NuGet package name, which includes
@@ -118,9 +119,11 @@
118119
meaning we can't build on VS2019.
119120
120121
Ignore CS8032 so that we can build on VS2019.
122+
123+
JniEnvironment.g.cs(34,8): error CS8981: The type name 'jobject' only contains lower-cased ascii characters. Such names may become reserved for the language.
121124
-->
122125
<PropertyGroup>
123-
<NoWarn>$(NoWarn);CS8032</NoWarn>
126+
<NoWarn>$(NoWarn);CS8032;CS8981</NoWarn>
124127
</PropertyGroup>
125128

126129
<!-- The net6.0 versions of these are stricter and require overloads not available in .NET Framework, so start with just .NET Framework -->

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ TESTS = \
3333
bin/Test$(CONFIGURATION)/Xamarin.SourceWriter-Tests.dll
3434

3535
NET_TESTS = \
36-
bin/Test$(CONFIGURATION)-net6.0/Java.Base-Tests.dll
36+
bin/Test$(CONFIGURATION)-net7.0/Java.Base-Tests.dll
3737

3838
PTESTS = \
3939
bin/Test$(CONFIGURATION)/Java.Interop-PerformanceTests.dll
@@ -127,7 +127,7 @@ run-tests: $(TESTS) bin/Test$(CONFIGURATION)/$(JAVA_INTEROP_LIB)
127127
$(foreach t,$(TESTS), $(call RUN_TEST,$(t),1)) \
128128
exit $$r;
129129

130-
run-net-tests: $(NET_TESTS) bin/Test$(CONFIGURATION)-net6.0/$(JAVA_INTEROP_LIB)
130+
run-net-tests: $(NET_TESTS) bin/Test$(CONFIGURATION)-net7.0/$(JAVA_INTEROP_LIB)
131131
r=0; \
132132
$(foreach t,$(NET_TESTS), dotnet test $(t) || r=1) \
133133
exit $$r;

build-tools/automation/azure-pipelines.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ variables:
2121
RunningOnCI: true
2222
Build.Configuration: Release
2323
MaxJdkVersion: 8
24-
DotNetCoreVersion: 6.0.202
24+
DotNetCoreVersion: 7.0.100-preview.4.22252.9
25+
DotNetTargetFramework: net7.0
26+
NetCoreTargetFrameworkPathSuffix: -$(DotNetTargetFramework)
2527
1ESWindowsPool: AzurePipelines-EO
2628
1ESWindowsImage: AzurePipelinesWindows2022compliant
2729
1ESMacPool: Azure Pipelines
2830
1ESMacImage: internal-macos-11
29-
NetCoreTargetFrameworkPathSuffix: -net6.0
3031
VSInstallRoot: C:\Program Files\Microsoft Visual Studio\2022\Enterprise
3132

3233
jobs:
@@ -136,11 +137,7 @@ jobs:
136137
boots https://download.mono-project.com/archive/6.12.0/macos-10-universal/MonoFramework-MDK-6.12.0.145.macos10.xamarin.universal.pkg
137138
displayName: Install Mono
138139
139-
- script: make prepare CONFIGURATION=$(Build.Configuration) JI_MAX_JDK=$(MaxJdkVersion)
140-
displayName: make prepare
141-
142-
- script: make all CONFIGURATION=$(Build.Configuration) JI_MAX_JDK=$(MaxJdkVersion)
143-
displayName: make all
140+
- template: templates\core-build.yaml
144141

145142
- script: |
146143
r=0

build-tools/automation/templates/core-tests.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ steps:
9090
condition: or(eq('${{ parameters.runNativeDotnetTests }}', 'true'), eq('${{ parameters.runNativeTests }}', 'true'))
9191
inputs:
9292
command: test
93-
testRunTitle: Java.Interop (net6.0 - ${{ parameters.platformName }})
93+
testRunTitle: Java.Interop ($(DotNetTargetFramework) - ${{ parameters.platformName }})
9494
arguments: bin/Test$(Build.Configuration)$(NetCoreTargetFrameworkPathSuffix)/Java.Interop-Tests.dll
9595
continueOnError: true
9696

@@ -122,11 +122,11 @@ steps:
122122
continueOnError: true
123123

124124
- task: DotNetCoreCLI@2
125-
displayName: 'Tests: Java.Interop-Performance-net6.0'
125+
displayName: 'Tests: Java.Interop-Performance-$(DotNetTargetFramework)'
126126
condition: eq('${{ parameters.runNativeTests }}', 'true')
127127
inputs:
128128
command: test
129-
testRunTitle: Java.Interop-Performance (net6.0 - ${{ parameters.platformName }})
129+
testRunTitle: Java.Interop-Performance ($(DotNetTargetFramework) - ${{ parameters.platformName }})
130130
arguments: bin/Test$(Build.Configuration)$(NetCoreTargetFrameworkPathSuffix)/Java.Interop-PerformanceTests.dll
131131
continueOnError: true
132132

@@ -135,7 +135,7 @@ steps:
135135
condition: or(eq('${{ parameters.runNativeDotnetTests }}', 'true'), eq('${{ parameters.runNativeTests }}', 'true'))
136136
inputs:
137137
command: test
138-
testRunTitle: Java.Base (net6.0 - ${{ parameters.platformName }})
138+
testRunTitle: Java.Base ($(DotNetTargetFramework) - ${{ parameters.platformName }})
139139
arguments: bin/Test$(Build.Configuration)$(NetCoreTargetFrameworkPathSuffix)/Java.Base-Tests.dll
140140
continueOnError: true
141141

build-tools/jnienv-gen/jnienv-gen.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
5+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
66
<IsPackable>false</IsPackable>
77
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\$(TargetFramework.ToLowerInvariant())\</IntermediateOutputPath>
88
</PropertyGroup>

samples/Hello/Hello.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>$(DotNetTargetFramework)</TargetFramework>
55
<OutputType>Exe</OutputType>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<Nullable>enable</Nullable>

src/Java.Base/Java.Base.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0</TargetFrameworks>
4+
<TargetFrameworks>$(DotNetTargetFramework)</TargetFrameworks>
55
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
66
<Nullable>enable</Nullable>
77
<!-- TODO: CS0108 is due to e.g. interfaces re-abstracting default interface methods -->

src/Java.Interop.Export/Java.Interop.Export.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;$(DotNetTargetFramework)</TargetFrameworks>
55
<LangVersion>8.0</LangVersion>
66
<ProjectGuid>{B501D075-6183-4E1D-92C9-F7B5002475B1}</ProjectGuid>
77
<Nullable>enable</Nullable>

src/Java.Interop/Java.Interop.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
<Import Condition="Exists ('$(XAConfigPath)')" Project="$(XAConfigPath)" />
77
<!--
88
NOTE: in xamarin-android, this project gets built by xabuild in Xamarin.Android-Tests.sln
9-
Exclude net6.0, because xabuild cannot build net5.0 or higher
9+
Exclude net6.0+, because xabuild cannot build net5.0 or higher
1010
-->
1111
<PropertyGroup Condition=" '$(XABuild)' == 'true' ">
1212
<TargetFramework>netstandard2.0</TargetFramework>
1313
<_JniEnvSkipGetTargetFrameworkProperties>true</_JniEnvSkipGetTargetFrameworkProperties>
1414
<_JniEnvAdditionalProperties>TargetFramework=net472</_JniEnvAdditionalProperties>
1515
</PropertyGroup>
1616
<PropertyGroup Condition=" '$(XABuild)' != 'true' ">
17-
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
17+
<TargetFrameworks>netstandard2.0;$(DotNetTargetFramework)</TargetFrameworks>
1818
</PropertyGroup>
1919
<PropertyGroup>
2020
<NoWarn>$(NoWarn);1591</NoWarn>

src/Java.Runtime.Environment/Java.Runtime.Environment.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;$(DotNetTargetFramework)</TargetFrameworks>
55
<SignAssembly>true</SignAssembly>
66
<AssemblyOriginatorKeyFile>..\..\product.snk</AssemblyOriginatorKeyFile>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
8-
<LangVersion>8.0</LangVersion>
8+
<LangVersion>9.0</LangVersion>
99
<Nullable>enable</Nullable>
1010
<MSBuildWarningsAsMessages>NU1702</MSBuildWarningsAsMessages>
1111
</PropertyGroup>

src/Xamarin.Android.Tools.Bytecode/Xamarin.Android.Tools.Bytecode.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;$(DotNetTargetFramework)</TargetFrameworks>
55
<LangVersion>8.0</LangVersion>
66
<SignAssembly>true</SignAssembly>
77
<AssemblyOriginatorKeyFile>..\..\product.snk</AssemblyOriginatorKeyFile>

src/java-interop/java-interop.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.Build.NoTargets">
22
<PropertyGroup>
3-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
3+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
44
<OutputPath>$(ToolOutputFullPath)</OutputPath>
55
<JNIEnvGenPath>$(BuildToolOutputFullPath)</JNIEnvGenPath>
66
<OutputName>java-interop</OutputName>

tests/Java.Base-Tests/Java.Base-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0</TargetFrameworks>
4+
<TargetFrameworks>$(DotNetTargetFramework)</TargetFrameworks>
55
<RootNamespace>Java.BaseTests</RootNamespace>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<Nullable>enable</Nullable>

tests/Java.Interop-PerformanceTests/Java.Interop-PerformanceTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
</PropertyGroup>

tests/Java.Interop-Tests/Java.Interop-Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<LangVersion>9.0</LangVersion>
@@ -11,7 +11,7 @@
1111
<OutputPath>$(TestOutputFullPath)</OutputPath>
1212
</PropertyGroup>
1313

14-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
14+
<PropertyGroup Condition=" '$(TargetFramework)' != 'net472' ">
1515
<DefineConstants>$(DefineConstants);NO_MARSHAL_MEMBER_BUILDER_SUPPORT;NO_GC_BRIDGE_SUPPORT</DefineConstants>
1616
</PropertyGroup>
1717

@@ -35,7 +35,7 @@
3535
<ProjectReference Include="..\TestJVM\TestJVM.csproj" />
3636
</ItemGroup>
3737

38-
<ItemGroup Condition=" '$(TargetFramework)' != 'net6.0' ">
38+
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
3939
<ProjectReference Include="..\..\src\Java.Interop.Export\Java.Interop.Export.csproj" />
4040
</ItemGroup>
4141

tests/Java.Interop.Dynamic-Tests/Java.Interop.Dynamic-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
</PropertyGroup>

tests/Java.Interop.Export-Tests/Java.Interop.Export-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
</PropertyGroup>

tests/Java.Interop.Tools.Generator-Tests/Java.Interop.Tools.Generator-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<RootNamespace>Java.Interop.Tools.Common_Tests</RootNamespace>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

tests/Java.Interop.Tools.JavaCallableWrappers-Tests/Java.Interop.Tools.JavaCallableWrappers-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<DefineConstants>$(DefineConstants);HAVE_CECIL;JCW_ONLY_TYPE_NAMES</DefineConstants>
77
</PropertyGroup>

tests/Java.Interop.Tools.JavaSource-Tests/Java.Interop.Tools.JavaSource-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
3+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
44
<IsPackable>False</IsPackable>
55
</PropertyGroup>
66
<PropertyGroup>

tests/Java.Interop.Tools.JavaTypeSystem-Tests/Java.Interop.Tools.JavaTypeSystem-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<RootNamespace>Java.Interop.Tools.JavaTypeSystem.Tests</RootNamespace>
77
</PropertyGroup>

tests/TestJVM/TestJVM.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<LangVersion>8.0</LangVersion>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>

tests/Xamarin.Android.Tools.ApiXmlAdjuster-Tests/Xamarin.Android.Tools.ApiXmlAdjuster-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

tests/Xamarin.Android.Tools.Bytecode-Tests/Xamarin.Android.Tools.Bytecode-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<LangVersion>8.0</LangVersion>
77
</PropertyGroup>

tests/Xamarin.SourceWriter-Tests/Xamarin.SourceWriter-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

tests/generator-Tests/generator-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<LangVersion>8.0</LangVersion>

tests/invocation-overhead/invocation-overhead.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
5+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
66
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
77
<AppendTargetFrameworkToOutputPath>True</AppendTargetFrameworkToOutputPath>
88
<DefineConstants>FEATURE_JNIENVIRONMENT_JI_INTPTRS;FEATURE_JNIENVIRONMENT_JI_PINVOKES;FEATURE_JNIENVIRONMENT_SAFEHANDLES;FEATURE_JNIENVIRONMENT_XA_INTPTRS </DefineConstants>
9-
<DefineConstants Condition=" '$(TargetFramework)' == 'net6.0' ">$(DefineConstants);FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS</DefineConstants>
9+
<DefineConstants Condition=" '$(TargetFramework)' != 'net472' ">$(DefineConstants);FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS</DefineConstants>
1010
</PropertyGroup>
1111

1212
<ItemGroup>

tests/invocation-overhead/invocation-overhead.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
Targets="_Run_net472"
3030
/>
3131
<MSBuild Projects="$(MSBuildThisFileDirectory)invocation-overhead.csproj"
32-
Properties="TargetFramework=net6.0"
32+
Properties="TargetFramework=$(DotNetTargetFramework)"
3333
Targets="_Run_netcoreapp"
3434
/>
3535
</Target>

tests/logcat-parse-Tests/logcat-parse-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

tools/class-parse/class-parse.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<OutputType>Exe</OutputType>
66
</PropertyGroup>
77

tools/generator/generator.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<OutputType>Exe</OutputType>
66
<DefineConstants>$(DefineConstants);GENERATOR;HAVE_CECIL;JCW_ONLY_TYPE_NAMES</DefineConstants>
77
<LangVersion>8.0</LangVersion>
@@ -43,7 +43,7 @@
4343

4444
<ItemGroup>
4545
<None Condition=" '$(TargetFramework)' == 'net472' " Include="$(PkgMono_Options)\lib\net40\Mono.Options.pdb" CopyToOutputDirectory="PreserveNewest" />
46-
<None Condition=" '$(TargetFramework)' == 'net6.0' " Include="$(PkgMono_Options)\lib\netstandard2.0\Mono.Options.pdb" CopyToOutputDirectory="PreserveNewest" />
46+
<None Condition=" '$(TargetFramework)' != 'net472' " Include="$(PkgMono_Options)\lib\netstandard2.0\Mono.Options.pdb" CopyToOutputDirectory="PreserveNewest" />
4747
</ItemGroup>
4848

4949
<ItemGroup>

tools/jcw-gen/jcw-gen.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;$(DotNetTargetFramework)</TargetFrameworks>
55
<OutputType>Exe</OutputType>
66
</PropertyGroup>
77

0 commit comments

Comments
 (0)