Skip to content

Commit

Permalink
Bump .NET to 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
sailro committed Nov 13, 2024
1 parent 9651544 commit c5a0aee
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ We also ship them on [NuGet](https://nuget.org/packages/Microsoft.Unity.Analyzer
If you have an idea for a best practice for Unity developers to follow, please open an [issue](https://github.com/microsoft/Microsoft.Unity.Analyzers/issues/new?template=Feature_request.md) with the description.

# Prerequisites
For building and testing, you'll need **.NET 7 and Visual Studio 2022 17.4+, Visual Studio 2022 for Mac 17.4+ or Visual Studio Code 1.76+**.
For building and testing, you'll need **.NET 9 and Visual Studio 2022 17.12+, or Visual Studio Code 1.92+**.

This project binaries are targeting **Visual Studio 2019 16.4+**, **Visual Studio for Mac 8.4+** and **Visual Studio Code 1.76+**.

Expand Down
7 changes: 3 additions & 4 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.7.0" />
<!-- Analyzers -->
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20" />
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.12.19" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.11.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" />
<!-- MPack -->
<PackageVersion Include="MonoDevelop.Addins" Version="0.4.7" />
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies.net472" Version="1.0.0" />
Expand All @@ -20,12 +19,12 @@
<PackageVersion Include="Microsoft.VSSDK.BuildTools" Version="17.9.3166" />
<!-- Tests -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="System.Reflection.MetadataLoadContext" Version="8.0.1" />
<PackageVersion Include="System.Reflection.MetadataLoadContext" Version="9.0.0" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
<!-- Misc -->
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.Win32.Registry" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" VersionOverride="4.11.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" GeneratePathProperty="true" />
Expand All @@ -29,7 +28,8 @@
<Visible>False</Visible>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)\analyzers\dotnet\cs\*.dll">
<!-- Use NetAnalyzer SDK-assemblies -->
<None Include="$(MicrosoftNETBuildTasksDirectoryRoot)..\analyzers\*.dll">
<Visible>False</Visible>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Unity.Analyzers/NonGenericGetComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private static async Task<Document> UseGenericGetComponentAsync(Document documen
.WithExpression(GenericName(
identifierSyntax.Identifier,
TypeArgumentList(
SeparatedList(new[] { typeOf.Type }))))
SeparatedList([typeOf.Type]))))
.WithArgumentList(newArgumentList);

// If we're casting the GetComponent result, remove the cast as the returned value is now type safe
Expand Down
2 changes: 1 addition & 1 deletion src/new-analyzer/new-analyzer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>NewAnalyzer</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down

0 comments on commit c5a0aee

Please sign in to comment.