diff --git a/Directory.Build.props b/Directory.Build.props index 703db742..ce00ccbc 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -74,7 +74,10 @@ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb $(MSBuildThisFileDirectory) - - $(MSBuildThisFileDirectory)=/ + + $(MSBuildThisFileDirectory)=/ diff --git a/tests/Abstractions.UnitTests/TagTests.cs b/tests/Abstractions.UnitTests/TagTests.cs index ff3d6af0..39d734b9 100644 --- a/tests/Abstractions.UnitTests/TagTests.cs +++ b/tests/Abstractions.UnitTests/TagTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. using Microsoft.Extensions.Logging; @@ -22,8 +22,17 @@ namespace Microsoft.Omex.Extensions.Abstractions.UnitTests string relativePath = "/tests/Abstractions.UnitTests/" + nameof(TagTests) + ".cs"; //This value should be change in case of changing file path or name - Assert.AreEqual(tag1.Name, relativePath, "tag1 Name should point to current file"); - Assert.AreEqual(tag2.Name, relativePath, "tag2 Name should point to current file"); + AssertTagNames(relativePath, tag1.Name, "tag1 Name should point to current file"); + AssertTagNames(relativePath, tag2.Name, "tag2 Name should point to current file"); + } + + private static void AssertTagNames(string expectedTag, string? actualTag, string message) + { +#if DEBUG + StringAssert.EndsWith(actualTag?.Replace('\\','/'), expectedTag, message); +#else + Assert.AreEqual(expectedTag, actualTag, message); +#endif } [DataTestMethod]