Skip to content

Commit

Permalink
Update to .NET 9
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensley committed Feb 5, 2025
1 parent 4435037 commit aad5977
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.0.1">
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.12.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion src/console/Console.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net7.0</TargetFrameworks>
<TargetFrameworks>net472;net9.0</TargetFrameworks>
<Platforms>x64;x86</Platforms>
<OutputType>Exe</OutputType>
<AssemblyName>nPython</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion src/embed_tests/Python.EmbeddingTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;net7.0</TargetFrameworks>
<TargetFrameworks>net472;net9.0</TargetFrameworks>
<AssemblyOriginatorKeyFile>..\pythonnet.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/python_tests_runner/Python.PythonTestsRunner.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;net7.0</TargetFrameworks>
<TargetFrameworks>net472;net9.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/McNeel.Python.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

<ItemGroup>
<PackageReference Include="Lost.Compat.NullabilityAttributes" Version="0.0.4" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" PrivateAssets="All" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/runtime/Python.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

<ItemGroup>
<PackageReference Include="Lost.Compat.NullabilityAttributes" Version="0.0.4" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions src/runtime/Util/ReflectionPolyfills.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ public static AssemblyBuilder DefineDynamicAssembly(this AppDomain _, AssemblyNa

public static Type CreateType(this TypeBuilder typeBuilder)
{
#pragma warning disable CS8603 // Possible null reference return.
return typeBuilder.CreateTypeInfo();
#pragma warning restore CS8603 // Possible null reference return.
}

public static T GetCustomAttribute<T>(this Type type) where T: Attribute
Expand Down
2 changes: 1 addition & 1 deletion src/testing/Python.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net9.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AssemblyOriginatorKeyFile>..\pythonnet.snk</AssemblyOriginatorKeyFile>
Expand Down

0 comments on commit aad5977

Please sign in to comment.