Skip to content

Commit 5ff448a

Browse files
[main] Source code updates from dotnet/razor (#5456)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
1 parent 7d1bae2 commit 5ff448a

29 files changed

+595
-527
lines changed

src/razor/.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- **Build**: Use `build.cmd` (Windows) or `./build.sh` (Linux/Mac). NEVER use `dotnet build` directly.
66
- **Test**: Use `build.cmd -test` or target a specific project with `dotnet test path/to/Project.csproj`. NEVER run `dotnet test` at the repo root — it includes Playwright integration tests that require VS Code and waste significant time.
7+
- **Build wrappers**: Be careful passing `-projects` through `build.cmd`/PowerShell wrappers. Do not pass a semicolon-delimited project list through a nested PowerShell command invocation, because PowerShell can treat `;` as a statement separator and open `.csproj` files in Visual Studio. Prefer a single project at a time, or invoke the underlying script in a way that preserves the full `-projects` value as one argument.
78
- **Processes**: NEVER kill dotnet processes by name (`Stop-Process -Name`, `taskkill /IM`). Other work may be running on the machine.
89
- **Bug fixes**: Look for existing code that already handles the scenario before adding new code. The bug is more likely in existing logic than a missing feature.
910
- **Helpers**: Review existing helpers (`UsingDirectiveHelper`, `AddUsingsHelper`, etc.) before writing new utility methods. Don't duplicate.

src/razor/docs/Formatting.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ Razor formatting can sometimes behave unexpectedly or appear to do nothing. This
44
explains common causes and describes concrete steps you can take to reproduce issues and
55
help us investigate.
66

7+
## Formatting causes an error or crash
8+
9+
If formatting produces an error, C# or HTML formatting likely produced a change Razor cannot
10+
handle. If this happens you might see an info bar in Visual Studio, or a popup in VS Code, saying
11+
"Formatting error." and "Please report this issue". We can usually fix these errors quickly, but
12+
we need detailed information to find the root cause. Turn on Formatting Logging (see the bottom
13+
of this doc) and attach the resulting logs to your issue so we can reproduce and resolve the crash.
14+
715
## Formatting appears to do nothing
816

917
The formatter deliberately aborts if it detects a change that would modify any non-whitespace
@@ -34,13 +42,6 @@ repro if you can — smaller repros help us diagnose and fix the issue faster.
3442
Also enable formatting logging and attach the logs to the issue; those logs contain useful
3543
diagnostic information we need to investigate formatting bugs.
3644

37-
## Formatting causes an error or crash
38-
39-
If formatting produces an error, C# or HTML formatting likely produced a change Razor cannot
40-
handle. We can usually fix these errors quickly, but we need detailed information to find the
41-
root cause. Turn on Formatting Logging and attach the resulting logs to your issue so we can
42-
reproduce and resolve the crash.
43-
4445
## Turn on Formatting Logging
4546

4647
1. Create a folder on your machine to receive logs.

src/razor/eng/Version.Details.props

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ This file should be imported by eng/Versions.props
55
-->
66
<Project>
77
<PropertyGroup>
8-
<!-- dotnet/roslyn dependencies -->
8+
<!-- dotnet-arcade dependencies -->
9+
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26160.1</MicrosoftDotNetArcadeSdkPackageVersion>
10+
<!-- dotnet-aspnetcore dependencies -->
11+
<MicrosoftExtensionsObjectPoolPackageVersion>10.0.1</MicrosoftExtensionsObjectPoolPackageVersion>
12+
<!-- dotnet-roslyn dependencies -->
913
<MicrosoftCodeAnalysisAnalyzersPackageVersion>5.5.0-2.26118.1</MicrosoftCodeAnalysisAnalyzersPackageVersion>
1014
<MicrosoftCodeAnalysisCommonPackageVersion>5.5.0-2.26118.1</MicrosoftCodeAnalysisCommonPackageVersion>
1115
<MicrosoftCodeAnalysisCSharpPackageVersion>5.5.0-2.26118.1</MicrosoftCodeAnalysisCSharpPackageVersion>
@@ -30,17 +34,17 @@ This file should be imported by eng/Versions.props
3034
<MicrosoftVisualStudioExtensibilityTestingXunitPackageVersion>5.5.0-2.26118.1</MicrosoftVisualStudioExtensibilityTestingXunitPackageVersion>
3135
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.5.0-2.26118.1</MicrosoftVisualStudioLanguageServicesPackageVersion>
3236
<RoslynDiagnosticsAnalyzersPackageVersion>5.5.0-2.26118.1</RoslynDiagnosticsAnalyzersPackageVersion>
33-
<!-- dotnet/arcade dependencies -->
34-
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26123.2</MicrosoftDotNetArcadeSdkPackageVersion>
35-
<!-- dotnet/aspnetcore dependencies -->
36-
<MicrosoftExtensionsObjectPoolPackageVersion>10.0.1</MicrosoftExtensionsObjectPoolPackageVersion>
37-
<!-- dotnet/runtime dependencies -->
37+
<!-- dotnet-runtime dependencies -->
3838
<SystemCollectionsImmutablePackageVersion>10.0.1</SystemCollectionsImmutablePackageVersion>
3939
<SystemReflectionMetadataPackageVersion>10.0.1</SystemReflectionMetadataPackageVersion>
4040
</PropertyGroup>
4141
<!--Property group for alternate package version names-->
4242
<PropertyGroup>
43-
<!-- dotnet/roslyn dependencies -->
43+
<!-- dotnet-arcade dependencies -->
44+
<MicrosoftDotNetArcadeSdkVersion>$(MicrosoftDotNetArcadeSdkPackageVersion)</MicrosoftDotNetArcadeSdkVersion>
45+
<!-- dotnet-aspnetcore dependencies -->
46+
<MicrosoftExtensionsObjectPoolVersion>$(MicrosoftExtensionsObjectPoolPackageVersion)</MicrosoftExtensionsObjectPoolVersion>
47+
<!-- dotnet-roslyn dependencies -->
4448
<MicrosoftCodeAnalysisAnalyzersVersion>$(MicrosoftCodeAnalysisAnalyzersPackageVersion)</MicrosoftCodeAnalysisAnalyzersVersion>
4549
<MicrosoftCodeAnalysisCommonVersion>$(MicrosoftCodeAnalysisCommonPackageVersion)</MicrosoftCodeAnalysisCommonVersion>
4650
<MicrosoftCodeAnalysisCSharpVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisCSharpVersion>
@@ -65,11 +69,7 @@ This file should be imported by eng/Versions.props
6569
<MicrosoftVisualStudioExtensibilityTestingXunitVersion>$(MicrosoftVisualStudioExtensibilityTestingXunitPackageVersion)</MicrosoftVisualStudioExtensibilityTestingXunitVersion>
6670
<MicrosoftVisualStudioLanguageServicesVersion>$(MicrosoftVisualStudioLanguageServicesPackageVersion)</MicrosoftVisualStudioLanguageServicesVersion>
6771
<RoslynDiagnosticsAnalyzersVersion>$(RoslynDiagnosticsAnalyzersPackageVersion)</RoslynDiagnosticsAnalyzersVersion>
68-
<!-- dotnet/arcade dependencies -->
69-
<MicrosoftDotNetArcadeSdkVersion>$(MicrosoftDotNetArcadeSdkPackageVersion)</MicrosoftDotNetArcadeSdkVersion>
70-
<!-- dotnet/aspnetcore dependencies -->
71-
<MicrosoftExtensionsObjectPoolVersion>$(MicrosoftExtensionsObjectPoolPackageVersion)</MicrosoftExtensionsObjectPoolVersion>
72-
<!-- dotnet/runtime dependencies -->
72+
<!-- dotnet-runtime dependencies -->
7373
<SystemCollectionsImmutableVersion>$(SystemCollectionsImmutablePackageVersion)</SystemCollectionsImmutableVersion>
7474
<SystemReflectionMetadataVersion>$(SystemReflectionMetadataPackageVersion)</SystemReflectionMetadataVersion>
7575
</PropertyGroup>

src/razor/eng/Version.Details.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@
100100
</Dependency>
101101
</ProductDependencies>
102102
<ToolsetDependencies>
103-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26123.2">
103+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26160.1">
104104
<Uri>https://github.com/dotnet/arcade</Uri>
105-
<Sha>4d898652733deb7dd274237ac06d27ee2ad85b36</Sha>
105+
<Sha>8b0ca8dba65be0853690ce98ae8f950a25ff8421</Sha>
106106
</Dependency>
107107
<!-- Necessary for source-build. This allows Microsoft.Extensions.ObjectPool and System.Collections.Immutable packages
108108
to be retrieved from live source-build and their content consumed by packages produced by razor.
@@ -120,4 +120,4 @@
120120
<Sha>138d5fe8f32e954a3a834be6360a834688130d4f</Sha>
121121
</Dependency>
122122
</ToolsetDependencies>
123-
</Dependencies>
123+
</Dependencies>

src/razor/eng/common/core-templates/steps/publish-logs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ steps:
3131
-runtimeSourceFeed https://ci.dot.net/internal
3232
-runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)'
3333
'$(publishing-dnceng-devdiv-code-r-build-re)'
34-
'$(MaestroAccessToken)'
3534
'$(dn-bot-all-orgs-artifact-feeds-rw)'
3635
'$(akams-client-id)'
3736
'$(microsoft-symbol-server-pat)'

src/razor/global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"rollForward": "latestPatch"
2222
},
2323
"msbuild-sdks": {
24-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26123.2",
24+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26160.1",
2525
"Microsoft.Build.NoTargets": "3.7.0"
2626
}
2727
}

0 commit comments

Comments
 (0)