Skip to content

Commit

Permalink
fixes project outdates
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike committed Nov 14, 2024
1 parent f54b379 commit f927314
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>

<PropertyGroup>
<HarmonyVersion>2.3.4.0</HarmonyVersion>
<HarmonyVersion>2.3.3.0</HarmonyVersion>
<HarmonyPrerelease></HarmonyPrerelease>
<MonoModCoreVersion>1.1.0</MonoModCoreVersion>
<MonoModCoreVersion>1.2.1</MonoModCoreVersion>
</PropertyGroup>

</Project>
26 changes: 16 additions & 10 deletions Harmony/Harmony.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net35;net452;net472;net48;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net35;net452;net472;net48;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Product>Harmony</Product>
<Company>Andreas Pardeike</Company>
Expand Down Expand Up @@ -45,7 +45,7 @@
</RestoreAdditionalProjectSources>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net5.0' Or '$(TargetFramework)'=='net6.0' Or '$(TargetFramework)'=='net7.0' Or '$(TargetFramework)'=='net8.0'">
<PropertyGroup Condition="'$(TargetFramework)'=='net5.0' Or '$(TargetFramework)'=='net6.0' Or '$(TargetFramework)'=='net7.0' Or '$(TargetFramework)'=='net8.0' Or '$(TargetFramework)'=='net9.0'">
<IsNET5OrGreater>true</IsNET5OrGreater>
</PropertyGroup>
<PropertyGroup Condition="'$(IsNET5OrGreater)' != 'true'">
Expand Down Expand Up @@ -88,7 +88,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="ILRepack.Lib.MSBuild.Task" Version="2.0.29" PrivateAssets="all" />
<PackageReference Include="ILRepack.Lib.MSBuild.Task" Version="2.0.34.2" PrivateAssets="all" />
<!-- Reference assemblies are needed for non-Windows .NET Framework targeting builds. -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
Expand All @@ -97,10 +97,11 @@
Ensures the build (ILRepack task) can work without having all these versions installed. -->
<PackageReference Condition="$(TargetFramework) == 'netcoreapp3.0'" Include="Microsoft.NetCore.App.Ref" Version="3.0.0" ExcludeAssets="all" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Condition="$(TargetFramework) == 'netcoreapp3.1'" Include="Microsoft.NetCore.App.Ref" Version="3.1.0" ExcludeAssets="all" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Condition="$(TargetFramework) == 'net5.0'" Include="Microsoft.NetCore.App.Ref" Version="5.0.0" ExcludeAssets="all" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Condition="$(TargetFramework) == 'net6.0'" Include="Microsoft.NetCore.App.Ref" Version="6.0.0" ExcludeAssets="all" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Condition="$(TargetFramework) == 'net7.0'" Include="Microsoft.NetCore.App.Ref" Version="7.0.0" ExcludeAssets="all" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Condition="$(TargetFramework) == 'net8.0'" Include="Microsoft.NetCore.App.Ref" Version="8.0.0" ExcludeAssets="all" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Condition="$(TargetFramework) == 'net5.0'" Include="Microsoft.NetCore.App.Ref" Version="5.0.0" ExcludeAssets="all" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Condition="$(TargetFramework) == 'net6.0'" Include="Microsoft.NetCore.App.Ref" Version="6.0.0" ExcludeAssets="all" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Condition="$(TargetFramework) == 'net7.0'" Include="Microsoft.NetCore.App.Ref" Version="7.0.0" ExcludeAssets="all" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Condition="$(TargetFramework) == 'net8.0'" Include="Microsoft.NetCore.App.Ref" Version="8.0.0" ExcludeAssets="all" PrivateAssets="all" GeneratePathProperty="true" />
<PackageReference Condition="$(TargetFramework) == 'net9.0'" Include="Microsoft.NetCore.App.Ref" Version="9.0.0" ExcludeAssets="all" PrivateAssets="all" GeneratePathProperty="true" />
</ItemGroup>

<!-- netstandard2.0 reference assemblies -->
Expand All @@ -126,19 +127,24 @@
<PackageReference Include="System.Text.Json" Version="5.0.2" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageReference Include="System.Text.Json" Version="6.0.9" />
<PackageReference Include="System.Text.Json" Version="6.0.11" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net7.0'">
<PackageReference Include="System.Text.Json" Version="7.0.4" />
<!-- 7.0.4 has security issues -->
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="System.Text.Json" Version="8.0.1" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net9.0'">
<PackageReference Include="System.Text.Json" Version="9.0.0" />
</ItemGroup>
<ItemGroup Condition="!$(IsNET5OrGreater)">
<Compile Remove="**\*.net5.cs" />
<Compile Remove="**\*.net6.cs" />
<Compile Remove="**\*.net7.cs" />
<Compile Remove="**\*.net8.cs" />
<Compile Remove="**\*.net9.cs" />
</ItemGroup>

<Target Name="RemoveOldNuGetPackages" BeforeTargets="PreBuildEvent">
Expand Down
15 changes: 10 additions & 5 deletions HarmonyTests/HarmonyTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net35;net452;net472;net48;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net35;net452;net472;net48;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>preview</LangVersion>
<IsPackable>false</IsPackable>
Expand All @@ -11,7 +11,7 @@

<!-- In .NET 5.0 Binary Formatters are off by default. Support is added for .NET 5.0+ for fallback JSON Serialization -->
<Choose>
<When Condition="'$(TargetFramework)'=='net5.0' Or '$(TargetFramework)'=='net6.0' Or '$(TargetFramework)'=='net7.0' Or '$(TargetFramework)'=='net8.0'">
<When Condition="'$(TargetFramework)'=='net5.0' Or '$(TargetFramework)'=='net6.0' Or '$(TargetFramework)'=='net7.0' Or '$(TargetFramework)'=='net8.0' Or '$(TargetFramework)'=='net9.0'">
<PropertyGroup>
<IsNET5OrGreater>true</IsNET5OrGreater>
</PropertyGroup>
Expand Down Expand Up @@ -47,10 +47,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<!-- force newer versions due to vulnerability -->
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Condition="'$(TargetFramework)'!='net35'" Include="System.Text.RegularExpressions" Version="4.3.1" />
<!-- end force -->
<PackageReference Condition="!$(IsNET5OrGreater)" Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Condition="$(IsNET5OrGreater)" Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net35" Version="1.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0">
Expand Down
4 changes: 2 additions & 2 deletions TestLibrary/TestLibrary.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net35;net452;net472;net48;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net35;net452;net472;net48;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>preview</LangVersion>
<IsPackable>false</IsPackable>
Expand Down Expand Up @@ -31,4 +31,4 @@
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
</ItemGroup>

</Project>
</Project>

0 comments on commit f927314

Please sign in to comment.