Skip to content

Commit 1c9aa2d

Browse files
committed
Set _buildConfiguration based on build mode
Use preprocessor directives to assign "Debug" or "Release" to _buildConfiguration depending on the build mode, ensuring correct configuration is used during test setup.
1 parent f96f9c7 commit 1c9aa2d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/coverlet.MTP.validation.tests/CollectCoverageTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ public class CollectCoverageTests
2727

2828
public CollectCoverageTests()
2929
{
30+
#if DEBUG
3031
_buildConfiguration = "Debug";
32+
#else
33+
_buildConfiguration = "Release";
34+
#endif
3135

3236
// Get local packages path (adjust based on your build output)
3337
_repoRoot = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", ".."));

0 commit comments

Comments
 (0)