From b80b83826ccb9c711f5cd0100f45f51fbb3ab22d Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 17 Mar 2026 23:58:07 +0800 Subject: fix build csharp for macos --- xmake/rules/csharp/xmake.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xmake/rules/csharp/xmake.lua') diff --git a/xmake/rules/csharp/xmake.lua b/xmake/rules/csharp/xmake.lua index 4030c7457..9a0a6e43b 100644 --- a/xmake/rules/csharp/xmake.lua +++ b/xmake/rules/csharp/xmake.lua @@ -114,6 +114,13 @@ -- rule("csharp.build") set_sourcekinds("cs") + on_load(function (target) + -- dotnet always outputs .dll for libraries, and no prefix + if target:is_shared() or target:is_static() then + target:set("prefixname", "") + target:set("extension", ".dll") + end + end) on_config("config") on_build("build") on_install("install") -- cgit v1.3.1