Skip to content

Commit

Permalink
Merge pull request dotnet#7566 from dotnet/merge/main-to-prerelease
Browse files Browse the repository at this point in the history
[automated] Merge branch 'main' => 'prerelease'
  • Loading branch information
dibarbet authored Sep 14, 2024
2 parents 4650f56 + 6ef7897 commit 15cdec6
Show file tree
Hide file tree
Showing 457 changed files with 1,939 additions and 1,013 deletions.
20 changes: 10 additions & 10 deletions .config/guardian/.gdnbaselines
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"hydrated": true,
"properties": {
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/baselines"
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/baselines",
"hydrationStatus": "This file contains identifying data. It is **NOT** safe to check into your repo. To dehydrate this file, run `guardian dehydrate --help` and follow the guidance."
},
"version": "1.0.0",
"baselines": {
"default": {
"name": "default",
"createdDate": "2024-03-18 18:32:58Z",
"lastUpdatedDate": "2024-03-18 18:32:58Z"
"createdDate": "2024-09-09 19:35:36Z",
"lastUpdatedDate": "2024-09-09 19:35:36Z"
}
},
"results": {
"d6ffb0614846153cf3cc5936d0444ed9eda6fe6854febb4c8ea59243c120b223": {
"signature": "d6ffb0614846153cf3cc5936d0444ed9eda6fe6854febb4c8ea59243c120b223",
"26445e3e484940d2d58c2ffc32ab3895fca4b1589d66e2f2dee2fa01f2c479fb": {
"signature": "26445e3e484940d2d58c2ffc32ab3895fca4b1589d66e2f2dee2fa01f2c479fb",
"alternativeSignatures": [],
"target": "omnisharptest/omnisharpUnitTests/testAssets/private.pem",
"target": "test/omnisharp/omnisharpUnitTests/testAssets/private.pem",
"line": 1,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0020",
"createdDate": "2024-06-27 21:30:23Z",
"expirationDate": "2024-12-14 21:44:58Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-06-27 21:44:58Z"
"createdDate": "2024-09-09 19:35:36Z"
}
}
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ out
.razortelemetry/
.razorDevKit/
.vscode-test/
msbuild/signing/signJs/*.log
msbuild/signing/signVsix/*.log
dist/
*.razor.json

Expand Down
48 changes: 28 additions & 20 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
// Create a temp profile that has no extensions / user settings.
// This allows us to only have the C# extension + the dotnet runtime installer extension dependency.
"--profile-temp",
"${workspaceRoot}/test/integrationTests/testAssets/slnWithCsproj/.vscode/lsp_tools_host_slnWithCsproj.code-workspace",
// Launch VSCode using a specific profile to ensure that user settings are not used.
// This profile must be imported into vscode before running this launch configuration.
// The profile can be found under /test/csharp-standalone-profile.
"--profile",
"csharp-standalone-profile",
"${workspaceRoot}/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/.vscode/lsp_tools_host_slnWithCsproj.code-workspace",
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/test/integrationTests"
"--extensionTestsPath=${workspaceRoot}/out/test/lsptoolshost/integrationTests"
],
"env": {
"CODE_EXTENSIONS_PATH": "${workspaceRoot}",
Expand All @@ -40,12 +42,14 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
// Create a temp profile that has no extensions / user settings.
// This allows us to only have the C# extension + the dotnet runtime installer extension dependency.
"--profile-temp",
"${workspaceRoot}/test/razorIntegrationTests/testAssets/BasicRazorApp2_1/.vscode/lsp_tools_host_BasicRazorApp2_1.code-workspace",
// Launch VSCode using a specific profile to ensure that user settings are not used.
// This profile must be imported into vscode before running this launch configuration.
// The profile can be found under /test/csharp-standalone-profile.
"--profile",
"csharp-standalone-profile",
"${workspaceRoot}/test/razor/razorIntegrationTests/testAssets/BasicRazorApp2_1/.vscode/lsp_tools_host_BasicRazorApp2_1.code-workspace",
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/test/razorIntegrationTests"
"--extensionTestsPath=${workspaceRoot}/out/test/razor/razorIntegrationTests"
],
"env": {
"CODE_EXTENSIONS_PATH": "${workspaceRoot}",
Expand All @@ -63,12 +67,14 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
// Create a temp profile that has no extensions / user settings.
// This allows us to only have the C# extension + the dotnet runtime installer extension dependency.
"--profile-temp",
"${workspaceRoot}/omnisharptest/omnisharpIntegrationTests/testAssets/${input:omnisharpAssetName}/.vscode/omnisharp_${input:omnisharpAssetName}.code-workspace",
// Launch VSCode using a specific profile to ensure that user settings are not used.
// This profile must be imported into vscode before running this launch configuration.
// The profile can be found under /test/csharp-standalone-profile.
"--profile",
"csharp-standalone-profile",
"${workspaceRoot}/test/omnisharp/omnisharpIntegrationTests/testAssets/${input:omnisharpAssetName}/.vscode/omnisharp_${input:omnisharpAssetName}.code-workspace",
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/omnisharptest/omnisharpIntegrationTests"
"--extensionTestsPath=${workspaceRoot}/out/test/omnisharp/omnisharpIntegrationTests"
],
"env": {
"CODE_EXTENSIONS_PATH": "${workspaceRoot}",
Expand All @@ -86,12 +92,14 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
// Create a temp profile that has no extensions / user settings.
// This allows us to only have the C# extension + the dotnet runtime installer extension dependency.
"--profile-temp",
"${workspaceRoot}/omnisharptest/omnisharpIntegrationTests/testAssets/${input:omnisharpAssetName}/.vscode/omnisharp_lsp_${input:omnisharpAssetName}.code-workspace",
// Launch VSCode using a specific profile to ensure that user settings are not used.
// This profile must be imported into vscode before running this launch configuration.
// The profile can be found under /test/csharp-standalone-profile.
"--profile",
"csharp-standalone-profile",
"${workspaceRoot}/test/omnisharp/omnisharpIntegrationTests/testAssets/${input:omnisharpAssetName}/.vscode/omnisharp_lsp_${input:omnisharpAssetName}.code-workspace",
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/out/omnisharptest/omnisharpIntegrationTests"
"--extensionTestsPath=${workspaceRoot}/out/test/omnisharp/omnisharpIntegrationTests"
],
"env": {
"CODE_EXTENSIONS_PATH": "${workspaceRoot}",
Expand Down
6 changes: 4 additions & 2 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
.vscode-test/**
coverage/**
out/**
server/**
msbuild/**
src/**
tasks/**
test/**
omnisharptest/**
__mocks__/**
jest.config.ts
baseJestConfig.ts
Expand All @@ -34,6 +33,9 @@ azure-pipelines
.editorconfig
.gitignore
CODEOWNERS
Directory.Build.props
global.json
NuGet.config
gulpfile.ts
!install.Lock
ISSUE_TEMPLATE
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)

# Latest
* Add signing support to VSIX (PR: [#7490](https://github.com/dotnet/vscode-csharp/pull/7490))
* Update Debugger to v2.47.0 (PR: [#7547](https://github.com/dotnet/vscode-csharp/pull/7547))
* Adds in support for .NET 9 Break for Async User-Unhandled
* Do not inject 'debugConsoleVerbosity' for 'coreclr' (PR: [#7546](https://github.com/dotnet/vscode-csharp/pull/7546))
* Do not auto surround `<`, `[` and `(` in XAML. (PR: [#7540](https://github.com/dotnet/vscode-csharp/pull/7540))
* Fix resolve fix all code action (PR: [#7536](https://github.com/dotnet/vscode-csharp/pull/7536))
* Update Roslyn to 4.12.0-3.24463.6 (PR: [#7564](https://github.com/dotnet/vscode-csharp/pull/7564))
* Fix order modifiers code action not showing up in vscode (PR: [#75092](https://github.com/dotnet/roslyn/pull/75092))
* Log unit test output (PR: [#75084](https://github.com/dotnet/roslyn/pull/75084))
* Fix issue where closing sourcelink document threw if not opened (PR: [#75046](https://github.com/dotnet/roslyn/pull/75046))
* Expose sourcelink option to VSCode (PR: [#75044](https://github.com/dotnet/roslyn/pull/75044))
* Report source generator failures in Hot Reload diagnostics (PR: [#75029](https://github.com/dotnet/roslyn/pull/75029))
* Fix issue navigating from source link documents (PR: [#75030](https://github.com/dotnet/roslyn/pull/75030))
* Bump xamltools to 17.12.35311.18 (PR: [#7549](https://github.com/dotnet/vscode-csharp/pull/7549))
* XAML color swatches

# 2.47.x
* Update Roslyn to 4.12.0-3.24456.2 (PR: [#7525](https://github.com/dotnet/vscode-csharp/pull/7525))
* Avoid BuildHost crash in Mono due to missing types (PR: [#74994](https://github.com/dotnet/roslyn/pull/74994))
* Turn off word suggestions in XAML completions (PR: [#7516](https://github.com/dotnet/vscode-csharp/pull/7516))
Expand All @@ -23,6 +40,13 @@
* Support component rename from an end tag (#10762) (PR: [#10762](https://github.com/dotnet/razor/pull/10762))
* Bump xamltools to 17.12.35230.10 (PR: [#7493](https://github.com/dotnet/vscode-csharp/pull/7493))

# 2.45.25
* Bump Roslyn to 4.12.0-2.24461.7 (PR: [#7544](https://github.com/dotnet/vscode-csharp/pull/7544))
* Fix crash when closing source link documents (PR: [#75047](https://github.com/dotnet/roslyn/pull/75047))
* Add option to disable source link (PR: [#75047](https://github.com/dotnet/roslyn/pull/75047))
* Fix issue navigating from source link documents (PR: [#75033](https://github.com/dotnet/roslyn/pull/75033))
* Fix exception applying fix all code action (PR: [#7537](https://github.com/dotnet/vscode-csharp/pull/7537))

# 2.45.17
* Fix check for rzls being present (PR: [#7462](https://github.com/dotnet/vscode-csharp/pull/7462))
* Bump Razor to 9.0.0-preview.24418.1 (PR: [#7456](https://github.com/dotnet/vscode-csharp/pull/7456))
Expand All @@ -42,6 +66,7 @@
* Update Debugger to v2.43.0 (PR: [#7420](https://github.com/dotnet/vscode-csharp/pull/7420))
* Bump xamltools to 17.12.35223.16 (PR: [#7464](https://github.com/dotnet/vscode-csharp/pull/7464))
* Added XAML Hot Reload support for x:FactoryMethod and x:Arguments
* Bump xamltools to 17.12.35304.30 (PR: [#7507](https://github.com/dotnet/vscode-csharp/pull/7508))

# 2.44.19
* Bump Roslyn to 4.12.0-2.24416.3 (PR: [#7448](https://github.com/dotnet/vscode-csharp/pull/7448))
Expand Down
14 changes: 9 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@ After completing the build steps:

#### Testing

To run tests:
To run all tests, execute `npm run test`.

1. Execute `npm run test` or press <kbd>F5</kbd> in VS Code with the "Launch Tests" debug configuration selected.
2. For integration tests, select either of the two 'current file' integration tests (one for roslyn and one for razor), from the drop-down and press <kbd>F5</kbd> to start debugging:
- For Roslyn Server: `Launch Current File slnWithCsproj Integration Tests`
- For Razor Server: `Launch Current File BasicRazorApp2_1 Integration Tests`
To debug unit tests locally, press <kbd>F5</kbd> in VS Code with the "Launch Tests" debug configuration selected.

To debug integration tests
1. Import the `csharp-standalone-profile.code-profile` in VSCode to setup a clean profile in which to run integration tests. This must be imported at least once to use the launch configurations.
2. Open any integration test file and <kbd>F5</kbd> launch with the correct launch configuration selected.
- For integration tests inside `test/lsptoolshost`, use `Launch Current File slnWithCsproj Integration Tests`
- For integration tests inside `test/razor`, use `Launch Current File BasicRazorApp2_1 Integration Tests`
- For integration tests inside `test/omnisharp`, use one of the `Omnisharp:` current file profiles

These will allow you to actually debug the test, but the 'Razor integration tests' configuration does not.

Expand Down
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project>
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<!--
Defines the lowest supported target framework for the extension.
Used by server download / integration tests to ensure they run when only this SDK is installed.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion __mocks__/vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import * as vscodeAdapter from '../src/vscodeAdapter';
import { getFakeVsCode } from '../test/unitTests/fakes';
import { getFakeVsCode } from '../test/fakes';

// This module creates a manual mock for the vscode module for running in unit tests.
// Jest will automatically pick this up as it is in the __mocks__ directory next to node_modules.
Expand Down
8 changes: 8 additions & 0 deletions azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ parameters:
- prerelease
- auto
default: auto
# Allows the sign type to be set manually for a specific build
- name: signType
values:
- test
- real
- auto
default: auto

resources:
repositories:
Expand Down Expand Up @@ -51,3 +58,4 @@ extends:
versionNumberOverride: ${{ parameters.versionNumberOverride }}
isOfficial: true
channel: ${{ parameters.channel }}
signType: ${{ parameters.signType }}
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ stages:
- template: azure-pipelines/build-all.yml
parameters:
isOfficial: false
signType: test

- stage: Test_Linux_Stage
displayName: Test Linux
Expand Down
44 changes: 40 additions & 4 deletions azure-pipelines/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@ parameters:
- prerelease
- auto
default: auto
- name: signType
values:
- test
- real
- auto
default: auto

stages:
- stage: Build
displayName: 'Build VSIXs'
dependsOn: []
jobs:
- job: SetChannelVariable
displayName: 'Set Channel Variable'
- job: SetRunVariables
displayName: 'Set Run Variables'
pool:
${{ if eq(parameters.isOfficial, true) }}:
name: netcore1espool-internal
Expand Down Expand Up @@ -53,8 +60,37 @@ stages:
Write-Host "Setting pipeline channel variable to Release."
Write-Host "##vso[task.setvariable variable=channel;isoutput=true]Release"
}
name: passOutput
name: passChannel
displayName: Set Channel Variable
- pwsh: |
$signType = "test"
if ("${{ parameters.isOfficial }}" -ne "true") {
Write-Host "Not an official build, test signing"
$signType = "test"
} elseif ("${{ parameters.signType }}" -eq "test") {
Write-Host "Sign type override set to ${{ parameters.signType }}"
$signType = "test"
} elseif ("${{ parameters.signType }}" -eq "real") {
Write-Host "Sign type override set to ${{ parameters.signType }}"
$signType = "real"
} else {
Write-Host "Sign type override is ${{ parameters.signType }}, using branch configuration to determine sign type"
Write-Host "Detected branch $(Build.SourceBranchName)"
if ( ("$(Build.SourceBranchName)" -eq "release") -or ("$(Build.SourceBranchName)" -eq "prerelease")) {
Write-Host "Branch is a release branch, using real sign type."
$signType = 'real'
} else {
Write-Host "Branch is test branch, using test sign type."
$signType = 'test'
}
}
Write-Host "Setting pipeline signType variable to " $signType
Write-Host "##vso[task.setvariable variable=signType;isoutput=true]$signType"
name: passSignType
displayName: Set Sign Type
- template: /azure-pipelines/build.yml@self
parameters:
versionNumberOverride: ${{ parameters.versionNumberOverride }}
Expand Down
35 changes: 33 additions & 2 deletions azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ jobs:
- job: 'Build_${{ parameters.platform }}_vsixs'
pool: ${{ parameters.pool }}
displayName: 'Build ${{ parameters.platform }} vsixs'
dependsOn: SetChannelVariable
dependsOn: SetRunVariables
variables:
channel: $[ dependencies.SetChannelVariable.outputs['passOutput.channel'] ]
channel: $[ dependencies.SetRunVariables.outputs['passChannel.channel'] ]
signType: $[ dependencies.SetRunVariables.outputs['passSignType.signType'] ]
teamName: DotNetCore
steps:
- checkout: self
clean: true
Expand All @@ -25,6 +27,20 @@ jobs:
- template: /azure-pipelines/prereqs.yml@self
parameters:
versionNumberOverride: ${{ parameters.versionNumberOverride }}

# If we're in an official build, install the signing plugin
- ${{ if eq(parameters.isOfficial, true) }}:
- task: MicroBuildSigningPlugin@4
displayName: 🔧 Install MicroBuild Signing Plugin
inputs:
signType: $(signType)
zipSources: false
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
azureSubscription: 'MicroBuild Signing Task (DevDiv)'
env:
SignType: $(signType)
TeamName: $(teamName)

- pwsh: |
Write-Host "Building VSIXs for platform ${{ parameters.platform }} and channel $(channel)"
if ("$(channel)" -eq "Release") {
Expand All @@ -33,6 +49,15 @@ jobs:
gulp vsix:release:package:${{ parameters.platform }} --prerelease
}
displayName: 'Build VSIXs'
env:
SignType: $(signType)
- ${{ if eq(parameters.isOfficial, true) }}:
- script: gulp signVsix
condition: succeeded()
displayName: 'Sign VSIXs'
env:
SignType: $(signType)

- ${{ if eq(parameters.isOfficial, true) }}:
- task: 1ES.PublishBuildArtifacts@1
Expand All @@ -41,6 +66,12 @@ jobs:
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/vsix'
ArtifactName: 'VSIX_$(channel)'
- task: 1ES.PublishBuildArtifacts@1
condition: succeeded()
displayName: 'Publish Signing Logs'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/out/logs'
ArtifactName: '${{ parameters.platform }} Signing Logs'
- ${{ else }}:
- task: PublishBuildArtifacts@1
condition: succeeded()
Expand Down
Loading

0 comments on commit 15cdec6

Please sign in to comment.