summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-17 23:58:07 +0800
committerruki <[email protected]>2026-03-17 23:58:07 +0800
commitb80b83826ccb9c711f5cd0100f45f51fbb3ab22d (patch)
treee0f8ed33bcfd606892b9eb0c38d35b81126e00f3
parent3874b16f91e29868a4350b20d2c091af08284d44 (diff)
fix build csharp for macos
-rw-r--r--xmake/rules/csharp/xmake.lua7
1 files changed, 7 insertions, 0 deletions
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")