diff options
| author | JassJam <[email protected]> | 2026-02-24 18:07:52 +0000 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-14 00:10:13 +0800 |
| commit | f50b335260956986a7dc9e476d72e2ab95a70002 (patch) | |
| tree | 7827f6864dc6a1e44dab38082eec6ff753927da2 | |
| parent | 454997b0d4e7775ea70f81986528e7fc21dc50f9 (diff) | |
feat: add documentation for C# build rule usage
| -rw-r--r-- | xmake/rules/csharp/xmake.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xmake/rules/csharp/xmake.lua b/xmake/rules/csharp/xmake.lua index bc8a98023..778ea4fc4 100644 --- a/xmake/rules/csharp/xmake.lua +++ b/xmake/rules/csharp/xmake.lua @@ -18,6 +18,21 @@ -- @file xmake.lua -- +-- define rule: build csharp target with dotnet +-- +-- @code +-- target("app") +-- set_kind("binary") -- or "shared" +-- add_rules("csharp") +-- add_files("src/*.cs", "src/app.csproj") +-- +-- -- optional: override runtime identifier (arch-specific) for self-contained publish (e.g. "win-x64", "linux-x64", "osx-x64", "osx-arm64") +-- -- add_values("csharp.runtime_identifier", "win-x64") +-- +-- -- optional: dotnet verbosity (quiet|minimal|normal|detailed|diagnostic) +-- -- set_policy("build.csharp.dotnet_verbosity", "minimal") +-- @endcode +-- rule("csharp") set_extensions(".cs", ".csproj") set_sourcekinds("cs", "csproj", {objectfiles = false}) |
