Skip to content

Commit 5809a42

Browse files
committed
Fix test
1 parent 0fd6575 commit 5809a42

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

tests/Aspire.Hosting.Tests/MSBuildTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ await Verify(new
243243
var temp = tempDirectory?.Path;
244244
if (temp is not null)
245245
{
246-
line = line.Replace(temp, "{AspirePath}");
246+
line = line.Replace($"/private{temp}", "{AspirePath}") // Handle macOS temp symlinks
247+
.Replace(temp, "{AspirePath}")
248+
.Replace(Path.DirectorySeparatorChar, '/');
247249
}
248250
return line;
249251
});

tests/Aspire.Hosting.Tests/Snapshots/MSBuildTests.ValidateMetadataSources.verified.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,43 @@
44

55
namespace Projects;
66

7+
#pragma warning disable CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language.
78
/// <summary>
89
/// Metadata for the Aspire Host project.
910
/// </summary>
1011
[global::System.CodeDom.Compiler.GeneratedCode("Aspire.Hosting", null)]
1112
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage(Justification = "Generated code.")]
1213
[global::System.Diagnostics.DebuggerDisplay("Type = {GetType().Name,nq}, ProjectPath = {ProjectPath}")]
1314
public class AppHost
15+
#pragma warning restore CS8981
1416
{
1517
private AppHost() { }
1618

1719
/// <summary>
1820
/// The path to the Aspire Host project.
1921
/// </summary>
20-
public static string ProjectPath => """{AspirePath}\AppHost""";
22+
public static string ProjectPath => """{AspirePath}/AppHost""";
2123
}
2224
,
2325
App:
2426
// <auto-generated/>
2527

2628
namespace Projects;
2729

30+
#pragma warning disable CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language.
2831
/// <summary>
2932
/// Metadata for the App project.
3033
/// </summary>
3134
[global::System.CodeDom.Compiler.GeneratedCode("Aspire.Hosting", null)]
3235
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage(Justification = "Generated code.")]
3336
[global::System.Diagnostics.DebuggerDisplay("Type = {GetType().Name,nq}, ProjectPath = {ProjectPath}")]
3437
public class App : global::Aspire.Hosting.IProjectMetadata
38+
#pragma warning restore CS8981
3539
{
3640
/// <summary>
3741
/// The path to the App project.
3842
/// </summary>
39-
public string ProjectPath => """{AspirePath}\App\App.csproj""";
43+
public string ProjectPath => """{AspirePath}/App/App.csproj""";
4044
}
4145

4246
}

0 commit comments

Comments
 (0)