10 writes to Path
aspire (3)
Configuration\AspireConfigFile.cs (2)
201
config.AppHost.
Path
= PathNormalizer.NormalizePathForStorage(
407
Path
= settings.AppHostPath,
Scaffolding\ScaffoldingService.cs (1)
260
config.AppHost.
Path
??= appHostRelativePath;
Aspire.Cli.Tests (7)
Configuration\AspireConfigFileTests.cs (2)
180
AppHost = new AspireConfigAppHost {
Path
= "src/AppHost/AppHost.csproj" },
426
AppHost = new AspireConfigAppHost {
Path
= "App.csproj" },
Projects\ProjectLocatorTests.cs (5)
1667
Path
= "missing-apphost.ts",
3070
var config = new AspireConfigFile { AppHost = new AspireConfigAppHost {
Path
= "MyAppHost/MyAppHost.csproj" } };
3091
var config1 = new AspireConfigFile { AppHost = new AspireConfigAppHost {
Path
= "AppHost1.csproj" } };
3097
var config2 = new AspireConfigFile { AppHost = new AspireConfigAppHost {
Path
= "AppHost2.csproj" } };
3123
var config = new AspireConfigFile { AppHost = new AspireConfigAppHost {
Path
= "NonexistentAppHost/NonexistentAppHost.csproj" } };
33 references to Path
aspire (6)
Commands\RestoreCommand.cs (1)
211
if (!string.IsNullOrWhiteSpace(config.AppHost?.
Path
))
Configuration\AspireConfigFile.cs (1)
196
if (config.AppHost?.
Path
is { Length: > 0 } migratedPath && !Path.IsPathRooted(migratedPath))
Projects\DotNetAppHostProject.cs (2)
2280
if (!string.IsNullOrEmpty(config.AppHost?.
Path
))
2282
var resolvedAppHostPath = Path.GetFullPath(Path.Combine(directoryName, config.AppHost.
Path
));
Projects\ProjectLocator.cs (2)
705
if (aspireConfig?.AppHost?.
Path
is { } configAppHostPath)
1237
if (existingConfig?.AppHost?.
Path
is { } existingPath &&
Aspire.Cli.Tests (27)
Configuration\AspireConfigFileTests.cs (18)
37
Assert.Equal("MyApp/MyApp.csproj", result.AppHost?.
Path
);
108
Assert.Equal("MyApp/MyApp.csproj", result.AppHost?.
Path
);
128
Assert.Equal("MyApp/MyApp.csproj", result.AppHost?.
Path
);
444
Assert.Equal("App.csproj", loaded.AppHost?.
Path
);
469
Assert.Equal("src/apphost.ts", config.AppHost?.
Path
);
489
Assert.Equal("apphost.ts", config.AppHost?.
Path
);
511
Assert.Equal("MyApp.AppHost/MyApp.AppHost.csproj", config.AppHost?.
Path
);
536
Assert.Equal("src/apphost.ts", saved.AppHost?.
Path
);
557
Assert.Equal(absolutePath, config.AppHost?.
Path
);
579
Assert.Equal("src/apphost.ts", config.AppHost?.
Path
);
598
Assert.Equal("deeply/nested/path/apphost.ts", config.AppHost?.
Path
);
599
Assert.DoesNotContain("\\", config.AppHost?.
Path
);
619
Assert.Equal("", config.AppHost?.
Path
);
638
Assert.Null(config.AppHost?.
Path
);
658
Assert.Equal("MyApp.AppHost/apphost.ts", config.AppHost?.
Path
);
678
Assert.Equal("MyApp.AppHost/MyApp.AppHost.csproj", config.AppHost?.
Path
);
696
Assert.Equal("/path/apphost.ts", config.AppHost?.
Path
);
717
Assert.Equal("c:\\path\\apphost.ts", config.AppHost?.
Path
);
Projects\ProjectLocatorTests.cs (9)
1475
Assert.Equal("apphost.mts", updatedConfig?.AppHost?.
Path
);
1513
Assert.NotNull(settings!.AppHost?.
Path
);
1514
Assert.DoesNotContain('\\', settings.AppHost.
Path
); // Ensure no backslashes
1515
Assert.Contains('/', settings.AppHost.
Path
); // Ensure forward slashes
1576
Assert.Equal("apphost.ts", adjacentConfig?.AppHost?.
Path
);
1645
Assert.Null(appHost1Config?.AppHost?.
Path
);
1650
Assert.Equal("apphost.ts", appHost2Config?.AppHost?.
Path
);
1698
Assert.Equal("apphost.ts", healedConfig?.AppHost?.
Path
);
1744
Assert.NotNull(migratedConfig?.AppHost?.
Path
);