diff options
Diffstat (limited to 'tests/projects/csharp/console')
| -rw-r--r-- | tests/projects/csharp/console/.gitignore | 6 | ||||
| -rw-r--r-- | tests/projects/csharp/console/src/Program.cs | 2 | ||||
| -rw-r--r-- | tests/projects/csharp/console/src/test.csproj | 9 | ||||
| -rw-r--r-- | tests/projects/csharp/console/test.lua | 10 | ||||
| -rw-r--r-- | tests/projects/csharp/console/xmake.lua | 6 |
5 files changed, 33 insertions, 0 deletions
diff --git a/tests/projects/csharp/console/.gitignore b/tests/projects/csharp/console/.gitignore new file mode 100644 index 000000000..6b8d3af38 --- /dev/null +++ b/tests/projects/csharp/console/.gitignore @@ -0,0 +1,6 @@ +.xmake/ +build/ +bin/ +obj/ +vsxmake*/ +.vs/ diff --git a/tests/projects/csharp/console/src/Program.cs b/tests/projects/csharp/console/src/Program.cs new file mode 100644 index 000000000..c7d5272d9 --- /dev/null +++ b/tests/projects/csharp/console/src/Program.cs @@ -0,0 +1,2 @@ +Console.WriteLine("hello xmake!"); + diff --git a/tests/projects/csharp/console/src/test.csproj b/tests/projects/csharp/console/src/test.csproj new file mode 100644 index 000000000..9dbab4973 --- /dev/null +++ b/tests/projects/csharp/console/src/test.csproj @@ -0,0 +1,9 @@ +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net8.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> +</Project> + diff --git a/tests/projects/csharp/console/test.lua b/tests/projects/csharp/console/test.lua new file mode 100644 index 000000000..5ab8adc69 --- /dev/null +++ b/tests/projects/csharp/console/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/console/xmake.lua b/tests/projects/csharp/console/xmake.lua new file mode 100644 index 000000000..25cd801f0 --- /dev/null +++ b/tests/projects/csharp/console/xmake.lua @@ -0,0 +1,6 @@ +add_rules("mode.debug", "mode.release") + +target("test") + set_kind("binary") + add_rules("csharp") + add_files("src/Program.cs", "src/test.csproj") |
