Skip to content
This repository was archived by the owner on Aug 24, 2026. It is now read-only.

Commit e82d8a6

Browse files
committed
Adjust raw template for use in current repository
1 parent 55b535d commit e82d8a6

19 files changed

Lines changed: 195 additions & 124 deletions

.editorconfig

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ indent_style = space
99

1010
# (Please don't specify an indent_size here; that has too many unintended consequences.)
1111

12+
file_header_template = Copyright (c) Microsoft. All rights reserved.\nLicensed under the MIT License. See LICENSE in the project root for more information.
13+
1214
[*.yml]
1315
indent_size = 2
1416
indent_style = space
@@ -36,10 +38,10 @@ indent_style = space
3638
[*.{cs,vb}]
3739
# Sort using and Import directives with System.* appearing first
3840
dotnet_sort_system_directives_first = true
39-
dotnet_style_qualification_for_field = true:warning
40-
dotnet_style_qualification_for_property = true:warning
41-
dotnet_style_qualification_for_method = true:warning
42-
dotnet_style_qualification_for_event = true:warning
41+
dotnet_style_qualification_for_field = false:warning
42+
dotnet_style_qualification_for_property = false:warning
43+
dotnet_style_qualification_for_method = false:warning
44+
dotnet_style_qualification_for_event = false:warning
4345

4446
# Use language keywords instead of framework type names for type references
4547
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
@@ -73,15 +75,15 @@ dotnet_naming_symbols.constants.required_modifiers = const
7375

7476
dotnet_naming_style.constant_style.capitalization = pascal_case
7577

76-
# Static fields are camelCase
78+
# Static readonly fields are PamelCase
7779
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
7880
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
79-
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
81+
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_readonly_field_style
8082

8183
dotnet_naming_symbols.static_fields.applicable_kinds = field
82-
dotnet_naming_symbols.static_fields.required_modifiers = static
84+
dotnet_naming_symbols.static_fields.required_modifiers = static, readonly
8385

84-
dotnet_naming_style.static_field_style.capitalization = camel_case
86+
dotnet_naming_style.static_readonly_field_style.capitalization = pascal_case
8587

8688
# Instance fields are camelCase
8789
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
@@ -91,6 +93,7 @@ dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_s
9193
dotnet_naming_symbols.instance_fields.applicable_kinds = field
9294

9395
dotnet_naming_style.instance_field_style.capitalization = camel_case
96+
dotnet_naming_style.instance_field_style.required_prefix = _
9497

9598
# Locals and parameters are camelCase
9699
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
@@ -125,13 +128,13 @@ dotnet_naming_style.pascal_case_style.capitalization = pascal_case
125128
csharp_indent_block_contents = true
126129
csharp_indent_braces = false
127130
csharp_indent_case_contents = true
128-
csharp_indent_switch_labels = true
131+
csharp_indent_switch_labels = false
129132
csharp_indent_labels = flush_left
130133

131134
# Prefer "var" everywhere
132-
csharp_style_var_for_built_in_types = false
135+
csharp_style_var_for_built_in_types = true:suggestion
133136
csharp_style_var_when_type_is_apparent = true:suggestion
134-
csharp_style_var_elsewhere = false:warning
137+
csharp_style_var_elsewhere = true:suggestion
135138

136139
# Prefer method-like constructs to have a block body
137140
csharp_style_expression_bodied_methods = false:none

.github/workflows/Windows.runsettings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<DataCollector friendlyName="blame" enabled="True">
55
<Configuration>
66
<CollectDump DumpType="full" />
7-
<CollectDumpOnTestSessionHang TestTimeout="30000" DumpType="full" />
7+
<CollectDumpOnTestSessionHang TestTimeout="1200000" DumpType="full" />
88
</Configuration>
99
</DataCollector>
1010
</DataCollectors>

.github/workflows/build.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
TreatWarningsAsErrors: true
1313
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
1414
BUILDCONFIGURATION: Release
15-
codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/
15+
codecov_token: c8862aaf-0c6d-48ee-a4a7-e88af58ef469
1616
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
1717

1818
jobs:
@@ -23,8 +23,6 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
os:
26-
- ubuntu-20.04
27-
- macos-latest
2826
- windows-latest
2927

3028
steps:
@@ -39,12 +37,19 @@ jobs:
3937
- name: Set pipeline variables based on source
4038
run: azure-pipelines/variables/_pipelines.ps1
4139
shell: pwsh
40+
- name: Add msbuild to PATH
41+
uses: microsoft/setup-msbuild@v1.0.2
42+
- name: Prepare Visual Studio
43+
run: '&"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit'
4244
- name: build
43-
run: dotnet build --no-restore -c ${{ env.BUILDCONFIGURATION }} /v:m /bl:"bin/build_logs/build.binlog"
45+
run: msbuild /t:Build /p:Configuration=${{ env.BUILDCONFIGURATION }} /v:m /bl:"bin/build_logs/build.binlog"
4446
- name: pack
45-
run: dotnet pack --no-build -c ${{ env.BUILDCONFIGURATION }} /v:m /bl:"bin/build_logs/pack.binlog"
47+
run: msbuild /t:Pack /p:Configuration=${{ env.BUILDCONFIGURATION }} /v:m /bl:"bin/build_logs/pack.binlog"
4648
- name: test
47-
run: dotnet test --no-build -c ${{ env.BUILDCONFIGURATION }} /bl:"bin/build_logs/test.binlog" --filter "TestCategory!=FailsInCloudTest" -v n /p:CollectCoverage=true --logger trx --settings "${{ github.workspace }}/.github/workflows/${{ runner.os }}.runsettings"
49+
run: dotnet test --no-build -c ${{ env.BUILDCONFIGURATION }} /bl:"bin/build_logs/test.binlog" --filter "TestCategory!=FailsInCloudTest" -v n /p:CollectCoverage=true /m:1 --logger trx --settings "${{ github.workspace }}/.github/workflows/${{ runner.os }}.runsettings"
50+
- name: Test EqualExceptionLegacy
51+
run: test/EqualExceptionLegacy/Test.ps1 -binlog bin/build_logs/EqualExceptionLegacy.binlog
52+
shell: pwsh
4853
- name: Update pipeline variables based on build outputs
4954
run: azure-pipelines/variables/_pipelines.ps1
5055
shell: pwsh
@@ -79,6 +84,13 @@ jobs:
7984
name: testResults-${{ runner.os }}
8085
path: obj/_artifacts/testResults
8186
continue-on-error: true
87+
- name: Upload rawTestResults
88+
if: always()
89+
uses: actions/upload-artifact@v1
90+
with:
91+
name: rawTestResults-${{ runner.os }}
92+
path: obj/_artifacts/rawTestResults
93+
continue-on-error: true
8294
- name: Upload coverageResults
8395
if: always()
8496
uses: actions/upload-artifact@v1

Directory.Build.props

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@
66
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(RepoRootPath)bin\$(MSBuildProjectName)\</BaseOutputPath>
77
<PackageOutputPath>$(RepoRootPath)bin\Packages\$(Configuration)\NuGet\</PackageOutputPath>
88
<LangVersion>10.0</LangVersion>
9+
<Features>strict</Features>
910
<Nullable>enable</Nullable>
10-
<ImplicitUsings>enable</ImplicitUsings>
11+
<ImplicitUsings>disable</ImplicitUsings>
1112
<AnalysisLevel>latest</AnalysisLevel>
1213
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1314
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1415
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
1516

16-
<!-- This entire repo has just one version.json file, so compute the version once and share with all projects in a large build. -->
17-
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
18-
1917
<!-- Local builds should embed PDBs so we never lose them when a subsequent build occurs. -->
2018
<DebugType Condition=" '$(CI)' != 'true' and '$(TF_BUILD)' != 'true' ">embedded</DebugType>
2119

@@ -33,6 +31,7 @@
3331

3432
<ItemGroup>
3533
<PackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" PrivateAssets="all" />
34+
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.0.1" PrivateAssets="all" />
3635
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" />
3736
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
3837
<!-- <PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="1.0.0" PrivateAssets="All" /> -->
@@ -56,8 +55,7 @@
5655

5756
<Target Name="PrepareReleaseNotes" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
5857
<PropertyGroup>
59-
<!-- TEMPLATE USER: replace the ORG/REPO (or entire link) below and uncomment. -->
60-
<!-- <PackageReleaseNotes>https://github.com/ORG/REPO/releases/tag/v$(Version)</PackageReleaseNotes> -->
58+
<PackageReleaseNotes>https://github.com/microsoft/vs-extension-testing/releases/tag/v$(Version)</PackageReleaseNotes>
6159
</PropertyGroup>
6260
</Target>
6361

NuGet.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
<add key="vs-impl" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json" />
1212
<add key="vssdk" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json" />
1313
</packageSources>
14+
<disabledPackageSources>
15+
<!-- Defend against user or machine level disabling of sources that we list in this file. -->
16+
<clear />
17+
</disabledPackageSources>
1418
<trustedSigners>
1519
<repository name="nuget" serviceIndex="https://api.nuget.org/v3/index.json">
1620
<owners>Microsoft;xunit;manuel.roemer;sharwell;jamesnk;aarnott;MarcoRossignoli;Thecentury</owners>

azure-pipelines.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ trigger:
33
branches:
44
include:
55
- main
6-
- microbuild
76
- 'validate/*'
87
paths:
98
exclude:
@@ -12,20 +11,12 @@ trigger:
1211
- .vscode/
1312
- .github/
1413

15-
parameters:
16-
- name: includeMacOS
17-
displayName: Build on macOS
18-
type: boolean
19-
default: false # macOS is often bogged down in Azure Pipelines
20-
2114
variables:
2215
TreatWarningsAsErrors: true
2316
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
2417
BuildConfiguration: Release
25-
# codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/
18+
codecov_token: c8862aaf-0c6d-48ee-a4a7-e88af58ef469
2619
NUGET_PACKAGES: $(Agent.TempDirectory)/.nuget/packages
2720

2821
jobs:
2922
- template: azure-pipelines/build.yml
30-
parameters:
31-
includeMacOS: ${{ parameters.includeMacOS }}

azure-pipelines/Windows_NT.runsettings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<DataCollector friendlyName="blame" enabled="True">
55
<Configuration>
66
<CollectDump DumpType="full" />
7-
<CollectDumpOnTestSessionHang TestTimeout="30000" DumpType="full" />
7+
<CollectDumpOnTestSessionHang TestTimeout="600000" DumpType="full" />
88
</Configuration>
99
</DataCollector>
1010
</DataCollectors>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
if ($env:AGENT_TEMPDIRECTORY) {
2+
$xunitRoot = "$($env:AGENT_TEMPDIRECTORY)\xUnitResults"
3+
} elseif ($env:RUNNER_TEMP) {
4+
$xunitRoot = "$($env:RUNNER_TEMP)\xUnitResults"
5+
} else {
6+
return
7+
}
8+
9+
@{
10+
"$xunitRoot" = (
11+
(Get-ChildItem "$xunitRoot" -Recurse)
12+
);
13+
}

azure-pipelines/artifacts/testResults.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ $result = @{}
33
if ($env:AGENT_TEMPDIRECTORY) {
44
# The DotNetCoreCLI uses an alternate location to publish these files
55
$guidRegex = '^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$'
6-
$result[$env:AGENT_TEMPDIRECTORY] = (Get-ChildItem $env:AGENT_TEMPDIRECTORY -Directory |? { $_.Name -match $guidRegex } |% { Get-ChildItem "$($_.FullName)\dotnet*.dmp","$($_.FullName)\testhost*.dmp","$($_.FullName)\Sequence_*.xml" -Recurse });
6+
$result[$env:AGENT_TEMPDIRECTORY] = (Get-ChildItem $env:AGENT_TEMPDIRECTORY -Directory |? { $_.Name -match $guidRegex } |% { Get-ChildItem "$($_.FullName)\dotnet*.dmp","$($_.FullName)\testhost*.dmp","$($_.FullName)\devenv*.dmp","$($_.FullName)\Sequence_*.xml" -Recurse });
77
}
88
else {
9-
$testRoot = Resolve-Path "$PSScriptRoot\..\..\test"
9+
$testRoot = Resolve-Path "$PSScriptRoot\..\..\src\Microsoft.VisualStudio.Extensibility.Testing.Xunit.Legacy.IntegrationTests"
1010
$result[$testRoot] = (Get-ChildItem "$testRoot\TestResults" -Recurse -Directory | Get-ChildItem -Recurse -File)
1111
}
1212

azure-pipelines/build.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ parameters:
33
type: object
44
default:
55
vmImage: windows-2022
6-
- name: includeMacOS
76
- name: EnableAPIScan
87
type: boolean
98
default: false
@@ -37,34 +36,9 @@ jobs:
3736
parameters:
3837
EnableAPIScan: ${{ parameters.EnableAPIScan }}
3938

40-
- template: expand-template.yml
41-
42-
- job: Linux
43-
pool:
44-
vmImage: Ubuntu 20.04
45-
steps:
46-
- checkout: self
47-
clean: true
48-
- template: install-dependencies.yml
49-
- template: dotnet.yml
50-
- template: expand-template.yml
51-
52-
- job: macOS
53-
condition: ${{ parameters.includeMacOS }}
54-
pool:
55-
vmImage: macOS-10.15
56-
steps:
57-
- checkout: self
58-
clean: true
59-
- template: install-dependencies.yml
60-
- template: dotnet.yml
61-
- template: expand-template.yml
62-
6339
- job: WrapUp
6440
dependsOn:
6541
- Windows
66-
- Linux
67-
- macOS
6842
pool:
6943
vmImage: Ubuntu 20.04
7044
condition: succeededOrFailed()
@@ -75,5 +49,3 @@ jobs:
7549
parameters:
7650
initArgs: -NoRestore
7751
- template: publish-codecoverage.yml
78-
parameters:
79-
includeMacOS: ${{ parameters.includeMacOS }}

0 commit comments

Comments
 (0)