Skip to content

Commit f510ad5

Browse files
committed
Fixup
1 parent 76d01f7 commit f510ad5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Razor/Microsoft.NET.Sdk.Razor/integrationtests/BuildIncrementalismTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ async Task VerifyError()
113113

114114
Assert.BuildFailed(result);
115115

116-
// This needs to be relative path. Tracked by https://github.com/aspnet/Razor/issues/2187.
117116
var filePath = Path.Combine(Project.DirectoryPath, "Views", "Home", "Index.cshtml");
118117
var location = filePath + "(1,2)";
119118
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))

src/Razor/Microsoft.NET.Sdk.Razor/integrationtests/BuildIntegrationTest.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,14 @@ public async Task Build_ErrorInGeneratedCode_ReportsMSBuildError()
9696
Assert.BuildFailed(result);
9797

9898
// Verifying that the error correctly gets mapped to the original source
99-
Assert.BuildError(result, "CS1503", location: Path.Combine(Project.DirectoryPath, "Views", "Home", "Index.cshtml") + "(1,27)");
99+
var filePath = Path.Combine(Project.DirectoryPath, "Views", "Home", "Index.cshtml");
100+
var location = filePath + "(1,27)";
101+
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
102+
{
103+
// Absolute paths on OSX don't work well.
104+
location = null;
105+
}
106+
Assert.BuildError(result, "CS1503", location);
100107

101108
// Compilation failed without creating the views assembly
102109
Assert.FileExists(result, IntermediateOutputPath, "SimpleMvc.dll");

0 commit comments

Comments
 (0)