refactor: Update PublicApiCheck to net10

This commit is contained in:
jklawreszuk
2025-12-04 10:07:01 +01:00
parent 1f47ef28d4
commit 3e59ddc06c
3 changed files with 18 additions and 43 deletions
@@ -13,6 +13,17 @@ namespace Stride.PublicApiCheck
{
/// <summary>
/// Helper class to check public API consistency between assemblies.
/// This tool attempts to detect breaking changes.
/// <para>
/// Command-line usage:
/// <code>
/// ApiCheck.exe &lt;from&gt; &lt;to&gt;
/// Example:
/// ApiCheck.exe OldVersion.dll NewVersion.dll
/// </code>
/// This will compare the public API of <c>OldVersion.dll</c> against
/// <c>NewVersion.dll</c> and print missing API items, if any.
/// </para>
/// </summary>
public static class ApiCheck
{
@@ -92,7 +103,7 @@ namespace Stride.PublicApiCheck
if (diff.Count > 0)
{
var output = new StringBuilder();
output.AppendFormat("{0} public missing in {1}", diff.Count, Path.GetFileName(to));
output.AppendFormat("== {0} public missing in {1} ==", diff.Count, Path.GetFileName(to));
output.AppendLine();
foreach (var diffItem in diff)
{
@@ -1,28 +0,0 @@
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("24019b9e-209c-4d6d-8a1b-c4dbd7ec97a9")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyFileVersion("1.0.0.0")]
@@ -1,22 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net40</TargetFramework>
<StrideCommonDependenciesDir>..\..\..\deps\</StrideCommonDependenciesDir>
<StrideBuildTags>WindowsTools</StrideBuildTags>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Mono.Cecil" />
</ItemGroup>
</Project>