11 writes to Path
aspire (3)
Configuration\AspireConfigFile.cs (2)
252
config.AppHost.
Path
= PathNormalizer.NormalizePathForStorage(
456
Path
= settings.AppHostPath,
Scaffolding\ScaffoldingService.cs (1)
273
config.AppHost.
Path
??= appHostRelativePath;
Aspire.Cli.Tests (8)
Configuration\AspireConfigFileTests.cs (3)
238
AppHost = new AspireConfigAppHost {
Path
= "src/AppHost/AppHost.csproj" },
272
AppHost = new AspireConfigAppHost {
Path
= "src/AppHost/AppHost.csproj" },
663
AppHost = new AspireConfigAppHost {
Path
= "App.csproj" },
Projects\ProjectLocatorTests.cs (5)
1731
Path
= "missing-apphost.ts",
3154
var config = new AspireConfigFile { AppHost = new AspireConfigAppHost {
Path
= "MyAppHost/MyAppHost.csproj" } };
3175
var config1 = new AspireConfigFile { AppHost = new AspireConfigAppHost {
Path
= "AppHost1.csproj" } };
3181
var config2 = new AspireConfigFile { AppHost = new AspireConfigAppHost {
Path
= "AppHost2.csproj" } };
3207
var config = new AspireConfigFile { AppHost = new AspireConfigAppHost {
Path
= "NonexistentAppHost/NonexistentAppHost.csproj" } };
38 references to Path
aspire (6)
Commands\RestoreCommand.cs (1)
211
if (!string.IsNullOrWhiteSpace(config.AppHost?.
Path
))
Configuration\AspireConfigFile.cs (1)
247
if (config.AppHost?.
Path
is { Length: > 0 } migratedPath && !Path.IsPathRooted(migratedPath))
Projects\DotNetAppHostProject.cs (2)
2334
if (!string.IsNullOrEmpty(config.AppHost?.
Path
))
2337
Path.GetFullPath(Path.Combine(directoryName, config.AppHost.
Path
)));
Projects\ProjectLocator.cs (2)
697
if (aspireConfig?.AppHost?.
Path
is { } configAppHostPath)
1263
if (existingConfig?.AppHost?.
Path
is { } existingPath &&
Aspire.Cli.Tests (32)
Commands\ConfigSourceCommandTests.cs (3)
989
Assert.Equal(appHostConfig ? "Test.AppHost.csproj" : "Test.AppHost/Test.AppHost.csproj", configuration.AppHost!.
Path
);
1026
Assert.Equal(configuration.AppHost.
Path
, refreshed.AppHost!.
Path
);
Commands\TemplateSourceStartupTests.cs (1)
331
Assert.Equal("apphost.cs", migrated.AppHost?.
Path
);
Configuration\AspireConfigFileTests.cs (19)
38
Assert.Equal("MyApp/MyApp.csproj", result.AppHost?.
Path
);
116
Assert.Equal("apphost.cs", result.AppHost?.
Path
);
166
Assert.Equal("MyApp/MyApp.csproj", result.AppHost?.
Path
);
186
Assert.Equal("MyApp/MyApp.csproj", result.AppHost?.
Path
);
681
Assert.Equal("App.csproj", loaded.AppHost?.
Path
);
706
Assert.Equal("src/apphost.ts", config.AppHost?.
Path
);
726
Assert.Equal("apphost.ts", config.AppHost?.
Path
);
748
Assert.Equal("MyApp.AppHost/MyApp.AppHost.csproj", config.AppHost?.
Path
);
773
Assert.Equal("src/apphost.ts", saved.AppHost?.
Path
);
794
Assert.Equal(absolutePath, config.AppHost?.
Path
);
816
Assert.Equal("src/apphost.ts", config.AppHost?.
Path
);
835
Assert.Equal("deeply/nested/path/apphost.ts", config.AppHost?.
Path
);
836
Assert.DoesNotContain("\\", config.AppHost?.
Path
);
856
Assert.Equal("", config.AppHost?.
Path
);
875
Assert.Null(config.AppHost?.
Path
);
895
Assert.Equal("MyApp.AppHost/apphost.ts", config.AppHost?.
Path
);
915
Assert.Equal("MyApp.AppHost/MyApp.AppHost.csproj", config.AppHost?.
Path
);
933
Assert.Equal("/path/apphost.ts", config.AppHost?.
Path
);
954
Assert.Equal("c:\\path\\apphost.ts", config.AppHost?.
Path
);
Projects\ProjectLocatorTests.cs (9)
1539
Assert.Equal("apphost.mts", updatedConfig?.AppHost?.
Path
);
1577
Assert.NotNull(settings!.AppHost?.
Path
);
1578
Assert.DoesNotContain('\\', settings.AppHost.
Path
); // Ensure no backslashes
1579
Assert.Contains('/', settings.AppHost.
Path
); // Ensure forward slashes
1640
Assert.Equal("apphost.ts", adjacentConfig?.AppHost?.
Path
);
1709
Assert.Null(appHost1Config?.AppHost?.
Path
);
1714
Assert.Equal("apphost.ts", appHost2Config?.AppHost?.
Path
);
1762
Assert.Equal("apphost.ts", healedConfig?.AppHost?.
Path
);
1808
Assert.NotNull(migratedConfig?.AppHost?.
Path
);