Files
ssh.net/test/Renci.SshNet.AotCompatibilityTestApp/Program.cs
T
Rob Hague 71423c17f9 Add an AOT compatibility test app (#1378)
* 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.
2024-04-19 13:00:57 +02:00

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!");
}
}
}