Skip to content

Commit e9f0e82

Browse files
authored
Merge branch 'release/9.0.1xx' into darc-release/9.0.1xx-97e88e94-edb9-4b5d-b56a-61684ee41e58
2 parents df7cda4 + cbec38b commit e9f0e82

File tree

5 files changed

+76
-71
lines changed

5 files changed

+76
-71
lines changed

NuGet.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<!-- Begin: Package sources from dotnet-runtime -->
1818
<!-- End: Package sources from dotnet-runtime -->
1919
<!-- Begin: Package sources from dotnet-templating -->
20-
<add key="darc-pub-dotnet-templating-e660cd9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-templating-e660cd90/nuget/v3/index.json" />
20+
<add key="darc-pub-dotnet-templating-b1003b4" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-templating-b1003b44/nuget/v3/index.json" />
2121
<!-- End: Package sources from dotnet-templating -->
2222
<!-- Begin: Package sources from dotnet-windowsdesktop -->
2323
<!-- End: Package sources from dotnet-windowsdesktop -->

eng/Version.Details.xml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
33
<ProductDependencies>
4-
<Dependency Name="Microsoft.TemplateEngine.Abstractions" Version="9.0.101">
4+
<Dependency Name="Microsoft.TemplateEngine.Abstractions" Version="9.0.102">
55
<Uri>https://github.com/dotnet/templating</Uri>
6-
<Sha>e660cd905cc907f7167c0826e2c30eb57a87e4da</Sha>
6+
<Sha>b1003b44bf4f77613101b9d31a55bb307515bb6d</Sha>
77
</Dependency>
8-
<Dependency Name="Microsoft.TemplateEngine.Mocks" Version="9.0.101-servicing.24565.5">
8+
<Dependency Name="Microsoft.TemplateEngine.Mocks" Version="9.0.102-servicing.24576.5">
99
<Uri>https://github.com/dotnet/templating</Uri>
10-
<Sha>e660cd905cc907f7167c0826e2c30eb57a87e4da</Sha>
10+
<Sha>b1003b44bf4f77613101b9d31a55bb307515bb6d</Sha>
1111
</Dependency>
1212
<!-- Intermediate is necessary for source build. -->
13-
<Dependency Name="Microsoft.SourceBuild.Intermediate.templating" Version="9.0.101-servicing.24565.5">
13+
<Dependency Name="Microsoft.SourceBuild.Intermediate.templating" Version="9.0.102-servicing.24576.5">
1414
<Uri>https://github.com/dotnet/templating</Uri>
15-
<Sha>e660cd905cc907f7167c0826e2c30eb57a87e4da</Sha>
15+
<Sha>b1003b44bf4f77613101b9d31a55bb307515bb6d</Sha>
1616
<SourceBuild RepoName="templating" ManagedOnly="true" />
1717
</Dependency>
1818
<Dependency Name="Microsoft.NETCore.App.Ref" Version="9.0.0">
@@ -325,22 +325,22 @@
325325
<Sha>af22effae4069a5dfb9b0735859de48820104f5b</Sha>
326326
<SourceBuild RepoName="aspnetcore" ManagedOnly="true" />
327327
</Dependency>
328-
<Dependency Name="Microsoft.CodeAnalysis.Razor.Tooling.Internal" Version="9.0.0-preview.24574.7">
328+
<Dependency Name="Microsoft.CodeAnalysis.Razor.Tooling.Internal" Version="9.0.0-preview.24576.1">
329329
<Uri>https://github.com/dotnet/razor</Uri>
330-
<Sha>88f8675df43ec706bb4089bd5f91d0a5dbbd3f94</Sha>
330+
<Sha>b5256abf658352440e61aa1372bbc0798e9ceb7d</Sha>
331331
</Dependency>
332-
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal" Version="9.0.0-preview.24574.7">
332+
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal" Version="9.0.0-preview.24576.1">
333333
<Uri>https://github.com/dotnet/razor</Uri>
334-
<Sha>88f8675df43ec706bb4089bd5f91d0a5dbbd3f94</Sha>
334+
<Sha>b5256abf658352440e61aa1372bbc0798e9ceb7d</Sha>
335335
</Dependency>
336-
<Dependency Name="Microsoft.NET.Sdk.Razor.SourceGenerators.Transport" Version="9.0.0-preview.24574.7">
336+
<Dependency Name="Microsoft.NET.Sdk.Razor.SourceGenerators.Transport" Version="9.0.0-preview.24576.1">
337337
<Uri>https://github.com/dotnet/razor</Uri>
338-
<Sha>88f8675df43ec706bb4089bd5f91d0a5dbbd3f94</Sha>
338+
<Sha>b5256abf658352440e61aa1372bbc0798e9ceb7d</Sha>
339339
</Dependency>
340340
<!-- Intermediate is necessary for source build. -->
341-
<Dependency Name="Microsoft.SourceBuild.Intermediate.razor" Version="9.0.0-preview.24574.7">
341+
<Dependency Name="Microsoft.SourceBuild.Intermediate.razor" Version="9.0.0-preview.24576.1">
342342
<Uri>https://github.com/dotnet/razor</Uri>
343-
<Sha>88f8675df43ec706bb4089bd5f91d0a5dbbd3f94</Sha>
343+
<Sha>b5256abf658352440e61aa1372bbc0798e9ceb7d</Sha>
344344
<SourceBuild RepoName="razor" ManagedOnly="true" />
345345
</Dependency>
346346
<Dependency Name="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0">
@@ -379,14 +379,14 @@
379379
<Uri>https://github.com/dotnet/test-templates</Uri>
380380
<Sha>49c9ad01f057b3c6352bbec12b117acc2224493c</Sha>
381381
</Dependency>
382-
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.9.0" Version="1.1.0-rtm.24570.2">
382+
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.9.0" Version="1.1.0-rtm.24578.1">
383383
<Uri>https://github.com/dotnet/test-templates</Uri>
384-
<Sha>2adf5822dc94d97d0f6e1584129fcf65ba837097</Sha>
384+
<Sha>cad654d589408f439a9b8c4ae9e09290a4e757c7</Sha>
385385
</Dependency>
386386
<!-- Intermediate is necessary for source build. -->
387-
<Dependency Name="Microsoft.SourceBuild.Intermediate.test-templates" Version="1.1.0-rtm.24570.2">
387+
<Dependency Name="Microsoft.SourceBuild.Intermediate.test-templates" Version="1.1.0-rtm.24578.1">
388388
<Uri>https://github.com/dotnet/test-templates</Uri>
389-
<Sha>2adf5822dc94d97d0f6e1584129fcf65ba837097</Sha>
389+
<Sha>cad654d589408f439a9b8c4ae9e09290a4e757c7</Sha>
390390
<SourceBuild RepoName="test-templates" ManagedOnly="true" />
391391
</Dependency>
392392
<!-- For coherency purposes, these versions should be gated by the versions of winforms and wpf routed via windowsdesktop -->
@@ -445,9 +445,9 @@
445445
<SourceBuild RepoName="command-line-api" ManagedOnly="true" />
446446
</Dependency>
447447
<!-- Intermediate is necessary for source build. -->
448-
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="9.0.0-alpha.1.24568.2">
448+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="9.0.0-alpha.1.24575.1">
449449
<Uri>https://github.com/dotnet/source-build-externals</Uri>
450-
<Sha>c65b1c1affed1f4847f9c3f81623dfa929d21e1a</Sha>
450+
<Sha>ab469606a3e6b026dcac301e2dab96117c94faeb</Sha>
451451
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
452452
</Dependency>
453453
<!-- Intermediate is necessary for source build. -->
@@ -460,34 +460,34 @@
460460
<Uri>https://github.com/dotnet/deployment-tools</Uri>
461461
<Sha>7871ee378dce87b64d930d4f33dca9c888f4034d</Sha>
462462
</Dependency>
463-
<Dependency Name="Microsoft.Build.Tasks.Git" Version="9.0.0-beta.24574.1">
463+
<Dependency Name="Microsoft.Build.Tasks.Git" Version="9.0.0-beta.24577.2">
464464
<Uri>https://github.com/dotnet/sourcelink</Uri>
465-
<Sha>084a76b3adf59dfbdc5c3f7614979e309910fa50</Sha>
465+
<Sha>928f459936292b3128b949957c7b46ae5ed59e4c</Sha>
466466
</Dependency>
467-
<Dependency Name="Microsoft.SourceLink.Common" Version="9.0.0-beta.24574.1">
467+
<Dependency Name="Microsoft.SourceLink.Common" Version="9.0.0-beta.24577.2">
468468
<Uri>https://github.com/dotnet/sourcelink</Uri>
469-
<Sha>084a76b3adf59dfbdc5c3f7614979e309910fa50</Sha>
469+
<Sha>928f459936292b3128b949957c7b46ae5ed59e4c</Sha>
470470
</Dependency>
471-
<Dependency Name="Microsoft.SourceLink.AzureRepos.Git" Version="9.0.0-beta.24574.1">
471+
<Dependency Name="Microsoft.SourceLink.AzureRepos.Git" Version="9.0.0-beta.24577.2">
472472
<Uri>https://github.com/dotnet/sourcelink</Uri>
473-
<Sha>084a76b3adf59dfbdc5c3f7614979e309910fa50</Sha>
473+
<Sha>928f459936292b3128b949957c7b46ae5ed59e4c</Sha>
474474
</Dependency>
475-
<Dependency Name="Microsoft.SourceLink.GitHub" Version="9.0.0-beta.24574.1">
475+
<Dependency Name="Microsoft.SourceLink.GitHub" Version="9.0.0-beta.24577.2">
476476
<Uri>https://github.com/dotnet/sourcelink</Uri>
477-
<Sha>084a76b3adf59dfbdc5c3f7614979e309910fa50</Sha>
477+
<Sha>928f459936292b3128b949957c7b46ae5ed59e4c</Sha>
478478
</Dependency>
479-
<Dependency Name="Microsoft.SourceLink.GitLab" Version="9.0.0-beta.24574.1">
479+
<Dependency Name="Microsoft.SourceLink.GitLab" Version="9.0.0-beta.24577.2">
480480
<Uri>https://github.com/dotnet/sourcelink</Uri>
481-
<Sha>084a76b3adf59dfbdc5c3f7614979e309910fa50</Sha>
481+
<Sha>928f459936292b3128b949957c7b46ae5ed59e4c</Sha>
482482
</Dependency>
483-
<Dependency Name="Microsoft.SourceLink.Bitbucket.Git" Version="9.0.0-beta.24574.1">
483+
<Dependency Name="Microsoft.SourceLink.Bitbucket.Git" Version="9.0.0-beta.24577.2">
484484
<Uri>https://github.com/dotnet/sourcelink</Uri>
485-
<Sha>084a76b3adf59dfbdc5c3f7614979e309910fa50</Sha>
485+
<Sha>928f459936292b3128b949957c7b46ae5ed59e4c</Sha>
486486
</Dependency>
487487
<!-- Intermediate is necessary for source build. -->
488-
<Dependency Name="Microsoft.SourceBuild.Intermediate.sourcelink" Version="9.0.0-beta.24574.1">
488+
<Dependency Name="Microsoft.SourceBuild.Intermediate.sourcelink" Version="9.0.0-beta.24577.2">
489489
<Uri>https://github.com/dotnet/sourcelink</Uri>
490-
<Sha>084a76b3adf59dfbdc5c3f7614979e309910fa50</Sha>
490+
<Sha>928f459936292b3128b949957c7b46ae5ed59e4c</Sha>
491491
<SourceBuild RepoName="sourcelink" ManagedOnly="true" />
492492
</Dependency>
493493
<!-- Intermediate is necessary for source build. -->

eng/Versions.props

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,6 @@
4040
referenced by the same 7.0 SDK that references the 7.0.VersionFeature70 runtime pack. -->
4141
<_NET70ILLinkPackVersion>7.0.100-1.23211.1</_NET70ILLinkPackVersion>
4242
</PropertyGroup>
43-
<PropertyGroup Label="AspNetCore template versioning">
44-
<!-- Automated versions for asp.net templates -->
45-
<MicrosoftNETSdkPatchVersion>$(VersionFeature)</MicrosoftNETSdkPatchVersion>
46-
<!--
47-
Between branding and shipping, the templates should stay at last month's version.
48-
If the incoming SDK version is 2 versions behind us, we know we just branded but haven't done the internal -> public merge yet.
49-
Therefore we stay at last month's version.
50-
We also need to special case the 1st patch release, because the incoming SDK version will never be 2 versions behind us in that case.
51-
Instead the indicator is that the incoming SDK version is not RTM or greater yet.
52-
Preview releases already use -1 versionining so don't subtract one for that version.
53-
In public builds, we always use the 2 month old version.
54-
-->
55-
<SubtractOneFromTemplateVersions Condition="'$(SYSTEM_TEAMPROJECT)' != 'internal'">true</SubtractOneFromTemplateVersions>
56-
<SubtractOneFromTemplateVersions Condition="$([MSBuild]::Subtract($(VersionFeature), $(MicrosoftNETSdkPatchVersion))) &gt;= 2">true</SubtractOneFromTemplateVersions>
57-
<SubtractOneFromTemplateVersions Condition="$(VersionFeature) &gt;= 1 AND ! $(PreReleaseVersionLabel.Contains('rtm')) AND ! $(PreReleaseVersionLabel.Contains('servicing'))">true</SubtractOneFromTemplateVersions>
58-
</PropertyGroup>
5943
<PropertyGroup Label="Restore feeds">
6044
<!-- In an orchestrated build, this may be overridden to other Azure feeds. -->
6145
<DotNetAssetRootUrl Condition="'$(DotNetAssetRootUrl)'==''">https://dotnetbuilds.blob.core.windows.net/public/</DotNetAssetRootUrl>
@@ -98,7 +82,7 @@
9882
<PropertyGroup>
9983
<!-- Dependency from https://github.com/dotnet/test-templates -->
10084
<!-- Supported versions -->
101-
<MicrosoftDotNetTestProjectTemplates90PackageVersion>1.1.0-rtm.24570.2</MicrosoftDotNetTestProjectTemplates90PackageVersion>
85+
<MicrosoftDotNetTestProjectTemplates90PackageVersion>1.1.0-rtm.24578.1</MicrosoftDotNetTestProjectTemplates90PackageVersion>
10286
</PropertyGroup>
10387
<PropertyGroup>
10488
<!-- Dependencies from https://github.com/dotnet/runtime -->
@@ -203,13 +187,13 @@
203187
</PropertyGroup>
204188
<PropertyGroup>
205189
<!-- Dependencies from https://github.com/dotnet/templating -->
206-
<MicrosoftTemplateEngineAbstractionsPackageVersion>9.0.101</MicrosoftTemplateEngineAbstractionsPackageVersion>
190+
<MicrosoftTemplateEngineAbstractionsPackageVersion>9.0.102</MicrosoftTemplateEngineAbstractionsPackageVersion>
207191
<MicrosoftTemplateEngineEdgePackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineEdgePackageVersion>
208192
<MicrosoftTemplateEngineOrchestratorRunnableProjectsPackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineOrchestratorRunnableProjectsPackageVersion>
209193
<MicrosoftTemplateEngineUtilsPackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineUtilsPackageVersion>
210194
<MicrosoftTemplateSearchCommonPackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateSearchCommonPackageVersion>
211195
<!-- test dependencies -->
212-
<MicrosoftTemplateEngineMocksPackageVersion>9.0.101-servicing.24565.5</MicrosoftTemplateEngineMocksPackageVersion>
196+
<MicrosoftTemplateEngineMocksPackageVersion>9.0.102-servicing.24576.5</MicrosoftTemplateEngineMocksPackageVersion>
213197
<MicrosoftTemplateEngineTestHelperPackageVersion>$(MicrosoftTemplateEngineMocksPackageVersion)</MicrosoftTemplateEngineTestHelperPackageVersion>
214198
<MicrosoftTemplateEngineAuthoringTemplateVerifierVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineAuthoringTemplateVerifierVersion>
215199
<MicrosoftTemplateSearchTemplateDiscoveryPackageVersion>$(MicrosoftTemplateEngineMocksPackageVersion)</MicrosoftTemplateSearchTemplateDiscoveryPackageVersion>
@@ -247,9 +231,9 @@
247231
</PropertyGroup>
248232
<PropertyGroup>
249233
<!-- Dependencies from https://github.com/dotnet/razor -->
250-
<MicrosoftAspNetCoreMvcRazorExtensionsToolingInternalPackageVersion>9.0.0-preview.24574.7</MicrosoftAspNetCoreMvcRazorExtensionsToolingInternalPackageVersion>
251-
<MicrosoftCodeAnalysisRazorToolingInternalVersion>9.0.0-preview.24574.7</MicrosoftCodeAnalysisRazorToolingInternalVersion>
252-
<MicrosoftNETSdkRazorSourceGeneratorsTransportPackageVersion>9.0.0-preview.24574.7</MicrosoftNETSdkRazorSourceGeneratorsTransportPackageVersion>
234+
<MicrosoftAspNetCoreMvcRazorExtensionsToolingInternalPackageVersion>9.0.0-preview.24576.1</MicrosoftAspNetCoreMvcRazorExtensionsToolingInternalPackageVersion>
235+
<MicrosoftCodeAnalysisRazorToolingInternalVersion>9.0.0-preview.24576.1</MicrosoftCodeAnalysisRazorToolingInternalVersion>
236+
<MicrosoftNETSdkRazorSourceGeneratorsTransportPackageVersion>9.0.0-preview.24576.1</MicrosoftNETSdkRazorSourceGeneratorsTransportPackageVersion>
253237
</PropertyGroup>
254238
<PropertyGroup>
255239
<!-- Dependencies from https://github.com/dotnet/wpf -->
@@ -293,12 +277,12 @@
293277
</PropertyGroup>
294278
<PropertyGroup>
295279
<!-- Dependencies from https://github.com/dotnet/sourcelink -->
296-
<MicrosoftBuildTasksGitVersion>9.0.0-beta.24574.1</MicrosoftBuildTasksGitVersion>
297-
<MicrosoftSourceLinkCommonVersion>9.0.0-beta.24574.1</MicrosoftSourceLinkCommonVersion>
298-
<MicrosoftSourceLinkAzureReposGitVersion>9.0.0-beta.24574.1</MicrosoftSourceLinkAzureReposGitVersion>
299-
<MicrosoftSourceLinkGitHubVersion>9.0.0-beta.24574.1</MicrosoftSourceLinkGitHubVersion>
300-
<MicrosoftSourceLinkGitLabVersion>9.0.0-beta.24574.1</MicrosoftSourceLinkGitLabVersion>
301-
<MicrosoftSourceLinkBitbucketGitVersion>9.0.0-beta.24574.1</MicrosoftSourceLinkBitbucketGitVersion>
280+
<MicrosoftBuildTasksGitVersion>9.0.0-beta.24577.2</MicrosoftBuildTasksGitVersion>
281+
<MicrosoftSourceLinkCommonVersion>9.0.0-beta.24577.2</MicrosoftSourceLinkCommonVersion>
282+
<MicrosoftSourceLinkAzureReposGitVersion>9.0.0-beta.24577.2</MicrosoftSourceLinkAzureReposGitVersion>
283+
<MicrosoftSourceLinkGitHubVersion>9.0.0-beta.24577.2</MicrosoftSourceLinkGitHubVersion>
284+
<MicrosoftSourceLinkGitLabVersion>9.0.0-beta.24577.2</MicrosoftSourceLinkGitLabVersion>
285+
<MicrosoftSourceLinkBitbucketGitVersion>9.0.0-beta.24577.2</MicrosoftSourceLinkBitbucketGitVersion>
302286
</PropertyGroup>
303287
<!-- Get .NET Framework reference assemblies from NuGet packages -->
304288
<PropertyGroup>

src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.JSModules.targets

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@ Copyright (c) .NET Foundation. All rights reserved.
3636

3737
<ResolveCoreStaticWebAssetsDependsOn>
3838
$(ResolveCoreStaticWebAssetsDependsOn);
39-
ResolveJSModuleStaticWebAssets;
4039
ResolveJsInitializerModuleStaticWebAssets;
4140
</ResolveCoreStaticWebAssetsDependsOn>
4241

42+
<ResolveCoreStaticWebAssetsDependsOn Condition="'$(UsingMicrosoftNETSdkRazor)' == 'true'">
43+
$(ResolveCoreStaticWebAssetsDependsOn);
44+
ResolveJSModuleStaticWebAssets;
45+
</ResolveCoreStaticWebAssetsDependsOn>
46+
4347
</PropertyGroup>
4448

4549
<PropertyGroup>
@@ -229,7 +233,7 @@ Copyright (c) .NET Foundation. All rights reserved.
229233
>
230234
<Output TaskParameter="ResolvedEndpoints" ItemName="_ResolvedJSBuildModuleEndpoints" />
231235
</ResolveStaticWebAssetEndpointRoutes>
232-
236+
233237
<GenerateJsModuleManifest
234238
Condition="'@(_ExistingBuildJSModules)' != ''"
235239
OutputFile="@(_JsModuleBuildManifestCandidate)"
@@ -341,7 +345,7 @@ Copyright (c) .NET Foundation. All rights reserved.
341345
>
342346
<Output TaskParameter="ResolvedEndpoints" ItemName="_ResolvedJSPublishModuleEndpoints" />
343347
</ResolveStaticWebAssetEndpointRoutes>
344-
348+
345349
<GenerateJsModuleManifest
346350
Condition="'@(_ExistingPublishJSModules)' != ''"
347351
OutputFile="@(_JsModulePublishManifestCandidate)"
@@ -389,7 +393,7 @@ Copyright (c) .NET Foundation. All rights reserved.
389393
</Target>
390394

391395
<!-- JS file modules -->
392-
<Target Name="ResolveJSModuleStaticWebAssets" DependsOnTargets="ResolveProjectStaticWebAssets">
396+
<Target Name="ResolveJSModuleStaticWebAssets" DependsOnTargets="ResolveProjectStaticWebAssets;ResolveRazorComponentInputs;ResolveRazorGenerateInputs">
393397

394398
<ItemGroup>
395399
<!-- To avoid situations where the content is defined twice, if the user defines the JS module explicitly as

test/Microsoft.NET.Sdk.Razor.Tests/ScopedCssIntegrationTests.cs

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,15 +410,32 @@ public void RegeneratingScopedCss_ForProject()
410410

411411
// Make an edit
412412
var scopedCssFile = Path.Combine(ProjectDirectory.TestRoot, "Components", "Pages", "Index.razor.css");
413-
File.WriteAllLines(scopedCssFile, File.ReadAllLines(scopedCssFile).Concat(new[] { "body { background-color: orangered; }" }));
413+
File.WriteAllLines(scopedCssFile, File.ReadAllLines(scopedCssFile).Concat(["body { background-color: orangered; }"]));
414+
415+
build = CreateBuildCommand(ProjectDirectory);
416+
ExecuteCommand(build, "/t:UpdateStaticWebAssetsDesignTime").Should().Pass();
417+
418+
// Verify the generated file contains newly added css
419+
AssertFileContains(bundlePath, "background-color: orangered");
420+
421+
// Verify that CSS edits continue to apply after new JS modules are added to the project
422+
// https://github.com/dotnet/aspnetcore/issues/57599
423+
var collocatedJsFile = Path.Combine(ProjectDirectory.TestRoot, "Components", "Pages", "Index.razor.js");
424+
File.WriteAllLines(collocatedJsFile, ["console.log('Hello, world!');"]);
425+
File.WriteAllLines(scopedCssFile, File.ReadAllLines(scopedCssFile).Concat(["h1 { color: purple; }"]));
414426

415427
build = CreateBuildCommand(ProjectDirectory);
416428
ExecuteCommand(build, "/t:UpdateStaticWebAssetsDesignTime").Should().Pass();
417429

418-
var fileInfo = new FileInfo(bundlePath);
419-
fileInfo.Should().Exist();
420430
// Verify the generated file contains newly added css
421-
fileInfo.ReadAllText().Should().Contain("background-color: orangered");
431+
AssertFileContains(bundlePath, "color: purple");
432+
433+
static void AssertFileContains(string fileName, string content)
434+
{
435+
var fileInfo = new FileInfo(fileName);
436+
fileInfo.Should().Exist();
437+
fileInfo.ReadAllText().Should().Contain(content);
438+
}
422439
}
423440
}
424441

0 commit comments

Comments
 (0)