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