Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2833 commits
Select commit Hold shift + click to select a range
dcfc37e
Fix block bodied lambda attribute formatting (#12913)
davidwengier Mar 18, 2026
bd9d77d
Clean up CollectionExpression and Select combined usage (#12919)
ToddGrun Mar 18, 2026
7a25669
Add run-toolset-tests skill for ecosystem validation (#12920)
chsienki Mar 19, 2026
0176a80
Create failing test to demonstrate the issue
davidwengier Mar 18, 2026
54dbfae
Add BaseMarkupElementSyntax to syntax model
davidwengier Mar 18, 2026
1ce0bf0
Expose shared markup element tags
davidwengier Mar 18, 2026
bba30ed
Unify StartTag and EndTag callers
davidwengier Mar 18, 2026
26710fd
Widen script and style detection
davidwengier Mar 18, 2026
c073c33
Change HtmlFormattingPass to handle any element syntax node
davidwengier Mar 18, 2026
a80e27f
Make tag helper start tag optional
davidwengier Mar 18, 2026
7a73669
Move shared tag accessors to base types
davidwengier Mar 18, 2026
6dfeb13
Fix completion integration test stability
davidwengier Mar 19, 2026
6ce255a
Tweak completion session reset timing
davidwengier Mar 19, 2026
f09664f
Re-trigger stale completion sessions sooner
davidwengier Mar 19, 2026
42fb27d
Update dependencies from https://github.com/dotnet/arcade build 20260…
dotnet-maestro[bot] Mar 19, 2026
f4e6819
Fallback to editor completion command
davidwengier Mar 19, 2026
95e177c
Add an extra test for void elements that are with/without tag helpers…
davidwengier Mar 19, 2026
c7579f8
Revert completion command fallback
davidwengier Mar 19, 2026
31f9de8
Change service connection
missymessa Mar 19, 2026
c3319a4
Wait for Intellisense before completion commit
davidwengier Mar 19, 2026
904fd36
Only report hints in VS Code for unused directives
davidwengier Mar 19, 2026
8b77689
Tests, tests, tests
davidwengier Mar 19, 2026
75cda13
Fix failed fat finger following find function
davidwengier Mar 19, 2026
07169ff
Don't squiggle unused directives in VS Code (#12932)
davidwengier Mar 20, 2026
084a7ba
Don't need node no more
davidwengier Mar 20, 2026
75d8b7d
Change service connection (#12931)
davidwengier Mar 20, 2026
15665b9
Don't need node no more (#12937)
davidwengier Mar 22, 2026
62bbc42
Change additional indentation from a string to an int, so it can hand…
davidwengier Mar 24, 2026
53186a3
Move attribute indentation logic into GetAttributeIndentation
davidwengier Mar 24, 2026
e6844c2
Add some failing tests
davidwengier Mar 24, 2026
dc1d9b8
Update existing test baselines
davidwengier Mar 24, 2026
4801ce0
Add some more test.... some of which fail :(
davidwengier Mar 24, 2026
d84f9a9
Fix failing tests, and add message because I keep thinking these are …
davidwengier Mar 24, 2026
21fccf2
[main] Source code updates from dotnet/dotnet (#12945)
dotnet-maestro[bot] Mar 24, 2026
cf8ac96
Initial plan
Copilot Mar 24, 2026
20fa476
Initial plan
Copilot Mar 24, 2026
35976d9
Add Section_BraceOnNextLine_AtColumnZero test for issue #10796
Copilot Mar 24, 2026
69e8090
Add test for array initializer indentation inside HTML elements (fixe…
Copilot Mar 24, 2026
a769306
Update WorkItem link to GitHub issue #9826
Copilot Mar 24, 2026
332d635
Update Section_BraceOnNextLine_AtColumnZero test with nested HTML and…
Copilot Mar 24, 2026
e5c38fc
Fix htmlFormatted to match Windows HTML formatter output for table co…
Copilot Mar 24, 2026
9ecf467
Add test to validate section brace-on-next-line formatting (issue #10…
davidwengier Mar 24, 2026
381882d
Add regression test for array initializer indentation inside HTML ele…
davidwengier Mar 24, 2026
19513d3
Fix attribute formatting for short Html tags (#12944)
davidwengier Mar 24, 2026
e9acb82
More completion integration test "fixes" (#12933)
davidwengier Mar 24, 2026
d9362b9
Fix formatting of script tags that have/are tag helpers (#12922)
davidwengier Mar 25, 2026
00ffd05
Create indent cache
davidwengier Mar 25, 2026
7f07523
Use indent cache, and add tests
davidwengier Mar 25, 2026
6ed1a9d
Add benchmark
davidwengier Mar 25, 2026
6e2fe88
Remove unused GetOrParseCSharpSyntaxTree helper
davidwengier Mar 25, 2026
fa40d0e
Remove stale using directives
davidwengier Mar 25, 2026
8b40ed6
Remove stale methods and comments
davidwengier Mar 25, 2026
976033c
Remove another unused method
davidwengier Mar 25, 2026
105e959
Simplify IndentCache based on feedback
davidwengier Mar 25, 2026
15f89b6
Tweak benchmark
davidwengier Mar 26, 2026
30f6cf0
Remove unused GetOrParseCSharpSyntaxTree helper (#12951)
davidwengier Mar 26, 2026
63e4ec7
Introduce MaxSpaceCountInMixedString
davidwengier Mar 26, 2026
3c2c573
Create an indent cache for formatting (#12950)
davidwengier Mar 26, 2026
a961766
Add IR node types for unresolved tag helper elements
chsienki Mar 26, 2026
2ddcd5f
Add shared infrastructure to base LoweringVisitor class
chsienki Mar 26, 2026
d9ca32c
Refactor visitor subclasses to produce unresolved tag helper nodes
chsienki Mar 26, 2026
2b0c51d
Enable CFSClean* policies for Razor (#12955)
ToddGrun Mar 26, 2026
cb30323
Handle when there is non-whitespace content after the end of a Razor …
davidwengier Mar 27, 2026
cb887d3
Add resolution phase skeleton: entry point, tree walking, and element…
chsienki Mar 26, 2026
cfc9961
Implement legacy tag helper construction in resolution phase
chsienki Mar 26, 2026
73c7041
Implement component tag helper construction in resolution phase
chsienki Mar 26, 2026
31d1a11
Implement shared value lowering pipeline in resolution phase
chsienki Mar 26, 2026
c0e2886
Wire up resolution phase and fix downstream consumers
chsienki Mar 26, 2026
c97248b
Update tests and IR baselines for new pipeline
chsienki Mar 26, 2026
4e7d84d
Add source generator regression tests
chsienki Mar 26, 2026
599013a
Handle when there is non-whitespace content after the end of a Razor …
davidwengier Mar 27, 2026
435f002
Create remote settings service so we don't have to keep passing setti…
davidwengier Mar 26, 2026
1e1507f
Don't send client settings over each remote service call, just use DI…
davidwengier Mar 26, 2026
14acfc6
Stop creating RazorFormattingPass instances manually, rather convert …
davidwengier Mar 27, 2026
fdfde78
Convert RazorEditHelper into a proper service
davidwengier Mar 24, 2026
4876549
Actually use DI for things, now that we can
davidwengier Mar 24, 2026
3ff1faa
Copy TryGetMappedSpan into the one place that it's called from, to si…
davidwengier Mar 24, 2026
055d3c3
Call GetRazorDocumentEdits instead of doing our own mapping
davidwengier Mar 25, 2026
347dd2b
Call MapCSharpEditsAsync everywhere that GetRazorDocumentEdits was ca…
davidwengier Mar 25, 2026
edbd83d
Rename property to better represent the new code
davidwengier Mar 25, 2026
0af7cb9
Move GetRazorDocumentEdits to the edit mapping service where it is used
davidwengier Mar 25, 2026
d3b55a5
Simplify two loops into one, and capture edits that are skipped along…
davidwengier Mar 25, 2026
8448b8b
Simplify the work done in AddCSharpLanguageFeatureChanges by only pro…
davidwengier Mar 25, 2026
26be724
Support Generate Method code action in Razor documents
davidwengier Mar 26, 2026
c389052
Add tests to simulate code actions originating from Roslyn
davidwengier Mar 26, 2026
6918a0b
Fix indentation of the method we insert so everything looks perfect
davidwengier Mar 26, 2026
e7b55e4
Use the real indentation options instead of hardcoding, and add tests
davidwengier Mar 27, 2026
0914d57
Minor cleanup
davidwengier Mar 27, 2026
986594e
Honour CodeBlockBraceOnNextLine and update tests
davidwengier Mar 27, 2026
f505d31
Skip tests that are waiting for a Roslyn bump before they start passing
davidwengier Mar 27, 2026
b3a67f8
Fix benchmark after changes
davidwengier Mar 27, 2026
e5ff730
Remove the UseCache property and old benchmark
davidwengier Mar 27, 2026
06c797e
Remove the UseCache property and old benchmark (#12962)
davidwengier Mar 27, 2026
ddf5d68
Remove event handler on dispose (and seal the class)
davidwengier Mar 29, 2026
167ebd5
Doc service choice, and remove the annoying "internal for testing" co…
davidwengier Mar 29, 2026
8dd91a0
Move after if
davidwengier Mar 29, 2026
4904909
Doc comments
davidwengier Mar 29, 2026
48d93bf
Don't build a new array if nothing changed
davidwengier Mar 29, 2026
add189f
Remove unnecessary parameter, and doc
davidwengier Mar 29, 2026
8292712
Don't create TextSpans just to create RazorTextSpans
davidwengier Mar 29, 2026
6ce1262
Use cache
davidwengier Mar 29, 2026
c77d7af
Add back check for C# language features
davidwengier Mar 29, 2026
2720c92
Invert if
davidwengier Mar 29, 2026
519c609
Use the string builder more to avoid a bunch of intermediate strings
davidwengier Mar 30, 2026
5a2d63c
Avoid substring creation in TryGetMappedEdit
davidwengier Mar 30, 2026
c5c4146
Avoid iterator
davidwengier Mar 30, 2026
1fb1d4b
Support Generate Method code action in Razor and C# editors (#12960)
davidwengier Mar 30, 2026
defb7f0
Oops, tab size 0 is just going to throw
davidwengier Mar 30, 2026
c5b4ff3
Update dependencies from https://github.com/dotnet/arcade build 20260…
dotnet-maestro[bot] Mar 30, 2026
9f547b0
PR Feedback
davidwengier Mar 30, 2026
2456a19
Try using invoke instead of insertion
davidwengier Mar 30, 2026
20feb9c
Follow ups to Generate Method (#12972)
davidwengier Mar 31, 2026
0588e25
Remove dead code and simplify TryGetMappedEdit
davidwengier Mar 31, 2026
bf43f45
Roll IEditMappingService into IRazorEditService
davidwengier Mar 31, 2026
408d81d
Fix exception message
davidwengier Mar 31, 2026
ee03035
Rename GenerateMethod code action to GenerateEventHandler to disambig…
davidwengier Mar 31, 2026
6d1913a
Try to fix integration tests take 4 (#12978)
davidwengier Mar 31, 2026
31bf81d
Clean up and simplify the code that generates event handlers into cod…
davidwengier Mar 31, 2026
845903a
Simplify indentation handling for genetating event handlers in code-b…
davidwengier Mar 31, 2026
afb8471
Post-snap configuration updates (#12976)
jjonescz Mar 31, 2026
e626c1b
Only have one menu resource provided by the razor package. (#12979)
ToddGrun Mar 31, 2026
a4d38f2
Address code review feedback
chsienki Mar 31, 2026
ee7929e
Use Roslyn to find the code behind file and get its syntax tree, rath…
davidwengier Mar 31, 2026
85e82bb
Address additional code review feedback (batch 2)
chsienki Mar 31, 2026
515e993
Address code review feedback (batch 3)
chsienki Mar 31, 2026
b7f3e89
Address code review feedback (batch 4)
chsienki Mar 31, 2026
559ed64
Fix a couple of minor issues found in code review
davidwengier Mar 31, 2026
cfa7a66
Address code review feedback (batch 5)
chsienki Apr 1, 2026
a15bd9f
Address code review feedback (batch 6)
chsienki Apr 1, 2026
4dcdbe9
Comment updates after PR review
davidwengier Apr 2, 2026
711771a
Address code review feedback (batch 7)
chsienki Apr 2, 2026
a9bd3f8
Consolidate Edit services, and our two "Generate Method" systems (#12…
davidwengier Apr 2, 2026
0b058d9
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
dotnet-bot Apr 2, 2026
dc926e6
Remove project context, now that it's always null
davidwengier Apr 2, 2026
0a68517
Remove mostly unused FilePath property
davidwengier Apr 2, 2026
5b45de8
Remove mostly unused FileKind property
davidwengier Apr 2, 2026
7efe8d7
Remove realistically unused method
davidwengier Apr 2, 2026
b8a4ea3
Delete a bunch of unused classes I came across
davidwengier Apr 2, 2026
e64a025
Rename file now that there is only one type
davidwengier Apr 2, 2026
4acc01a
Remove almost entirely unused method
davidwengier Apr 2, 2026
c22097b
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
davidwengier Apr 2, 2026
ae3fde0
Update dependencies from https://github.com/dotnet/arcade build 20260…
dotnet-maestro[bot] Apr 2, 2026
0ba060b
Initial support for razor isolation files (cs, css, js) (#12981)
ToddGrun Apr 2, 2026
951f8eb
Clean up DocumentContext a little (#12990)
davidwengier Apr 2, 2026
1599e05
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
dotnet-bot Apr 2, 2026
182a23d
Address code review feedback (batch 8)
chsienki Apr 2, 2026
4a7f192
Address code review feedback (batch 9)
chsienki Apr 2, 2026
2f4392a
Merge main into deferred-tag-helper-lowering
chsienki Apr 2, 2026
71d8c92
Deferred tag helper lowering: separate resolution from lowering phase…
chsienki Apr 3, 2026
d496432
Make IntermediateNodeCollection implement IReadOnlyList<IntermediateN…
Copilot Apr 3, 2026
06ae056
Fix competing merges
davidwengier Apr 3, 2026
6f57fec
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
davidwengier Apr 3, 2026
5fd75b4
Disable draft insertions on main after VS snap (#12992)
jjonescz Apr 3, 2026
d73db55
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
dotnet-bot Apr 3, 2026
afcf31d
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
davidwengier Apr 3, 2026
8f71d1b
Remove Mariner 2.0 pipeline reference
richlander Apr 6, 2026
142926b
Fix silly bugs in formatting log test
davidwengier Apr 7, 2026
d148e9a
Create skill for formatting log tests
davidwengier Apr 7, 2026
46cadb9
Update skill because downloading from devcomm is apparently impossible
davidwengier Apr 7, 2026
c5a06f4
Rename ElementOrTagHelper IR nodes to UnresolvedElement (#13002)
Copilot Apr 7, 2026
a3f200d
Add failing test from formatting test log files
davidwengier Apr 7, 2026
9b9420a
Fix formatting log tests
davidwengier Apr 7, 2026
bf69b3d
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
dotnet-bot Apr 7, 2026
73f5fdd
Migrate VS insertion from RIT+PAT to roslyn-tools CLI+WIF
missymessa Apr 3, 2026
ac0f175
Preserve formatting log line endings
davidwengier Apr 8, 2026
51fc83d
Move formatting log attributes to root
davidwengier Apr 8, 2026
1a57b36
Preserve formatting log fixture bytes
davidwengier Apr 8, 2026
0bfab5e
Revert that last ugly change copilot made
davidwengier Apr 8, 2026
332ec99
Remove Mariner 2.0 pipeline reference (#13015)
davidwengier Apr 8, 2026
afe2fb5
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
davidwengier Apr 8, 2026
ba6eaf3
Fix line endings on pre-existing test files, and make the attribute c…
davidwengier Apr 8, 2026
8dcc052
Fix formatting log tests, and validate a bug is fixed (#13017)
davidwengier Apr 8, 2026
1eaf86c
Clean up RewrittenSyntaxTree naming and null handling in DefaultTagHe…
Copilot Apr 8, 2026
8b14f5f
Pass explicit AzDO token for dnceng instead of relying on DefaultAzur…
missymessa Apr 9, 2026
c39bfd8
Add editor context menu support for Razor nested file commands (#13023)
ToddGrun Apr 9, 2026
79fe57f
Update to a new Roslyn build
davidwengier Apr 9, 2026
044cb8b
Update dependencies and other packages to match Roslyn
davidwengier Apr 9, 2026
8a52951
Respond to new XUnit diagnostics
davidwengier Apr 9, 2026
f043c6d
Respond to LiveShare API nullability changes
davidwengier Apr 9, 2026
a6ba18b
Unskip Generate Method tests
davidwengier Apr 9, 2026
0fbe973
Update GTI tests in response to Roslyn changes (I guess 🤷‍♂️)
davidwengier Apr 9, 2026
213744e
Try downgrading Nuget, and not explicitly doing solution restore in i…
davidwengier Apr 9, 2026
77fd3ad
Fix references to eng folder to use the right property
davidwengier Apr 9, 2026
94964f9
Update dependencies from https://github.com/dotnet/arcade build 20260…
dotnet-maestro[bot] Apr 10, 2026
201cf8d
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
dotnet-bot Apr 10, 2026
ad41d32
Fix BOMs
davidwengier Apr 10, 2026
a027f8a
Add warning waves infrastructure to Razor compiler (#13016)
chsienki Apr 10, 2026
4bf45b8
Update Roslyn, and package versions to match Roslyn (#13028)
davidwengier Apr 10, 2026
e166783
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
davidwengier Apr 10, 2026
c41e82a
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
dotnet-bot Apr 10, 2026
d1391a7
Add parameterized generate method coverage
davidwengier Apr 10, 2026
ae39b43
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
davidwengier Apr 10, 2026
00b88c4
Migrate VS insertion from RIT+PAT to roslyn-tools CLI+WIF (#13010)
davidwengier Apr 10, 2026
9bee15f
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
dotnet-bot Apr 10, 2026
84a11ed
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
davidwengier Apr 11, 2026
693f058
Fix NRE in CohostDocumentPullDiagnosticsEndpointBase.GetDiagnosticsAs…
ToddGrun Apr 13, 2026
a7ea0e0
Fix Watson crash in ToRazorTextDocumentIdentifier when DocumentUri is…
ToddGrun Apr 13, 2026
c19cbe6
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
dotnet-bot Apr 13, 2026
a9316ac
Revert "Update Roslyn, and package versions to match Roslyn"
davidwengier Apr 13, 2026
0a1fc6e
Extract MergeSourceSpans helper and deduplicate condition branches in…
Copilot Apr 13, 2026
5813e6f
Break up ResolveElement method in DefaultTagHelperResolutionPhase (#1…
Copilot Apr 13, 2026
f6ed367
Localized file check-in by OneLocBuild Task: Build definition ID 262:…
davidwengier Apr 13, 2026
53cc988
Revert "Update Roslyn, and package versions to match Roslyn" (#13047)
davidwengier Apr 14, 2026
85f8fa0
Try downgrading Nuget, and not explicitly doing solution restore in i…
davidwengier Apr 9, 2026
b55115e
Fix references to eng folder to use the right property
davidwengier Apr 9, 2026
def864c
Revert package downgrade
davidwengier Apr 14, 2026
d117beb
Remove LazyContent.Create identity wrappers in resolution phase (#13004)
Copilot Apr 14, 2026
e48e0ad
Add With* convenience methods to SourceSpan (#13005)
Copilot Apr 14, 2026
1fa936c
Mop up a few remaining feedback items from https://github.com/dotnet/…
chsienki Apr 14, 2026
5269ad3
Minimal changes to prepare for repo merge (#13048)
davidwengier Apr 14, 2026
04231aa
[main] Source code updates from dotnet/dotnet (#13039)
dotnet-maestro[bot] Apr 14, 2026
18bd683
Backflow from https://github.com/dotnet/dotnet / b94d039 build 310323
dotnet-maestro[bot] Apr 15, 2026
286d4b1
Update dependencies from build 310323
dotnet-maestro[bot] Apr 15, 2026
013023b
Merge branch 'main' into davidwengier/enable-generate-parameterized-m…
davidwengier Apr 15, 2026
520d5b9
Add coverage for parameterized Generate Method (#13035)
davidwengier Apr 15, 2026
5d9cc6f
Enforce modifier order
davidwengier Apr 15, 2026
2c86a2d
Random cleanup
davidwengier Apr 15, 2026
1b0e6cc
Enforce code style on build in test projects, and fix issues
davidwengier Apr 15, 2026
7a485ed
Use consts
davidwengier Apr 15, 2026
4d34918
Enforce and fix CA1052
davidwengier Apr 15, 2026
fa11bd9
Remove various bits of unused code
davidwengier Apr 15, 2026
efecab6
Remove unused using (release only)
davidwengier Apr 15, 2026
0172d02
Random code cleanup found during repo merge work (#13053)
davidwengier Apr 15, 2026
0ae7262
Update dependencies from build 310568
dotnet-maestro[bot] Apr 16, 2026
35a6f0b
Update GTI tests in response to Roslyn changes (I guess 🤷‍♂️)
davidwengier Apr 9, 2026
2a5d329
[main] Source code updates from dotnet/dotnet (#13051)
davidwengier Apr 17, 2026
78f7bae
Update dependencies from https://github.com/dotnet/arcade build 20260…
dotnet-maestro[bot] Apr 17, 2026
d127e7f
Backflow from https://github.com/dotnet/dotnet / ab01524 build 310648
dotnet-maestro[bot] Apr 18, 2026
4217c91
Update dependencies from build 310648
dotnet-maestro[bot] Apr 18, 2026
d0a4b48
Unskip generate method and associated tests
davidwengier Apr 19, 2026
2e38756
Unskip generate method and associated tests (#13063)
davidwengier Apr 20, 2026
a9fc3cc
Fix component governance alerts
davidwengier Apr 20, 2026
3b67b0c
Fix multiline template formatting
davidwengier Apr 21, 2026
86a312d
Clarify template closure comment
davidwengier Apr 21, 2026
f90d960
Simplify template formatting regression
davidwengier Apr 21, 2026
8c1fe75
Update dependencies from https://github.com/dotnet/arcade build 20260…
dotnet-maestro[bot] Apr 21, 2026
0b55685
Tighten template formatting regression
davidwengier Apr 21, 2026
3c39849
Fix #13056 - Debugger and stack exception pointed to incorrect line/c…
dbreshears Apr 21, 2026
db3f9fe
[main] Update dependencies from dotnet/arcade (#13070)
davidwengier Apr 21, 2026
229087c
Fix active Component Governance alerts (#13065)
davidwengier Apr 21, 2026
b7e20f5
Perf: Skip GetAttributes() for non-viable component properties (#13091)
ToddGrun Apr 23, 2026
4d1a786
Return empty incomplete list when HTML completion fails in Razor (#13…
ToddGrun Apr 23, 2026
85e5f3f
Fix template attribute indentation
davidwengier Apr 24, 2026
84013d2
Fix formatting for self-closing multiline templates (#13069)
davidwengier Apr 24, 2026
85ba11c
Log file kind and syntax tree in formatting logs
davidwengier Apr 24, 2026
004af90
Update dependencies from https://github.com/dotnet/arcade build 20260…
dotnet-maestro[bot] Apr 24, 2026
83a704a
Log file kind and syntax tree in formatting logs (#13093)
davidwengier Apr 24, 2026
c7f163a
[main] Source code updates from dotnet/dotnet (#13058)
JoeRobich Apr 26, 2026
0f6925d
Parallelize HTML and OOP completion requests in Razor cohost endpoint…
ToddGrun Apr 26, 2026
7de7e4c
Merge main into release/vscode
davidwengier Apr 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .azuredevops/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 2

# Disabling dependabot on Azure DevOps as this is a mirrored repo. Updates should go through github.
enable-campaigned-updates: false
enable-security-updates: false
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"omnisharp.useModernNet": true,
"omnisharp.enableAsyncCompletion": true,
// ms-dotnettools.csdevkit settings
"dotnet.defaultSolution": "Razor.sln",
"dotnet.defaultSolution": "Razor.slnx",
// ms-vscode.powershell settings
"powershell.promptToUpdatePowerShell": false,
"powershell.integratedConsole.showOnStartup": false,
Expand Down
9 changes: 8 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ indent_size = 4
insert_final_newline = true
charset = utf-8-bom

file_header_template = Copyright (c) .NET Foundation. All rights reserved.\nLicensed under the MIT license. See License.txt in the project root for license information.
file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.

# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
Expand Down Expand Up @@ -226,3 +226,10 @@ dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_prefer_compound_assignment = true:suggestion

# IDE0036: Order modifiers
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
dotnet_diagnostic.IDE0036.severity = warning

# CA1052: Static holder types should be Static or NotInheritable
dotnet_diagnostic.CA1052.severity = warning
18 changes: 8 additions & 10 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths.
# See https://help.github.com/articles/about-code-owners/

/global.json @dotnet/razor-tooling @dotnet/razor-compiler
/azure-pipelines.yml @dotnet/razor-tooling @dotnet/razor-compiler
/eng/ @dotnet/razor-tooling @dotnet/razor-compiler
/global.json @dotnet/razor-tooling
/azure-pipelines.yml @dotnet/razor-tooling
/eng/ @dotnet/razor-tooling
/eng/targets/Services.props @dotnet/razor-tooling
/eng/common/ @dotnet/razor-tooling @dotnet/razor-compiler
/eng/Versions.props @dotnet/razor-tooling @dotnet/razor-compiler
/eng/Version.Details.xml @dotnet/razor-tooling @dotnet/razor-compiler
/eng/DotNetBuild.props @dotnet/product-construction
/eng/SourceBuild* @dotnet/source-build
/eng/common/ @dotnet/razor-tooling
/eng/Versions.props @dotnet/razor-tooling
/eng/Version.Details.xml @dotnet/razor-tooling
/src/Razor @dotnet/razor-tooling
/src/Compiler @dotnet/razor-compiler
/src/Shared @dotnet/razor-tooling @dotnet/razor-compiler
/src/Compiler @dotnet/razor-tooling
/src/Shared @dotnet/razor-tooling
51 changes: 51 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# GitHub Copilot Instructions for ASP.NET Core Razor

## Critical Rules

- **Build**: Use `build.cmd` (Windows) or `./build.sh` (Linux/Mac). NEVER use `dotnet build` directly.
- **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.
- **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.
- **Processes**: NEVER kill dotnet processes by name (`Stop-Process -Name`, `taskkill /IM`). Other work may be running on the machine.
- **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.
- **Helpers**: Review existing helpers (`UsingDirectiveHelper`, `AddUsingsHelper`, etc.) before writing new utility methods. Don't duplicate.

## File Types

- `.razor` — Blazor components. `.cshtml` — Razor views/pages (referred to as "Legacy" in the codebase).

## Code Patterns

- **Collections**: Use `ListPool<T>.GetPooledObject(out var list)` and `PooledArrayBuilder<T>` instead of allocating new collections. Prefer immutable collection types.
- **Positions**: Use `GetRequiredAbsoluteIndex` for converting positions to absolute indexes.
- **LSP conversions**: `sourceText.GetTextChange(textEdit)` converts LSP `TextEdit` → Roslyn `TextChange`. Reverse: `sourceText.GetTextEdit(change)`. Both in `LspExtensions_SourceText.cs`.
- **RazorCodeDocument**: Immutable — every `With*` method creates a new instance passing ALL fields through the constructor. When adding a new field, thread it through every existing `With*` method. Prefer computing derived data via extension methods (e.g., `GetUnusedDirectives()`) rather than storing computed results as fields.
- **Razor documents in Roslyn**: Stored as additional documents. Resolve via `solution.GetDocumentIdsWithFilePath(filePath)` → `solution.GetAdditionalDocument(documentId)`.
- **Remote services**: Place the public stub method (calling `RunServiceAsync`) directly above its private implementation method.

## Testing

- Place `[WorkItem("url")]` on tests that track a specific issue (GitHub or DevOps URL).
- Use `TestCode` with `[|...|]` span markers for before/after test scenarios. Access `input.Text` (cleaned) and `input.Span` (marked range).
- Prefer raw string literals (`"""..."""`) over verbatim strings (`@"..."`).
- Test end-user scenarios, not implementation details.
- Verify/helper methods go at the bottom of test files. New test methods go above them.
- New tooling tests go in `src\Razor\test\Microsoft.VisualStudioCode.RazorExtension.Test` (Cohosting architecture).
- Integration tests using `AdditionalSyntaxTrees` for tag helper discovery must set `UseTwoPhaseCompilation => true` (see `ComponentDiscoveryIntegrationTest`).

## Adding OOP Remote Services

When adding a new `IRemote*Service` and `Remote*Service`:

1. Interface → `src\Razor\src\Microsoft.CodeAnalysis.Razor.Workspaces\Remote\`
2. Implementation → `src\Razor\src\Microsoft.CodeAnalysis.Remote.Razor\`
3. Register in `RazorServices.cs` (add to `MessagePackServices` or `JsonServices`)
4. **Add entry to `eng\targets\Services.props`**: `Include="Microsoft.VisualStudio.Razor.{ShortName}"` with `ClassName="{FullTypeName}+Factory"`
5. Validate: `dotnet test src\Razor\test\Microsoft.CodeAnalysis.Remote.Razor.Test --filter "FullyQualifiedName~RazorServicesTest"`

## VS Code Validation

Run Playwright E2E tests (exception to the "no `dotnet test` at root" rule):
```powershell
cd src\Razor\test\Microsoft.VisualStudioCode.Razor.IntegrationTests
dotnet test
```
31 changes: 31 additions & 0 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,5 +260,36 @@ configuration:
- addMilestone:
milestone: Next
description: '[PRs] Milestone tracking'
- if:
- payloadType: Issues
- labelAdded:
label: breaking-change
then:
- addReply:
reply: >-
Refer to the [.NET SDK breaking change guidelines](https://github.com/dotnet/sdk/blob/main/documentation/project-docs/breaking-change-guidelines.md#required-process-for-all-net-sdk-breaking-changes)
description: Add breaking change doc instructions to issue
- if:
- payloadType: Pull_Request
- labelAdded:
label: breaking-change
then:
- addLabel:
label: needs-breaking-change-doc-created
- addReply:
reply: >-
Added `needs-breaking-change-doc-created` label because this PR has the `breaking-change` label.


When you commit this breaking change:


1. [ ] Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the [breaking change documentation template](https://aka.ms/dotnet/docs/new-breaking-change-issue), then remove this `needs-breaking-change-doc-created` label.

2. [ ] Ask a committer to mail the `.NET SDK Breaking Change Notification` email list.


You can refer to the [.NET SDK breaking change guidelines](https://github.com/dotnet/sdk/blob/main/documentation/project-docs/breaking-change-guidelines.md)
description: Add breaking change instructions to PR.
onFailure:
onSuccess:
Loading
Loading