diff options
| author | ruki <[email protected]> | 2026-03-16 23:48:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-16 23:48:44 +0800 |
| commit | 8aa975d2fc26c603146c933684aba299bd3dc60c (patch) | |
| tree | 7171a1e31b74bd464bfd3097ae9afbce6830d541 /xmake/rules/csharp | |
| parent | 9ef3fac69885dccdb5feb27fed261b05984b914b (diff) | |
improve to get csproj file
Diffstat (limited to 'xmake/rules/csharp')
| -rw-r--r-- | xmake/rules/csharp/build/target.lua | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/xmake/rules/csharp/build/target.lua b/xmake/rules/csharp/build/target.lua index 522ef05f0..689bbe6c5 100644 --- a/xmake/rules/csharp/build/target.lua +++ b/xmake/rules/csharp/build/target.lua @@ -42,14 +42,9 @@ function build_sourcefiles(target, sourcebatch, opt) local targetfile = target:targetfile() -- get source files and kind - local sourcefiles = table.copy(sourcebatch.sourcefiles) + local sourcefiles = sourcebatch.sourcefiles local sourcekind = sourcebatch.sourcekind - - -- prepend .csproj file so dotnet tool can find it - local csprojfile = _get_csprojfile(target) - if csprojfile then - table.insert(sourcefiles, 1, csprojfile) - end + local csprojfile = _get_csprojfile(target) -- get depend file local dependfile = target:dependfile(targetfile) @@ -84,7 +79,7 @@ function build_sourcefiles(target, sourcebatch, opt) -- update files and values to the dependent file dependinfo.values = depvalues - table.join2(dependinfo.files, sourcefiles) + table.join2(dependinfo.files, sourcefiles, csprojfile) depend.save(dependinfo, dependfile) end |
