Skip to content

Commit

Permalink
Merge pull request #1318 from microsoft/main
Browse files Browse the repository at this point in the history
Merge 'main' into 'release_mdd'
  • Loading branch information
WardenGnaw authored Jun 20, 2022
2 parents 8d42b8e + b8646a8 commit 82544a4
Show file tree
Hide file tree
Showing 60 changed files with 1,843 additions and 278 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/Build-And-Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: darenm/Setup-VSTest@v1

- name: Run VS Extension tests
run: vstest.console.exe ${{ github.workspace }}\bin\${{ matrix.configuration }}\MICoreUnitTests.dll ${{ github.workspace }}\bin\${{ matrix.configuration }}\JDbgUnitTests.dll ${{ github.workspace }}\bin\${{ matrix.configuration }}\SSHDebugTests.dll
run: vstest.console.exe ${{ github.workspace }}\bin\${{ matrix.configuration }}\MICoreUnitTests.dll ${{ github.workspace }}\bin\${{ matrix.configuration }}\JDbgUnitTests.dll ${{ github.workspace }}\bin\${{ matrix.configuration }}\SSHDebugTests.dll ${{ github.workspace }}\bin\${{ matrix.configuration }}\MIDebugEngineUnitTests.dll

windows_vscode_build:
runs-on: windows-latest
Expand Down Expand Up @@ -145,7 +145,8 @@ jobs:
gdb --version
- run: >
- run: |
set PATH="%PATH%;D:\a\_temp\msys64\mingw64\bin\"
dotnet test ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\CppTests\CppTests.dll --logger "trx;LogFileName=${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\CppTests\results.trx"
- name: 'Upload Test Results'
Expand Down
60 changes: 60 additions & 0 deletions IL/Microsoft.Internal.VisualStudio.Interop.il
Original file line number Diff line number Diff line change
Expand Up @@ -918,4 +918,64 @@
.get instance class [mscorlib]System.Array Microsoft.Internal.VisualStudio.Shell.Interop.IVsTelemetryPropertyBag::get_AllPropertyNames()
}
}
.class public interface abstract import IVsExtensionManagerPrivate
{
.custom instance void [mscorlib]System.Runtime.InteropServices.GuidAttribute::.ctor(string) = { string('753E55C6-E779-4A7A-BCD1-FD87181D52C0') }
.custom instance void [mscorlib]System.Runtime.InteropServices.InterfaceTypeAttribute::.ctor(valuetype [mscorlib]System.Runtime.InteropServices.ComInterfaceType) = { int32(1) }
.method public virtual hidebysig newslot abstract
instance int32 GetEnabledExtensionContentLocations([in] string marshal(lpwstr) szContentTypeName, [in] uint32 cContentLocations, [out] string[] marshal(bstr[ + 1]) rgbstrContentLocations, [out] string[] marshal(bstr[ + 1]) rgbstrUniqueExtensionStrings, [out] uint32& pcContentLocations)
preservesig internalcall
{
.param [1]
.custom instance void [mscorlib]System.Runtime.InteropServices.ComAliasNameAttribute::.ctor(string) = { string('OLE.LPCWSTR') }
.param [2]
.custom instance void [mscorlib]System.Runtime.InteropServices.ComAliasNameAttribute::.ctor(string) = { string('OLE.ULONG') }
.param [5]
.custom instance void [mscorlib]System.Runtime.InteropServices.ComAliasNameAttribute::.ctor(string) = { string('OLE.ULONG') }
}
.method public virtual hidebysig newslot abstract
instance int32 GetEnabledExtensionContentLocationsWithNames([in] string marshal(lpwstr) szContentTypeName, [in] uint32 cContentLocations, [out] string[] marshal(bstr[ + 1]) rgbstrContentLocations, [out] string[] marshal(bstr[ + 1]) rgbstrUniqueExtensionStrings, [out] string[] marshal(bstr[ + 1]) rgbstrExtensionNames, [out] uint32& pcContentLocations)
preservesig internalcall
{
.param [1]
.custom instance void [mscorlib]System.Runtime.InteropServices.ComAliasNameAttribute::.ctor(string) = { string('OLE.LPCWSTR') }
.param [2]
.custom instance void [mscorlib]System.Runtime.InteropServices.ComAliasNameAttribute::.ctor(string) = { string('OLE.ULONG') }
.param [6]
.custom instance void [mscorlib]System.Runtime.InteropServices.ComAliasNameAttribute::.ctor(string) = { string('OLE.ULONG') }
}
.method public virtual hidebysig newslot abstract
instance int32 GetDisabledExtensionContentLocations([in] string marshal(lpwstr) szContentTypeName, [in] uint32 cContentLocations, [out] string[] marshal(bstr[ + 1]) rgbstrContentLocations, [out] string[] marshal(bstr[ + 1]) rgbstrUniqueExtensionStrings, [out] uint32& pcContentLocations)
preservesig internalcall
{
.param [1]
.custom instance void [mscorlib]System.Runtime.InteropServices.ComAliasNameAttribute::.ctor(string) = { string('OLE.LPCWSTR') }
.param [2]
.custom instance void [mscorlib]System.Runtime.InteropServices.ComAliasNameAttribute::.ctor(string) = { string('OLE.ULONG') }
.param [5]
.custom instance void [mscorlib]System.Runtime.InteropServices.ComAliasNameAttribute::.ctor(string) = { string('OLE.ULONG') }
}
.method public virtual hidebysig newslot abstract
instance int32 GetLastConfigurationChange([out] valuetype [mscorlib]System.DateTime[] marshal([]) pTimestamp)
preservesig internalcall
{
}
.method public virtual hidebysig newslot abstract
instance int32 LogAllInstalledExtensions()
preservesig internalcall
{
}
.method public virtual hidebysig newslot abstract
instance int32 GetUniqueExtensionString([in] string marshal(lpwstr) szExtensionIdentifier, [out] string& marshal(bstr) pbstrUniqueString)
preservesig internalcall
{
.param [1]
.custom instance void [mscorlib]System.Runtime.InteropServices.ComAliasNameAttribute::.ctor(string) = { string('OLE.LPCWSTR') }
}
}
.class public interface abstract import SVsExtensionManager
{
.custom instance void [mscorlib]System.Runtime.InteropServices.GuidAttribute::.ctor(string) = { string('316F4DE6-3CA4-4F0D-B003-962D28F65238') }
.custom instance void [mscorlib]System.Runtime.InteropServices.InterfaceTypeAttribute::.ctor(valuetype [mscorlib]System.Runtime.InteropServices.ComInterfaceType) = { int32(1) }
}
}
24 changes: 24 additions & 0 deletions build/DropFiles.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,29 @@
<MakeDir Condition="!Exists($(DropDir))" Directories="$(DropDir)" />
<Copy DestinationFolder="$(DropDir)" SourceFiles="@(DropUnsignedFile);@(DropSignedFile);@(DropThirdPartySignedFile)" />
</Target>

<Target Name="CreateNugetPackage" AfterTargets="Build;SignFiles" Condition="'@(PackageNuspec)' != '' AND '$(BUILD_BUILDURI)'!=''" >
<PropertyGroup>
<NuGetPath Condition="'$(NuGetPath)' == ''">$(NuGetExePath)</NuGetPath>
<TimeStamp>$([System.DateTime]::Now.TimeOfDay.ToString("hhmmss"))</TimeStamp>
<NuGetPrerelease Condition="'$(NuGetPrerelease)'==''">true</NuGetPrerelease>
<NuGetVersionPrereleaseTag Condition="'$(NuGetPrerelease)'=='true'">-dev-$(TimeStamp)</NuGetVersionPrereleaseTag>
<NuGetPackageVersion Condition="'$(NuGetPackageVersion)'==''">$(BuildVersion)$(NuGetVersionPrereleaseTag)</NuGetPackageVersion>
<NuGetPackageSuffix Condition="$(Configuration.Contains('Debug'))">.dev</NuGetPackageSuffix>
<NuGetArguments>-NoPackageAnalysis -NonInteractive -BasePath $(DropDir) -OutputDirectory $(DropDir) -Version $(NuGetPackageVersion) -Properties suffix=$(NuGetPackageSuffix)</NuGetArguments>
</PropertyGroup>
<MakeDir Directories="$(DropDir)" Condition="!Exists('$(DropDir)')" />
<Exec Command="$(NuGetPath) pack @(PackageNuspec->'%(Identity)') $(NuGetArguments)" />
</Target>

<Target Name="SignNupkg" AfterTargets="CreateNugetPackage" Condition="'@(NugetPackages)' != '' AND '$(MicroBuild_SigningEnabled)' == 'true'">
<ItemGroup>
<PackagesToSign Include="@(NugetPackages->'$(DropDir)\%(Identity).$(NuGetPackageVersion).nupkg')">
<Authenticode>NuGet</Authenticode>
</PackagesToSign>
</ItemGroup>
<Message Importance="normal" Text="SignNugetPackage for '@(PackagesToSign)'." />
<SignFiles Files="@(PackagesToSign)" Type="$(SignType)" BinariesDirectory="$(DropDir)" IntermediatesDirectory="$(IntermediateOutputPath)" ESRPSigning="$(ESRPSigning)" UseBearerToken="$(UseBearerToken)" />
</Target>

</Project>
1 change: 1 addition & 0 deletions build/all_projects.settings.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<DropDir>$(MIEngineRoot)bin\$(Configuration)</DropDir>
<ToolsHome>$(MIEngineRoot)\tools</ToolsHome>
<IntermediateOutputPath>$(MIEngineRoot)obj\$(Configuration)\$(MSBuildProjectName)\</IntermediateOutputPath>
<NuGetExePath>$(ToolsHome)\NuGet\NuGet.exe</NuGetExePath>
</PropertyGroup>

<!-- Source Link -->
Expand Down
14 changes: 14 additions & 0 deletions eng/pipelines/DebuggerTesting-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: $(Date:yyyMMdd).$(Rev:r)
variables:
- name: SignType
value: test
- name: TeamName
value: MDDDebugger
jobs:
- template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml
parameters:
DisplayName: DebuggerTesting
JobTemplate:
- template: ../templates/DebuggerTesting-release.template.yml
...
26 changes: 13 additions & 13 deletions eng/pipelines/MIDebugEngine-CI.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
---
name: $(Date:yyyMMdd).$(Rev:r)
stages:
- stage: CodeAnalysis
dependsOn: []
jobs:
- template: ./jobs/MSHosted-Windows.job.yml
parameters:
DisplayName: 'CodeAnalysis'
JobTemplate:
- template: ../templates/CodeAnalysis.template.yml
parameters:
Configuration: 'Lab.Debug'

- stage: CI
dependsOn: []
variables:
Expand All @@ -20,19 +9,30 @@ stages:
- name: TeamName
value: MDDDebugger
jobs:
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
- template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml
parameters:
DisplayName: 'Lab.Debug'
JobTemplate:
- template: ../templates/Build.template.yml
parameters:
Configuration: 'Lab.Debug'

- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
- template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml
parameters:
DisplayName: 'Lab.Release'
JobTemplate:
- template: ../templates/Build.template.yml
parameters:
Configuration: 'Lab.Release'

- stage: CodeAnalysis
dependsOn: [CI]
jobs:
- template: ./jobs/MSHosted-Windows.job.yml
parameters:
DisplayName: 'CodeAnalysis'
JobTemplate:
- template: ../templates/CodeAnalysis.template.yml
parameters:
Configuration: 'Lab.Debug'
...
2 changes: 1 addition & 1 deletion eng/pipelines/VS-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: $(Date:yyyMMdd).$(Rev:r)
variables:
- group: TSDTUSR
jobs:
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
- template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml
parameters:
DisplayName: 'VS_Release'
JobTemplate:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/VSCode-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ stages:
- stage: Windows
dependsOn: []
jobs:
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
- template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml
parameters:
DisplayName: 'VSCode_Release'
JobTemplate:
Expand All @@ -24,7 +24,7 @@ stages:
- stage: OSX_ESRPSign
dependsOn: [OSX_CodeSign]
jobs:
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
- template: ./jobs/VSEngSS-MicroBuild2022-1ES.job.yml
parameters:
DisplayName: 'OSX Sign/Harden'
JobTemplate:
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/jobs/MSHosted-Windows.job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ parameters:
jobs:
- job:
displayName: ${{ parameters.DisplayName }}
timeoutInMinutes: 360
pool:
vmImage: 'windows-latest'
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- job:
displayName: ${{ parameters.DisplayName }}
pool:
name: VSEngSS-MicroBuild2019-1ES
name: VSEngSS-MicroBuild2022-1ES
demands:
- msbuild
- visualstudio
Expand Down
29 changes: 29 additions & 0 deletions eng/pipelines/steps/APIScan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
parameters:
FolderToScan: '$(Pipeline.Workspace)\Lab.Release'

steps:
- task: CopyFiles@2
displayName: 'Copy Files to: $(Pipeline.Workspace)\ApiScanFiles'
inputs:
SourceFolder: ${{ parameters.FolderToScan }}
Contents: |
**\*Microsoft@(*.dll|*.pdb|*.exe)
**\*Newtonsoft@(*.dll|*.pdb|*.exe)
**\*OpenDebugAD7@(*.dll|*.pdb|*.exe)
**\*WindowsDebugLauncher@(*.dll|*.pdb|*.exe)
!**\*.resources.dll
TargetFolder: '$(Pipeline.Workspace)\ApiScanFiles'
CleanTargetFolder: true
OverWrite: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-apiscan.APIScan@2
displayName: 'Run APIScan'
inputs:
softwareFolder: '$(Pipeline.Workspace)\ApiScanFiles'
softwareName: MIEngine
softwareVersionNum: '$(Build.BuildNumber)'
symbolsFolder: 'SRV*http://symweb;$(Pipeline.Workspace)\ApiScanFiles'
isLargeApp: false
continueOnError: true
env:
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(MIEngineApiScan)
9 changes: 9 additions & 0 deletions eng/pipelines/tasks/BinSkim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
steps:
- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3
displayName: 'Run BinSkim'
inputs:
InputType: Basic
AnalyzeTarget: '$(Pipeline.Workspace)\**\*.dll;$(Pipeline.Workspace)\**\*.exe'
AnalyzeVerbose: true
AnalyzeHashes: true
AnalyzeEnvironment: true
11 changes: 11 additions & 0 deletions eng/pipelines/tasks/CSharp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
steps:
- task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3
displayName: 'Run Roslyn Analyzers'
inputs:
continueOnError: true
msBuildVersion: 17.0
msBuildArchitecture: amd64
setupCommandLine: |
"%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
msBuildCommandline: |
msbuild $(Build.SourcesDirectory)\src\MIDebugEngine.sln /p:Platform="Any CPU" /p:Configuration="Release"
2 changes: 2 additions & 0 deletions eng/pipelines/templates/Build.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ steps:
parameters:
Configuration: ${{ parameters.Configuration }}

- template: ../tasks/CSharp.yml

# Used for localization
- template: ../steps/CollectAndPublishBinaries.yml
parameters:
Expand Down
12 changes: 12 additions & 0 deletions eng/pipelines/templates/CodeAnalysis.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ steps:

- template: ../tasks/CredScan.yml

- task: DownloadPipelineArtifact@2
displayName: Download Pipeline Artifact
inputs:
source: "current"
path: "$(Pipeline.Workspace)"

- template: ../steps/APIScan.yml
parameters:
FolderToScan: $(Pipeline.Workspace)\Lab.Release

- template: ../tasks/BinSkim.yml

- template: ../tasks/PoliCheck.yml

- template: ../tasks/SdtReport.yml
Expand Down
40 changes: 40 additions & 0 deletions eng/pipelines/templates/DebuggerTesting-release.template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
steps:
- checkout: self

- template: ../tasks/UseDotNet.yml

- template: ../tasks/NuGetToolInstaller.yml

- template: ../tasks/MicroBuildSigningPlugin.yml

- template: ../tasks/NuGetCommand.yml
parameters:
Command: 'restore'
solution: '$(Build.SourcesDirectory)\src\MIDebugEngine.sln'
FeedsToUse: 'config'
NugetConfigPath: '$(Build.SourcesDirectory)\src\.nuget\NuGet.config'

- template: ../tasks/MSBuild.yml
parameters:
solution: '$(Build.SourcesDirectory)\test\CppTests\CppTests.csproj'
configuration: 'Release'
msbuildArguments: /p:NuGetPath=$(NuGetExeToolPath) /p:NuGetPrerelease=false
env: {
"SIGN_TYPE": "$(SignType)"
}

- template: ../tasks/SignVerify.yml
parameters:
TargetFolders: '$(Build.SourcesDirectory)\bin\DebugAdapterProtocolTests\Release\drop'

- template: ../steps/CopyAndPublishSymbols.yml

- template: ../tasks/PublishPipelineArtifact.yml
parameters:
displayName: 'Publish Nupkgs'
path: '$(Build.SourcesDirectory)\bin\DebugAdapterProtocolTests\Release\drop'
artifactName: 'nupkgs'

- template: ../tasks/MicroBuildCleanup.yml
...
4 changes: 2 additions & 2 deletions src/DebugEngineHost.Stub/DebugEngineHost.ref.cs
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@ public static class HostNatvisProject
public delegate void NatvisLoader(string path);

/// <summary>
/// Searches the solution for natvis files, invoking the loader on any which are found.
/// Searches the solution and VSIXs for natvis files, invoking the loader on any which are found.
/// </summary>
/// <param name="loader">Natvis loader method to invoke</param>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Natvis")]
public static void FindNatvisInSolution(NatvisLoader loader)
public static void FindNatvis(NatvisLoader loader)
{
throw new NotImplementedException();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// // Copyright (c) Microsoft. All rights reserved.
// // Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Runtime.InteropServices;

namespace Microsoft.VisualStudio.Debugger.Interop.MI
{
/// <summary>
/// IDebugProperty for MIEngine
/// </summary>
[ComImport()]
[ComVisible(true)]
[Guid("27F5EFAF-9DBA-4AC0-A456-1F97E50F3CDA")]
[InterfaceType(1)]
public interface IDebugMIEngineProperty
{
/// <summary>
/// Get the expression context for the property
/// </summary>
[PreserveSig]
int GetExpressionContext([Out, MarshalAs(UnmanagedType.Interface)] out IDebugExpressionContext2 ppExpressionContext);
}
}
Loading

0 comments on commit 82544a4

Please sign in to comment.