mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-10 09:15:47 +00:00
71423c17f9
* Add an AOT compatibility test app
Following the guides at
https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/prepare-libraries-for-trimming?pivots=dotnet-8-0
and https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/,
add an application which is published for AOT in CI.
This process fully verifies all code-paths in the library and its dependencies
for trimming/AOT, which the analyzers are not themselves able to do.
(As a side benefit, now we are also checking the library builds in Release)
* Test failure scenario
* Revert "Test failure scenario"
This reverts commit 6ff943b502.
20 lines
694 B
C#
20 lines
694 B
C#
using System;
|
|
|
|
namespace Renci.SshNet.AotCompatibilityTestApp
|
|
{
|
|
public static class Program
|
|
{
|
|
public static void Main()
|
|
{
|
|
// This app is used to verify the trim- and AOT-friendliness of
|
|
// the library and its dependencies, by specifying <TrimmerRootAssembly>
|
|
// in the csproj and publishing with e.g. "dotnet publish -c Release -r win-x64"
|
|
|
|
// See https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/prepare-libraries-for-trimming?pivots=dotnet-8-0
|
|
// and https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/
|
|
|
|
Console.WriteLine("Hello, AOT!");
|
|
}
|
|
}
|
|
}
|