Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/System.CommandLine.Tests/CompilationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,11 @@ public void RootCommand_name_falls_back_to_the_AppContext_value_when_hosted_as_a

private static string NativeLibraryFileName(string assemblyName) =>
OperatingSystem.IsWindows() ? $"{assemblyName}.dll"
: OperatingSystem.IsMacOS() ? $"{assemblyName}.dylib"
: $"{assemblyName}.so";
// NativeAOT applies the "lib" prefix to native library outputs on Unix by
// default starting with the .NET 11 SDK (see dotnet/docs#52324). This repo
// pins an 11.x SDK via global.json, so the prefix is always present.
: OperatingSystem.IsMacOS() ? $"lib{assemblyName}.dylib"
: $"lib{assemblyName}.so";

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate int GetExecutableNameDelegate(IntPtr buffer, int bufferLength);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<ControlFlowGuard>Guard</ControlFlowGuard>
<IsTestUtilityProject>true</IsTestUtilityProject>
<!-- This is the default in net11.0, remove this once NetMinimum is bumped -->
<_UseNativeLibPrefix Condition="'$(NetMinimum)' == 'net10.0'">true</_UseNativeLibPrefix>
</PropertyGroup>

<PropertyGroup>
Expand Down