10 writes to Path
aspire (3)
Configuration\AspireConfigFile.cs (2)
238config.AppHost.Path = PathNormalizer.NormalizePathForStorage( 442Path = settings.AppHostPath,
Scaffolding\ScaffoldingService.cs (1)
273config.AppHost.Path ??= appHostRelativePath;
Aspire.Cli.Tests (7)
Configuration\AspireConfigFileTests.cs (2)
180AppHost = new AspireConfigAppHost { Path = "src/AppHost/AppHost.csproj" }, 589AppHost = new AspireConfigAppHost { Path = "App.csproj" },
Projects\ProjectLocatorTests.cs (5)
1729Path = "missing-apphost.ts", 3152var config = new AspireConfigFile { AppHost = new AspireConfigAppHost { Path = "MyAppHost/MyAppHost.csproj" } }; 3173var config1 = new AspireConfigFile { AppHost = new AspireConfigAppHost { Path = "AppHost1.csproj" } }; 3179var config2 = new AspireConfigFile { AppHost = new AspireConfigAppHost { Path = "AppHost2.csproj" } }; 3205var config = new AspireConfigFile { AppHost = new AspireConfigAppHost { Path = "NonexistentAppHost/NonexistentAppHost.csproj" } };
33 references to Path
aspire (6)
Commands\RestoreCommand.cs (1)
211if (!string.IsNullOrWhiteSpace(config.AppHost?.Path))
Configuration\AspireConfigFile.cs (1)
233if (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)
699if (aspireConfig?.AppHost?.Path is { } configAppHostPath) 1254if (existingConfig?.AppHost?.Path is { } existingPath &&
Aspire.Cli.Tests (27)
Configuration\AspireConfigFileTests.cs (18)
37Assert.Equal("MyApp/MyApp.csproj", result.AppHost?.Path); 108Assert.Equal("MyApp/MyApp.csproj", result.AppHost?.Path); 128Assert.Equal("MyApp/MyApp.csproj", result.AppHost?.Path); 607Assert.Equal("App.csproj", loaded.AppHost?.Path); 632Assert.Equal("src/apphost.ts", config.AppHost?.Path); 652Assert.Equal("apphost.ts", config.AppHost?.Path); 674Assert.Equal("MyApp.AppHost/MyApp.AppHost.csproj", config.AppHost?.Path); 699Assert.Equal("src/apphost.ts", saved.AppHost?.Path); 720Assert.Equal(absolutePath, config.AppHost?.Path); 742Assert.Equal("src/apphost.ts", config.AppHost?.Path); 761Assert.Equal("deeply/nested/path/apphost.ts", config.AppHost?.Path); 762Assert.DoesNotContain("\\", config.AppHost?.Path); 782Assert.Equal("", config.AppHost?.Path); 801Assert.Null(config.AppHost?.Path); 821Assert.Equal("MyApp.AppHost/apphost.ts", config.AppHost?.Path); 841Assert.Equal("MyApp.AppHost/MyApp.AppHost.csproj", config.AppHost?.Path); 859Assert.Equal("/path/apphost.ts", config.AppHost?.Path); 880Assert.Equal("c:\\path\\apphost.ts", config.AppHost?.Path);
Projects\ProjectLocatorTests.cs (9)
1537Assert.Equal("apphost.mts", updatedConfig?.AppHost?.Path); 1575Assert.NotNull(settings!.AppHost?.Path); 1576Assert.DoesNotContain('\\', settings.AppHost.Path); // Ensure no backslashes 1577Assert.Contains('/', settings.AppHost.Path); // Ensure forward slashes 1638Assert.Equal("apphost.ts", adjacentConfig?.AppHost?.Path); 1707Assert.Null(appHost1Config?.AppHost?.Path); 1712Assert.Equal("apphost.ts", appHost2Config?.AppHost?.Path); 1760Assert.Equal("apphost.ts", healedConfig?.AppHost?.Path); 1806Assert.NotNull(migratedConfig?.AppHost?.Path);