Skip to content

Commit 5caaa59

Browse files
authored
Merge branch 'main' into CohostDebugBlazorWasm
2 parents f4eb05e + 15d3bb7 commit 5caaa59

File tree

5 files changed

+76
-10
lines changed

5 files changed

+76
-10
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55

66
# 2.89.x
77
* Register Blazor WASM debugger in Razor Cohosting (PR: [#8511](https://github.com/dotnet/vscode-csharp/pull/8511))
8+
* Bump Razor to 10.0.0-preview.25411.5 (PR: [#8512](https://github.com/dotnet/vscode-csharp/pull/8512))
9+
* Fix VS Code cohosting completion when Razor and C# are valid (PR: [#12096](https://github.com/dotnet/razor/pull/12096))
10+
* Fix null reference exception in formatting (PR: [#12097](https://github.com/dotnet/razor/pull/12097))
11+
* Fix cohost override setting (PR: [#12082](https://github.com/dotnet/razor/pull/12082))
12+
* Cohost span mapping (PR: [#12055](https://github.com/dotnet/razor/pull/12055))
13+
* Explicitly deny certain Roslyn formatting options (PR: [#12064](https://github.com/dotnet/razor/pull/12064))
14+
* Don't use `requestContext` in document closed endpoint (PR: [#12080](https://github.com/dotnet/razor/pull/12080))
815

916
# 2.88.x
1017
* Enable Razor Cohosting "on" by default (PR: [#8469](https://github.com/dotnet/vscode-csharp/pull/8469))
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
trigger: none
2+
pr: none
3+
4+
resources:
5+
repositories:
6+
- repository: 1ESPipelineTemplates
7+
type: git
8+
name: 1ESPipelineTemplates/1ESPipelineTemplates
9+
ref: refs/tags/release
10+
pipelines:
11+
- pipeline: CI
12+
project: DevDiv
13+
source: VisualStudio.Conversations
14+
branch: main
15+
extends:
16+
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
17+
parameters:
18+
pool:
19+
name: AzurePipelines-EO
20+
image: 1ESPT-Windows2022
21+
os: windows
22+
stages:
23+
- stage: Upload
24+
jobs:
25+
- job: UploadToServer
26+
displayName: Upload to server
27+
pool:
28+
name: AzurePipelines-EO
29+
image: 1ESPT-Windows2022
30+
os: windows
31+
templateContext:
32+
type: releaseJob
33+
isProduction: false #change this
34+
inputs:
35+
- input: pipelineArtifact
36+
pipeline: CI
37+
artifactName: partnerDeployables-Windows
38+
destinationPath: $(Pipeline.Workspace)/artifacts
39+
40+
steps:
41+
- checkout: none
42+
43+
- task: CopyFiles@2
44+
displayName: 'Copy files from Zip folder to staging directory'
45+
inputs:
46+
SourceFolder: '$(Pipeline.Workspace)/'
47+
Contents: '**/*Roslyn.LanguageServer*.zip'
48+
TargetFolder: '$(Build.ArtifactStagingDirectory)/staging'
49+
CleanTargetFolder: true
50+
51+
- task: AzureFileCopy@6
52+
displayName: "Copy the zip to Azure Storage"
53+
inputs:
54+
SourcePath: '$(Build.ArtifactStagingDirectory)/staging/*'
55+
azureSubscription: "$(AzSubscription)"
56+
Destination: "AzureBlob"
57+
storage: "$(AzStorage)"
58+
ContainerName: "$(AzContainerName)"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"defaults": {
4343
"roslyn": "5.0.0-2.25405.5",
4444
"omniSharp": "1.39.14",
45-
"razor": "10.0.0-preview.25403.1",
45+
"razor": "10.0.0-preview.25411.5",
4646
"razorOmnisharp": "7.0.0-preview.23363.1",
4747
"xamlTools": "17.14.36106.43"
4848
},

src/shared/dotnetConfigurationProvider.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,24 @@ class InternalServiceError extends Error {}
3030
class UnavaliableLaunchServiceError extends Error {}
3131

3232
const workspaceFolderToken = '${workspaceFolder}';
33+
const fileToken = '${file}';
34+
3335
/**
34-
* Replaces '${workspaceFolder}' with the current folder while keeping path separators consistent.
36+
* Replaces some '${variable}' tokens.
3537
*
3638
* @param projectPath The expected path to the .csproj
3739
* @param folderPath The current workspace folder
3840
* @returns A fully resolved path to the .csproj
3941
*/
40-
function resolveWorkspaceFolderToken(projectPath: string, folderPath: string): string {
42+
function resolveVariableTokens(projectPath: string, folderPath: string): string {
43+
if (projectPath === fileToken) {
44+
return vscode.window.activeTextEditor?.document.fileName ?? projectPath;
45+
}
46+
4147
if (projectPath.startsWith(workspaceFolderToken)) {
4248
const relativeProjectPath: string = projectPath.substring(workspaceFolderToken.length);
4349

44-
// Keep the path seperate consistant
50+
// Keep the path separators consistent
4551
if (relativeProjectPath.startsWith('/')) {
4652
folderPath = folderPath.replace(/[\\/]+/g, '/');
4753
} else {
@@ -91,7 +97,7 @@ export class DotnetConfigurationResolver implements vscode.DebugConfigurationPro
9197
let projectPath: string | undefined = debugConfiguration.projectPath;
9298
if (folder) {
9399
if (projectPath) {
94-
projectPath = resolveWorkspaceFolderToken(projectPath, folder.uri.fsPath);
100+
projectPath = resolveVariableTokens(projectPath, folder.uri.fsPath);
95101
}
96102

97103
const dotnetDebugServiceProxy = await getServiceBroker()?.getProxy<IDotnetDebugConfigurationService>(

test/razor/razorIntegrationTests/reference.integration.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ describe(`Razor References ${testAssetWorkspace.description}`, function () {
127127
});
128128

129129
test('Find All References - CSharp', async () => {
130-
if (!integrationHelpers.usingDevKit()) {
131-
// If we're not using devkit, then it means we are testing cohosting, and FAR from C# doesn't currently work in cohosting.
132-
return;
133-
}
134-
135130
if (!integrationHelpers.isRazorWorkspace(vscode.workspace)) {
136131
return;
137132
}

0 commit comments

Comments
 (0)