Skip to content

Commit 3d5767e

Browse files
committed
C#: Make sure that dotnet clean also removes the bin and obj folders.
1 parent f0f4fe7 commit 3d5767e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

csharp/ql/integration-tests/all-platforms/dotnet_run/dotnet_run.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@
77
<Nullable>enable</Nullable>
88
</PropertyGroup>
99

10+
<Target Name="DeleteBinObjFolders" BeforeTargets="Clean">
11+
<RemoveDir Directories=".\bin" />
12+
<RemoveDir Directories=".\obj" />
13+
</Target>
1014
</Project>

csharp/ql/integration-tests/all-platforms/dotnet_run/test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
run_codeql_database_create(['dotnet run'], test_db="test-db", db=None, lang="csharp")
55

66
# no arguments, but `--`
7-
run_codeql_database_create(['dotnet clean', 'rm -rf test-db obj bin', 'dotnet run --'], test_db="test2-db", db=None, lang="csharp")
7+
run_codeql_database_create(['dotnet clean', 'rm -rf test-db', 'dotnet run --'], test_db="test2-db", db=None, lang="csharp")
88

99
# two arguments, no `--`
10-
run_codeql_database_create(['dotnet clean', 'rm -rf test2-db obj bin', 'dotnet run hello world'], test_db="test3-db", db=None, lang="csharp")
10+
run_codeql_database_create(['dotnet clean', 'rm -rf test2-db', 'dotnet run hello world'], test_db="test3-db", db=None, lang="csharp")
1111

1212
# two arguments, and `--`
13-
run_codeql_database_create(['dotnet clean', 'rm -rf test3-db obj bin', 'dotnet run -- hello world'], test_db="test4-db", db=None, lang="csharp")
13+
run_codeql_database_create(['dotnet clean', 'rm -rf test3-db', 'dotnet run -- hello world'], test_db="test4-db", db=None, lang="csharp")
1414

1515
# shared compilation enabled; tracer should override by changing the command
1616
# to `dotnet run -p:UseSharedCompilation=true -p:UseSharedCompilation=false -- hello world`
17-
run_codeql_database_create(['dotnet clean', 'rm -rf test4-db obj bin', 'dotnet run -p:UseSharedCompilation=true -- hello world'], test_db="test5-db", db=None, lang="csharp")
17+
run_codeql_database_create(['dotnet clean', 'rm -rf test4-db', 'dotnet run -p:UseSharedCompilation=true -- hello world'], test_db="test5-db", db=None, lang="csharp")

0 commit comments

Comments
 (0)