Skip to content

Commit e12a695

Browse files
committed
Fix ApiApprovalTests to run in debug or release
1 parent 109989c commit e12a695

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

QRCoderApiTests/ApiApprovalTests.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ public void PublicApi(Type type)
5252
string projectName = type.Assembly.GetName().Name!;
5353
string testDir = Path.Combine(baseDir, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..");
5454
string projectDir = Path.Combine(testDir, "..");
55-
string buildDir = Path.Combine(projectDir, projectName, "bin", "Release");
55+
string buildDir = Path.Combine(projectDir, projectName, "bin",
56+
#if DEBUG
57+
"Debug");
58+
#else
59+
"Release");
60+
#endif
5661
Debug.Assert(Directory.Exists(buildDir), $"Directory '{buildDir}' doesn't exist");
5762
string csProject = Path.Combine(projectDir, projectName, projectName + ".csproj");
5863
var project = XDocument.Load(csProject);

0 commit comments

Comments
 (0)