31 writes to ContentRoot
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (1)
StaticWebAssetsBaselineFactory.cs (1)
235asset.ContentRoot = TemplatizeFilePath(
Microsoft.NET.Sdk.StaticWebAssets.Tasks (4)
Compression\ResolveCompressedAssets.cs (1)
325ContentRoot = outputPath,
Data\StaticWebAsset.cs (3)
711ContentRoot = contentRoot, 743ContentRoot = !string.IsNullOrEmpty(ContentRoot) ? NormalizeContentRootPath(ContentRoot) : ContentRoot; 1425ContentRoot = metadataValue;
Microsoft.NET.Sdk.StaticWebAssets.Tests (26)
ComputeStaticWebAssetsTargetPathsTest.cs (1)
116ContentRoot = Directory.GetCurrentDirectory(),
StaticWebAssets\ApplyCompressionNegotiationTest.cs (1)
1456ContentRoot = Directory.GetCurrentDirectory(),
StaticWebAssets\ComputeEndpointsForReferenceStaticWebAssetsTest.cs (1)
110ContentRoot = Directory.GetCurrentDirectory(),
StaticWebAssets\ComputeReferenceStaticWebAssetItemsTest.cs (1)
352ContentRoot = Directory.GetCurrentDirectory(),
StaticWebAssets\ComputeStaticWebAssetsForCurrentProjectTest.cs (1)
291ContentRoot = Directory.GetCurrentDirectory(),
StaticWebAssets\DefineStaticWebAssetEndpointsTest.cs (1)
603ContentRoot = Directory.GetCurrentDirectory(),
StaticWebAssets\DiscoverPrecompressedAssetsTest.cs (2)
47ContentRoot = Path.Combine(Environment.CurrentDirectory,"wwwroot"), 72ContentRoot = Path.Combine(Environment.CurrentDirectory, "wwwroot"),
StaticWebAssets\FilterStaticWebAssetEndpointsTest.cs (1)
290ContentRoot = Directory.GetCurrentDirectory(),
StaticWebAssets\GenerateStaticWebAssetEndpointsManifestTest.cs (1)
468ContentRoot = Directory.GetCurrentDirectory(),
StaticWebAssets\GenerateStaticWebAssetEndpointsPropsFileTest.cs (1)
176ContentRoot = Directory.GetCurrentDirectory(),
StaticWebAssets\GenerateStaticWebAssetsDevelopmentManifestTest.cs (1)
741ContentRoot = StaticWebAsset.NormalizeContentRootPath(contentRoot ?? Environment.CurrentDirectory),
StaticWebAssets\GenerateStaticWebAssetsManifestTest.cs (2)
153a => a.ContentRoot = "", 410ContentRoot = Directory.GetCurrentDirectory(),
StaticWebAssets\ResolveCompressedAssetsTest.cs (9)
45ContentRoot = Path.GetDirectoryName(ItemSpec), 99ContentRoot = Path.Combine(Environment.CurrentDirectory,"wwwroot"), 124ContentRoot = Path.Combine(Environment.CurrentDirectory, "wwwroot"), 165ContentRoot = Path.GetDirectoryName(ItemSpec), 210ContentRoot = Path.GetDirectoryName(ItemSpec), 267ContentRoot = Path.GetDirectoryName(ItemSpec), 311ContentRoot = Path.GetDirectoryName(ItemSpec), 360ContentRoot = Path.GetDirectoryName(ItemSpec), 425ContentRoot = Path.GetDirectoryName(ItemSpec),
StaticWebAssets\ResolveFingerprintedStaticWebAssetEndpointsForAssetsTest.cs (1)
243ContentRoot = Directory.GetCurrentDirectory(),
StaticWebAssets\UpdateStaticWebAssetEndpointsTest.cs (1)
355ContentRoot = Directory.GetCurrentDirectory(),
StaticWebAssetsBaselineFactory.cs (1)
235asset.ContentRoot = TemplatizeFilePath(
54 references to ContentRoot
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (7)
AspNetSdkBaselineTest.cs (2)
130!File.Exists(Path.Combine(a.ContentRoot, a.RelativePath)) && 136.Select(a => Path.GetFullPath(Path.Combine(a.ContentRoot, a.RelativePath))))
StaticWebAssetsBaselineComparer.cs (4)
266if (manifestAsset.ContentRoot != expectedAsset.ContentRoot) 268assetDifferences.Add($"Expected manifest ContentRoot of {expectedAsset.ContentRoot} but found {manifestAsset.ContentRoot}.");
StaticWebAssetsBaselineFactory.cs (1)
236asset.ContentRoot,
Microsoft.NET.Sdk.StaticWebAssets.Tasks (30)
Data\StaticWebAsset.cs (22)
60_contentRoot = asset.ContentRoot; 122get => _contentRoot ??= GetOriginalItemMetadata(nameof(ContentRoot)); 603if (string.IsNullOrEmpty(ContentRoot)) 605throw new InvalidOperationException($"The '{nameof(ContentRoot)}' for the asset must be defined for '{Identity}'."); 743ContentRoot = !string.IsNullOrEmpty(ContentRoot) ? NormalizeContentRootPath(ContentRoot) : ContentRoot; 809string.Equals(ContentRoot, NormalizeContentRootPath(path), StringComparison.Ordinal); 876result = string.Compare(ContentRoot, other.ContentRoot, StringComparison.Ordinal); 978ContentRoot == other.ContentRoot && 1121$"ContentRoot: {ContentRoot}, " + 1149hash.Add(ContentRoot); 1332nameof(ContentRoot), 1385nameof(ContentRoot) => ContentRoot ?? "", 1424case nameof(ContentRoot): 1494{ nameof(ContentRoot), ContentRoot ?? "" }, 1533destinationItem.SetMetadata(nameof(ContentRoot), ContentRoot ?? "");
DefineStaticWebAssets.Cache.cs (1)
52nameof(StaticWebAsset.SourceType), nameof(StaticWebAsset.BasePath), nameof(StaticWebAsset.ContentRoot),
DefineStaticWebAssets.cs (3)
190var contentRoot = ComputePropertyValue(candidate, nameof(StaticWebAsset.ContentRoot), ContentRoot); 436var normalizedContentRoot = StaticWebAsset.NormalizeContentRootPath(string.IsNullOrEmpty(candidate.GetMetadata(nameof(StaticWebAsset.ContentRoot))) ? 438candidate.GetMetadata(nameof(StaticWebAsset.ContentRoot)));
GenerateStaticWebAssetsDevelopmentManifest.cs (4)
183if (!contentRootIndex.TryGetValue(asset.ContentRoot, out var index)) 186contentRootIndex.Add(asset.ContentRoot, contentRootIndex.Count); 313if (asset.Identity.StartsWith(asset.ContentRoot, OSPath.PathComparison)) 319return StaticWebAsset.Normalize(asset.Identity[asset.ContentRoot.Length..]);
Microsoft.NET.Sdk.StaticWebAssets.Tests (17)
AspNetSdkBaselineTest.cs (2)
130!File.Exists(Path.Combine(a.ContentRoot, a.RelativePath)) && 136.Select(a => Path.GetFullPath(Path.Combine(a.ContentRoot, a.RelativePath))))
StaticWebAssets\DiscoverStaticWebAssetsTest.cs (9)
51asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 105asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 155asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 206asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 253asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 300asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 347asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 555asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(expected); 805task.Assets[0].GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be("/home/user/work/Repo/Project/");
StaticWebAssets\ReadStaticWebAssetsManifestFileTest.cs (1)
182asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().BeEquivalentTo($"{contentRoot}");
StaticWebAssetsBaselineComparer.cs (4)
266if (manifestAsset.ContentRoot != expectedAsset.ContentRoot) 268assetDifferences.Add($"Expected manifest ContentRoot of {expectedAsset.ContentRoot} but found {manifestAsset.ContentRoot}.");
StaticWebAssetsBaselineFactory.cs (1)
236asset.ContentRoot,