summaryrefslogtreecommitdiff
path: root/tests/projects/csharp/existing_csproj
diff options
context:
space:
mode:
authorJassJam <[email protected]>2026-02-28 15:37:56 +0000
committerruki <[email protected]>2026-03-14 00:10:58 +0800
commita92e7c4087443cd91dafe14d2a5aa316a288b7c5 (patch)
treee356878da6af96a71d547906006fe45ebdbb8ed3 /tests/projects/csharp/existing_csproj
parenta35ec2dcea9ca5c639ca9d1332a46ede16b959c0 (diff)
feat: generate csproj on demand
Diffstat (limited to 'tests/projects/csharp/existing_csproj')
-rw-r--r--tests/projects/csharp/existing_csproj/.gitignore6
-rw-r--r--tests/projects/csharp/existing_csproj/Program.cs2
-rw-r--r--tests/projects/csharp/existing_csproj/existing_csproj.csproj10
-rw-r--r--tests/projects/csharp/existing_csproj/test.lua10
-rw-r--r--tests/projects/csharp/existing_csproj/xmake.lua6
5 files changed, 34 insertions, 0 deletions
diff --git a/tests/projects/csharp/existing_csproj/.gitignore b/tests/projects/csharp/existing_csproj/.gitignore
new file mode 100644
index 000000000..6b8d3af38
--- /dev/null
+++ b/tests/projects/csharp/existing_csproj/.gitignore
@@ -0,0 +1,6 @@
+.xmake/
+build/
+bin/
+obj/
+vsxmake*/
+.vs/
diff --git a/tests/projects/csharp/existing_csproj/Program.cs b/tests/projects/csharp/existing_csproj/Program.cs
new file mode 100644
index 000000000..3751555cb
--- /dev/null
+++ b/tests/projects/csharp/existing_csproj/Program.cs
@@ -0,0 +1,2 @@
+// See https://aka.ms/new-console-template for more information
+Console.WriteLine("Hello, World!");
diff --git a/tests/projects/csharp/existing_csproj/existing_csproj.csproj b/tests/projects/csharp/existing_csproj/existing_csproj.csproj
new file mode 100644
index 000000000..ed9781c22
--- /dev/null
+++ b/tests/projects/csharp/existing_csproj/existing_csproj.csproj
@@ -0,0 +1,10 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>net10.0</TargetFramework>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ </PropertyGroup>
+
+</Project>
diff --git a/tests/projects/csharp/existing_csproj/test.lua b/tests/projects/csharp/existing_csproj/test.lua
new file mode 100644
index 000000000..5ab8adc69
--- /dev/null
+++ b/tests/projects/csharp/existing_csproj/test.lua
@@ -0,0 +1,10 @@
+import("lib.detect.find_tool")
+
+function test_build(t)
+ local dotnet = find_tool("dotnet")
+ if dotnet then
+ t:build()
+ else
+ return t:skip("dotnet not found")
+ end
+end
diff --git a/tests/projects/csharp/existing_csproj/xmake.lua b/tests/projects/csharp/existing_csproj/xmake.lua
new file mode 100644
index 000000000..95e5e45d9
--- /dev/null
+++ b/tests/projects/csharp/existing_csproj/xmake.lua
@@ -0,0 +1,6 @@
+add_rules("mode.debug", "mode.release")
+
+target("test")
+ set_kind("binary")
+ add_rules("csharp")
+ add_files("existing_csproj.csproj")