├── eng ├── common │ ├── BuildConfiguration │ │ └── build-configuration.json │ ├── dotnet-install.cmd │ ├── build.cmd │ ├── sdl │ │ ├── packages.config │ │ ├── NuGet.config │ │ ├── sdl.ps1 │ │ ├── run-sdl.ps1 │ │ ├── trim-assets-version.ps1 │ │ └── extract-artifact-archives.ps1 │ ├── CIBuild.cmd │ ├── init-tools-native.cmd │ ├── templates │ │ ├── jobs │ │ │ ├── jobs.yml │ │ │ ├── source-build.yml │ │ │ └── codeql-build.yml │ │ ├── job │ │ │ ├── onelocbuild.yml │ │ │ ├── source-build.yml │ │ │ ├── publish-build-assets.yml │ │ │ └── source-index-stage1.yml │ │ ├── steps │ │ │ ├── publish-logs.yml │ │ │ ├── retain-build.yml │ │ │ ├── source-build.yml │ │ │ ├── generate-sbom.yml │ │ │ ├── send-to-helix.yml │ │ │ ├── component-governance.yml │ │ │ ├── get-delegation-sas.yml │ │ │ ├── enable-internal-sources.yml │ │ │ ├── get-federated-access-token.yml │ │ │ ├── source-index-stage1-publish.yml │ │ │ ├── enable-internal-runtimes.yml │ │ │ ├── publish-build-artifacts.yml │ │ │ └── publish-pipeline-artifacts.yml │ │ ├── post-build │ │ │ ├── post-build.yml │ │ │ ├── common-variables.yml │ │ │ └── setup-maestro-vars.yml │ │ └── vmr-build-pr.yml │ ├── templates-official │ │ ├── jobs │ │ │ ├── jobs.yml │ │ │ ├── source-build.yml │ │ │ └── codeql-build.yml │ │ ├── job │ │ │ ├── onelocbuild.yml │ │ │ ├── source-build.yml │ │ │ ├── publish-build-assets.yml │ │ │ └── source-index-stage1.yml │ │ ├── steps │ │ │ ├── generate-sbom.yml │ │ │ ├── publish-logs.yml │ │ │ ├── retain-build.yml │ │ │ ├── send-to-helix.yml │ │ │ ├── source-build.yml │ │ │ ├── get-delegation-sas.yml │ │ │ ├── component-governance.yml │ │ │ ├── enable-internal-sources.yml │ │ │ ├── get-federated-access-token.yml │ │ │ ├── source-index-stage1-publish.yml │ │ │ ├── enable-internal-runtimes.yml │ │ │ ├── publish-pipeline-artifacts.yml │ │ │ └── publish-build-artifacts.yml │ │ ├── post-build │ │ │ ├── post-build.yml │ │ │ ├── common-variables.yml │ │ │ └── setup-maestro-vars.yml │ │ └── variables │ │ │ ├── sdl-variables.yml │ │ │ └── pool-providers.yml │ ├── dotnet.cmd │ ├── core-templates │ │ ├── variables │ │ │ └── pool-providers.yml │ │ ├── steps │ │ │ ├── publish-pipeline-artifacts.yml │ │ │ ├── component-governance.yml │ │ │ ├── publish-build-artifacts.yml │ │ │ ├── cleanup-microbuild.yml │ │ │ ├── install-microbuild-impl.yml │ │ │ ├── enable-internal-runtimes.yml │ │ │ ├── retain-build.yml │ │ │ ├── get-federated-access-token.yml │ │ │ ├── get-delegation-sas.yml │ │ │ ├── source-index-stage1-publish.yml │ │ │ └── enable-internal-sources.yml │ │ ├── post-build │ │ │ └── common-variables.yml │ │ ├── jobs │ │ │ ├── codeql-build.yml │ │ │ └── source-build.yml │ │ └── job │ │ │ └── source-index-stage1.yml │ ├── dotnet.ps1 │ ├── internal │ │ ├── NuGet.config │ │ ├── Directory.Build.props │ │ └── Tools.csproj │ ├── cross │ │ ├── x86 │ │ │ └── tizen │ │ │ │ └── tizen.patch │ │ ├── armel │ │ │ └── tizen │ │ │ │ └── tizen.patch │ │ ├── arm │ │ │ └── tizen │ │ │ │ └── tizen.patch │ │ ├── x64 │ │ │ └── tizen │ │ │ │ └── tizen.patch │ │ ├── arm64 │ │ │ └── tizen │ │ │ │ └── tizen.patch │ │ ├── riscv64 │ │ │ └── tizen │ │ │ │ └── tizen.patch │ │ └── tizen-build-rootfs.sh │ ├── PSScriptAnalyzerSettings.psd1 │ ├── cibuild.sh │ ├── enable-cross-org-publishing.ps1 │ ├── msbuild.ps1 │ ├── post-build │ │ ├── nuget-validation.ps1 │ │ └── check-channel-consistency.ps1 │ ├── dotnet-install.ps1 │ ├── dotnet.sh │ ├── helixpublish.proj │ ├── generate-sbom-prep.ps1 │ ├── msbuild.sh │ ├── README.md │ ├── retain-build.ps1 │ ├── generate-sbom-prep.sh │ ├── loc │ │ └── P22DotNetHtmlLocalization.lss │ ├── darc-init.ps1 │ ├── native │ │ ├── init-os-and-arch.sh │ │ └── install-dependencies.sh │ └── dotnet-install.sh ├── Publishing.props ├── Signing.props ├── Version.Details.xml ├── tsaconfig.gdntsa ├── Versions.props └── DiaSymReaderNative.targets ├── src ├── PdbTestResources │ ├── Resources │ │ ├── VB.dll │ │ ├── VB.dllx │ │ ├── VB.pdb │ │ ├── VB.pdbx │ │ ├── Async.dll │ │ ├── Async.pdb │ │ ├── Misc.dll │ │ ├── Misc.dllx │ │ ├── Misc.pdb │ │ ├── Misc.pdbx │ │ ├── Async.dllx │ │ ├── Async.pdbx │ │ ├── Imports.dll │ │ ├── Imports.dllx │ │ ├── Imports.pdb │ │ ├── Imports.pdbx │ │ ├── Iterator.dll │ │ ├── Iterator.pdb │ │ ├── Scopes.dll │ │ ├── Scopes.dllx │ │ ├── Scopes.pdb │ │ ├── Scopes.pdbx │ │ ├── Documents.dll │ │ ├── Documents.dllx │ │ ├── Documents.pdb │ │ ├── Documents.pdbx │ │ ├── Iterator.dllx │ │ ├── Iterator.pdbx │ │ ├── SourceData.dll │ │ ├── SourceData.pdb │ │ ├── SourceLink.dll │ │ ├── SourceLink.pdb │ │ ├── CrossGen.ni.dll │ │ ├── CrossGen.ni.dllx │ │ ├── SourceLink.dllx │ │ ├── SourceLink.pdbx │ │ ├── EmbeddedSource.dll │ │ ├── EmbeddedSource.dllx │ │ ├── EmbeddedSource.pdb │ │ ├── EmbeddedSource.pdbx │ │ ├── LanguageOnlyTypes.dll │ │ ├── LanguageOnlyTypes.dllx │ │ ├── LanguageOnlyTypes.pdb │ │ ├── LanguageOnlyTypes.pdbx │ │ ├── MethodBoundaries.dll │ │ ├── MethodBoundaries.dllx │ │ ├── MethodBoundaries.pdb │ │ ├── MethodBoundaries.pdbx │ │ ├── SourceLink.Embedded.dll │ │ ├── SourceData.cmd │ │ ├── VB.rsp │ │ ├── SourceLink.json │ │ ├── Scopes.cmd │ │ ├── Async.cmd │ │ ├── Misc.cmd │ │ ├── EmbeddedSourceNoCode.cs │ │ ├── Iterator.cmd │ │ ├── EmbeddedSourceNoSequencePoints.cs │ │ ├── EmbeddedSourceSmall.cs │ │ ├── Imports.cmd │ │ ├── MethodBoundaries.cmd │ │ ├── LanguageOnlyTypes.cmd │ │ ├── Documents.cmd │ │ ├── EmbeddedSource.cmd │ │ ├── SourceLink.cmd │ │ ├── EmbeddedSource.cs │ │ ├── CrossGen.cmd │ │ ├── VB.cmd │ │ ├── CrossGen.cs │ │ ├── Async.cs │ │ ├── SourceData.srcsrv.txt │ │ ├── Misc.cs │ │ ├── Iterator.cs │ │ ├── Documents.cs │ │ ├── Imports.cs │ │ ├── VB.vb │ │ └── LanguageOnlyTypes.cs │ ├── TestResource.cs │ └── ResourceLoader.cs ├── Pdb2Xml │ ├── Pdb2Xml.nuspec │ └── Pdb2Xml.csproj ├── Pdb2Pdb │ ├── Pdb2Pdb.nuspec │ └── Pdb2Pdb.csproj ├── Directory.Build.props ├── Microsoft.DiaSymReader.Converter.Xml │ ├── xlf │ │ ├── PdbToXmlResources.ja.xlf │ │ ├── PdbToXmlResources.ko.xlf │ │ ├── PdbToXmlResources.zh-Hans.xlf │ │ ├── PdbToXmlResources.cs.xlf │ │ ├── PdbToXmlResources.de.xlf │ │ ├── PdbToXmlResources.it.xlf │ │ ├── PdbToXmlResources.zh-Hant.xlf │ │ ├── PdbToXmlResources.es.xlf │ │ ├── PdbToXmlResources.fr.xlf │ │ ├── PdbToXmlResources.pl.xlf │ │ ├── PdbToXmlResources.ru.xlf │ │ ├── PdbToXmlResources.tr.xlf │ │ ├── PdbToXmlResources.pt-BR.xlf │ │ ├── ConverterResources.zh-Hans.xlf │ │ ├── ConverterResources.zh-Hant.xlf │ │ ├── ConverterResources.ja.xlf │ │ ├── ConverterResources.ko.xlf │ │ ├── ConverterResources.tr.xlf │ │ ├── ConverterResources.pt-BR.xlf │ │ ├── ConverterResources.cs.xlf │ │ ├── ConverterResources.fr.xlf │ │ ├── ConverterResources.it.xlf │ │ ├── ConverterResources.pl.xlf │ │ ├── ConverterResources.ru.xlf │ │ ├── ConverterResources.es.xlf │ │ └── ConverterResources.de.xlf │ ├── Utilities │ │ ├── DateTimeUtilities.cs │ │ └── StringUtilities.cs │ └── PdbToXmlOptions.cs ├── Microsoft.DiaSymReader.Converter │ ├── Utilities │ │ ├── HResult.cs │ │ ├── ExceptionUtilities.cs │ │ ├── EnumerableUtilities.cs │ │ ├── DummySymReaderMetadataProvider.cs │ │ ├── StreamUtilities.cs │ │ └── StringUtilities.cs │ ├── WindowsPdbConversionOptions.cs │ ├── PortablePdb │ │ └── AsyncMethodData.cs │ ├── Diagnostics │ │ └── PdbDiagnostic.cs │ └── PortablePdbConversionOptions.cs ├── TestUtilities │ └── TestUtilities.csproj ├── Pdb2Pdb.Tests │ ├── TempFiles │ │ ├── DisposableDirectory.cs │ │ └── TempRoot.cs │ └── Pdb2Pdb.UnitTests.csproj ├── Directory.Build.targets ├── Common │ └── PdbGuids.cs └── Microsoft.DiaSymReader.Converter.Tests │ ├── Microsoft.DiaSymReader.Converter.UnitTests.csproj │ ├── SymReaderHelpersTest.cs │ └── MetadataUtilitiesTests.cs ├── Test.cmd ├── Restore.cmd ├── Build.cmd ├── global.json ├── .azuredevops └── dependabot.yml ├── es-metadata.yml ├── CODE-OF-CONDUCT.md ├── NuGet.config ├── .gitignore ├── License.txt ├── .gitattributes ├── azure-pipelines-pr.yml └── azure-pipelines-microbuild.yml /eng/common/BuildConfiguration/build-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "RetryCountLimit": 1, 3 | "RetryByAnyError": false 4 | } 5 | -------------------------------------------------------------------------------- /eng/common/dotnet-install.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*" -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/VB.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/VB.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/VB.dllx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/VB.dllx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/VB.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/VB.pdb -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/VB.pdbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/VB.pdbx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Async.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Async.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Async.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Async.pdb -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Misc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Misc.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Misc.dllx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Misc.dllx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Misc.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Misc.pdb -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Misc.pdbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Misc.pdbx -------------------------------------------------------------------------------- /Test.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -test %*" 3 | exit /b %ErrorLevel% -------------------------------------------------------------------------------- /eng/common/build.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0build.ps1""" %*" 3 | exit /b %ErrorLevel% 4 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Async.dllx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Async.dllx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Async.pdbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Async.pdbx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Imports.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Imports.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Imports.dllx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Imports.dllx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Imports.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Imports.pdb -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Imports.pdbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Imports.pdbx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Iterator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Iterator.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Iterator.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Iterator.pdb -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Scopes.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Scopes.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Scopes.dllx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Scopes.dllx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Scopes.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Scopes.pdb -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Scopes.pdbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Scopes.pdbx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Documents.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Documents.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Documents.dllx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Documents.dllx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Documents.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Documents.pdb -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Documents.pdbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Documents.pdbx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Iterator.dllx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Iterator.dllx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Iterator.pdbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/Iterator.pdbx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/SourceData.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/SourceData.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/SourceData.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/SourceData.pdb -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/SourceLink.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/SourceLink.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/SourceLink.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/SourceLink.pdb -------------------------------------------------------------------------------- /Restore.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -restore %*" 3 | exit /b %ErrorLevel% 4 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/CrossGen.ni.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/CrossGen.ni.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/CrossGen.ni.dllx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/CrossGen.ni.dllx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/SourceLink.dllx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/SourceLink.dllx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/SourceLink.pdbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/SourceLink.pdbx -------------------------------------------------------------------------------- /Build.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -restore -build %*" 3 | exit /b %ErrorLevel% 4 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/EmbeddedSource.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/EmbeddedSource.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/EmbeddedSource.dllx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/EmbeddedSource.dllx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/EmbeddedSource.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/EmbeddedSource.pdb -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/EmbeddedSource.pdbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/EmbeddedSource.pdbx -------------------------------------------------------------------------------- /eng/common/sdl/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/LanguageOnlyTypes.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/LanguageOnlyTypes.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/LanguageOnlyTypes.dllx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/LanguageOnlyTypes.dllx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/LanguageOnlyTypes.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/LanguageOnlyTypes.pdb -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/LanguageOnlyTypes.pdbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/LanguageOnlyTypes.pdbx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/MethodBoundaries.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/MethodBoundaries.dll -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/MethodBoundaries.dllx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/MethodBoundaries.dllx -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/MethodBoundaries.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/MethodBoundaries.pdb -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/MethodBoundaries.pdbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/MethodBoundaries.pdbx -------------------------------------------------------------------------------- /eng/common/CIBuild.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*" 3 | -------------------------------------------------------------------------------- /eng/common/init-tools-native.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | powershell -NoProfile -NoLogo -ExecutionPolicy ByPass -command "& """%~dp0init-tools-native.ps1""" %*" 3 | exit /b %ErrorLevel% -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/SourceLink.Embedded.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/symreader-converter/HEAD/src/PdbTestResources/Resources/SourceLink.Embedded.dll -------------------------------------------------------------------------------- /eng/Publishing.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 3 5 | 6 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "tools": { 3 | "dotnet": "10.0.100-rc.1.25420.111" 4 | }, 5 | "msbuild-sdks": { 6 | "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25524.1" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/SourceData.cmd: -------------------------------------------------------------------------------- 1 | csc /target:library /debug:full /optimize- /deterministic /out:SourceData.dll Documents.cs 2 | %1\pdbstr -w -p:SourceData.pdb -i:SourceData.srcsrv.txt -s:srcsrv -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/VB.rsp: -------------------------------------------------------------------------------- 1 | /imports: 2 | /imports:A1=System.Collections.Generic 3 | /imports:A2=System.Int64 4 | /imports:System.Threading 5 | /define:_MYTYPE="Empty" 6 | -------------------------------------------------------------------------------- /.azuredevops/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | # Disabling dependabot on Azure DevOps as this is a mirrored repo. Updates should go through github. 4 | enable-campaigned-updates: false 5 | enable-security-updates: false 6 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/SourceLink.json: -------------------------------------------------------------------------------- 1 | { 2 | "documents": { 3 | "C:\\a*": "http://server/1/a*", 4 | "C:\\A*": "http://server/2/A*", 5 | "C:\\*": "http://server/3/*.g", 6 | ":*": "http://server/4/*" 7 | } 8 | } -------------------------------------------------------------------------------- /eng/common/templates/jobs/jobs.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/jobs/jobs.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /es-metadata.yml: -------------------------------------------------------------------------------- 1 | schemaVersion: 0.0.1 2 | isProduction: true 3 | accountableOwners: 4 | service: c8aedd2a-1f14-4660-83e2-c74a9417c3cc 5 | routing: 6 | defaultAreaPath: 7 | org: devdiv 8 | path: DevDiv\NET Developer Experience\CSharp and VB IDE 9 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Scopes.cmd: -------------------------------------------------------------------------------- 1 | csc /target:library /debug:portable /optimize- /deterministic Scopes.cs 2 | copy /y Scopes.pdb Scopes.pdbx 3 | copy /y Scopes.dll Scopes.dllx 4 | 5 | csc /target:library /debug+ /optimize- /deterministic Scopes.cs -------------------------------------------------------------------------------- /eng/common/templates-official/jobs/jobs.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/jobs/jobs.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Async.cmd: -------------------------------------------------------------------------------- 1 | csc /target:library /debug:portable /optimize- /deterministic Async.cs 2 | copy /y Async.pdb Async.pdbx 3 | copy /y Async.dll Async.dllx 4 | 5 | csc /target:library /debug+ /optimize- /deterministic Async.cs 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Misc.cmd: -------------------------------------------------------------------------------- 1 | csc /target:library /debug:portable /optimize- /unsafe+ /deterministic Misc.cs 2 | copy /y Misc.pdb Misc.pdbx 3 | copy /y Misc.dll Misc.dllx 4 | 5 | csc /target:library /debug+ /optimize- /unsafe+ /deterministic Misc.cs -------------------------------------------------------------------------------- /eng/common/templates/job/onelocbuild.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/job/onelocbuild.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/job/source-build.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/job/source-build.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/jobs/source-build.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/jobs/source-build.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} -------------------------------------------------------------------------------- /eng/common/templates-official/job/onelocbuild.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/job/onelocbuild.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/jobs/source-build.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/jobs/source-build.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} -------------------------------------------------------------------------------- /eng/common/templates/jobs/codeql-build.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/jobs/codeql-build.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/steps/publish-logs.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/publish-logs.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/steps/retain-build.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/retain-build.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/steps/source-build.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/source-build.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/EmbeddedSourceNoCode.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | -------------------------------------------------------------------------------- /eng/common/dotnet.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: This script is used to install the .NET SDK. 4 | :: It will also invoke the SDK with any provided arguments. 5 | 6 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet.ps1""" %*" 7 | exit /b %ErrorLevel% 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/job/source-build.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/job/source-build.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/jobs/codeql-build.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/jobs/codeql-build.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/steps/generate-sbom.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/generate-sbom.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/steps/send-to-helix.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/send-to-helix.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/steps/generate-sbom.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/generate-sbom.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/steps/publish-logs.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/publish-logs.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/steps/retain-build.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/retain-build.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/steps/send-to-helix.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/send-to-helix.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/steps/source-build.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/source-build.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/job/publish-build-assets.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/job/publish-build-assets.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/job/source-index-stage1.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/job/source-index-stage1.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/steps/component-governance.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/component-governance.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/steps/get-delegation-sas.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/get-delegation-sas.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Iterator.cmd: -------------------------------------------------------------------------------- 1 | csc /target:library /debug:portable /optimize- /deterministic Iterator.cs 2 | copy /y Iterator.pdb Iterator.pdbx 3 | copy /y Iterator.dll Iterator.dllx 4 | 5 | csc /target:library /debug+ /optimize- /deterministic Iterator.cs 6 | 7 | 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/job/publish-build-assets.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/job/publish-build-assets.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/job/source-index-stage1.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | - template: /eng/common/core-templates/job/source-index-stage1.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/steps/get-delegation-sas.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/get-delegation-sas.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/steps/enable-internal-sources.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/enable-internal-sources.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} -------------------------------------------------------------------------------- /eng/common/templates-official/steps/component-governance.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/component-governance.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/steps/enable-internal-sources.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/enable-internal-sources.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} -------------------------------------------------------------------------------- /eng/common/templates/steps/get-federated-access-token.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/get-federated-access-token.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} -------------------------------------------------------------------------------- /CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | This project has adopted the code of conduct defined by the Contributor Covenant 4 | to clarify expected behavior in our community. 5 | 6 | For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct). 7 | -------------------------------------------------------------------------------- /eng/common/templates-official/steps/get-federated-access-token.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/get-federated-access-token.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} -------------------------------------------------------------------------------- /eng/common/templates/steps/source-index-stage1-publish.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/source-index-stage1-publish.yml 3 | parameters: 4 | is1ESPipeline: false 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/EmbeddedSourceNoSequencePoints.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | interface I { } 6 | -------------------------------------------------------------------------------- /eng/common/templates-official/steps/source-index-stage1-publish.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/steps/source-index-stage1-publish.yml 3 | parameters: 4 | is1ESPipeline: true 5 | 6 | ${{ each parameter in parameters }}: 7 | ${{ parameter.key }}: ${{ parameter.value }} 8 | -------------------------------------------------------------------------------- /eng/common/templates/post-build/post-build.yml: -------------------------------------------------------------------------------- 1 | stages: 2 | - template: /eng/common/core-templates/post-build/post-build.yml 3 | parameters: 4 | # Specifies whether to use 1ES 5 | is1ESPipeline: false 6 | 7 | ${{ each parameter in parameters }}: 8 | ${{ parameter.key }}: ${{ parameter.value }} -------------------------------------------------------------------------------- /eng/common/templates-official/post-build/post-build.yml: -------------------------------------------------------------------------------- 1 | stages: 2 | - template: /eng/common/core-templates/post-build/post-build.yml 3 | parameters: 4 | # Specifies whether to use 1ES 5 | is1ESPipeline: true 6 | 7 | ${{ each parameter in parameters }}: 8 | ${{ parameter.key }}: ${{ parameter.value }} 9 | -------------------------------------------------------------------------------- /eng/common/templates/post-build/common-variables.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | - template: /eng/common/core-templates/post-build/common-variables.yml 3 | parameters: 4 | # Specifies whether to use 1ES 5 | is1ESPipeline: false 6 | 7 | ${{ each parameter in parameters }}: 8 | ${{ parameter.key }}: ${{ parameter.value }} -------------------------------------------------------------------------------- /eng/common/templates/post-build/setup-maestro-vars.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml 3 | parameters: 4 | # Specifies whether to use 1ES 5 | is1ESPipeline: false 6 | 7 | ${{ each parameter in parameters }}: 8 | ${{ parameter.key }}: ${{ parameter.value }} -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/EmbeddedSourceSmall.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | public class Small 5 | { 6 | public Small() {} 7 | } 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/post-build/common-variables.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | - template: /eng/common/core-templates/post-build/common-variables.yml 3 | parameters: 4 | # Specifies whether to use 1ES 5 | is1ESPipeline: true 6 | 7 | ${{ each parameter in parameters }}: 8 | ${{ parameter.key }}: ${{ parameter.value }} -------------------------------------------------------------------------------- /eng/common/templates-official/post-build/setup-maestro-vars.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml 3 | parameters: 4 | # Specifies whether to use 1ES 5 | is1ESPipeline: true 6 | 7 | ${{ each parameter in parameters }}: 8 | ${{ parameter.key }}: ${{ parameter.value }} -------------------------------------------------------------------------------- /eng/common/core-templates/variables/pool-providers.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | is1ESPipeline: false 3 | 4 | variables: 5 | - ${{ if eq(parameters.is1ESPipeline, 'true') }}: 6 | - template: /eng/common/templates-official/variables/pool-providers.yml 7 | - ${{ else }}: 8 | - template: /eng/common/templates/variables/pool-providers.yml -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Imports.cmd: -------------------------------------------------------------------------------- 1 | csc /target:library /debug:portable /optimize- /deterministic /r:ExternAlias1=System.Core.dll Imports.cs 2 | copy /y Imports.pdb Imports.pdbx 3 | copy /y Imports.dll Imports.dllx 4 | 5 | csc /target:library /debug+ /optimize- /deterministic /r:ExternAlias1=System.Core.dll Imports.cs 6 | 7 | 8 | -------------------------------------------------------------------------------- /eng/common/templates-official/variables/sdl-variables.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | # The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in 3 | # sync with the packages.config file. 4 | - name: DefaultGuardianVersion 5 | value: 0.109.0 6 | - name: GuardianPackagesConfigFile 7 | value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config -------------------------------------------------------------------------------- /eng/common/dotnet.ps1: -------------------------------------------------------------------------------- 1 | # This script is used to install the .NET SDK. 2 | # It will also invoke the SDK with any provided arguments. 3 | 4 | . $PSScriptRoot\tools.ps1 5 | $dotnetRoot = InitializeDotNetCli -install:$true 6 | 7 | # Invoke acquired SDK with args if they are provided 8 | if ($args.count -gt 0) { 9 | $env:DOTNET_NOLOGO=1 10 | & "$dotnetRoot\dotnet.exe" $args 11 | } 12 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/MethodBoundaries.cmd: -------------------------------------------------------------------------------- 1 | csc /target:library /debug:portable /optimize- /noconfig /deterministic /pathmap:%~dp0=/_/ MethodBoundaries.cs 2 | copy /y MethodBoundaries.pdb MethodBoundaries.pdbx 3 | copy /y MethodBoundaries.dll MethodBoundaries.dllx 4 | 5 | csc /target:library /debug+ /optimize- /noconfig /deterministic /pathmap:%~dp0=/_/ MethodBoundaries.cs 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/LanguageOnlyTypes.cmd: -------------------------------------------------------------------------------- 1 | csc /target:library /debug:portable /optimize- /noconfig /deterministic /pathmap:%~dp0=/_/ LanguageOnlyTypes.cs System.cs 2 | copy /y LanguageOnlyTypes.pdb LanguageOnlyTypes.pdbx 3 | copy /y LanguageOnlyTypes.dll LanguageOnlyTypes.dllx 4 | 5 | csc /target:library /debug+ /optimize- /noconfig /deterministic /pathmap:%~dp0=/_/ LanguageOnlyTypes.cs System.cs -------------------------------------------------------------------------------- /eng/common/internal/NuGet.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /eng/Signing.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /eng/Version.Details.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | https://github.com/dotnet/arcade 8 | 904bfd153de2a88471c00a7cdd3450948e758db8 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /eng/common/templates-official/steps/enable-internal-runtimes.yml: -------------------------------------------------------------------------------- 1 | # Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' 2 | # variable with the base64-encoded SAS token, by default 3 | steps: 4 | - template: /eng/common/core-templates/steps/enable-internal-runtimes.yml 5 | parameters: 6 | is1ESPipeline: true 7 | 8 | ${{ each parameter in parameters }}: 9 | ${{ parameter.key }}: ${{ parameter.value }} 10 | -------------------------------------------------------------------------------- /eng/common/templates/steps/enable-internal-runtimes.yml: -------------------------------------------------------------------------------- 1 | # Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' 2 | # variable with the base64-encoded SAS token, by default 3 | 4 | steps: 5 | - template: /eng/common/core-templates/steps/enable-internal-runtimes.yml 6 | parameters: 7 | is1ESPipeline: false 8 | 9 | ${{ each parameter in parameters }}: 10 | ${{ parameter.key }}: ${{ parameter.value }} 11 | -------------------------------------------------------------------------------- /eng/common/internal/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | false 6 | false 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Pdb2Xml/Pdb2Xml.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $CommonMetadataElements$ 5 | 6 | 7 | $CommonFileElements$ 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Pdb2Pdb/Pdb2Pdb.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $CommonMetadataElements$ 5 | 6 | 7 | $CommonFileElements$ 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /eng/tsaconfig.gdntsa: -------------------------------------------------------------------------------- 1 | { 2 | "codebaseName": "Symreader-Converter-GitHub", 3 | "notificationAliases": [ 4 | "mlinfraswat@microsoft.com" 5 | ], 6 | "codebaseAdmins": [ 7 | "REDMOND\\tomat", 8 | "REDMOND\\phillipa" 9 | ], 10 | "instanceUrl": "https://devdiv.visualstudio.com", 11 | "projectName": "DevDiv", 12 | "areaPath": "DevDiv\\NET Developer Experience\\Debugger and Interactive", 13 | "iterationPath": "DevDiv", 14 | "allTools": true 15 | } -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Documents.cmd: -------------------------------------------------------------------------------- 1 | csc /target:library /debug:portable /optimize- /deterministic /noconfig /nosdkpath /r:%WINDIR%\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll /pathmap:%~dp0=/ /checksumalgorithm:sha256 Documents.cs 2 | copy /y Documents.pdb Documents.pdbx 3 | copy /y Documents.dll Documents.dllx 4 | 5 | csc /target:library /debug+ /optimize- /deterministic /noconfig /nosdkpath /r:%WINDIR%\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll /pathmap:%~dp0=/ /checksumalgorithm:sha256 Documents.cs 6 | 7 | 8 | -------------------------------------------------------------------------------- /eng/common/cross/x86/tizen/tizen.patch: -------------------------------------------------------------------------------- 1 | diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so 2 | --- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900 3 | +++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900 4 | @@ -2,4 +2,4 @@ 5 | Use the shared library, but some functions are only in 6 | the static library, so try that secondarily. */ 7 | OUTPUT_FORMAT(elf32-i386) 8 | -GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.2 ) ) 9 | +GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.2 ) ) 10 | -------------------------------------------------------------------------------- /eng/common/cross/armel/tizen/tizen.patch: -------------------------------------------------------------------------------- 1 | diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so 2 | --- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900 3 | +++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900 4 | @@ -2,4 +2,4 @@ 5 | Use the shared library, but some functions are only in 6 | the static library, so try that secondarily. */ 7 | OUTPUT_FORMAT(elf32-littlearm) 8 | -GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.3 ) ) 9 | +GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.3 ) ) 10 | -------------------------------------------------------------------------------- /eng/common/PSScriptAnalyzerSettings.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | IncludeRules=@('PSAvoidUsingCmdletAliases', 3 | 'PSAvoidUsingWMICmdlet', 4 | 'PSAvoidUsingPositionalParameters', 5 | 'PSAvoidUsingInvokeExpression', 6 | 'PSUseDeclaredVarsMoreThanAssignments', 7 | 'PSUseCmdletCorrectly', 8 | 'PSStandardDSCFunctionsInResource', 9 | 'PSUseIdenticalMandatoryParametersForDSC', 10 | 'PSUseIdenticalParametersForDSC') 11 | } -------------------------------------------------------------------------------- /eng/common/cross/arm/tizen/tizen.patch: -------------------------------------------------------------------------------- 1 | diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so 2 | --- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900 3 | +++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900 4 | @@ -2,4 +2,4 @@ 5 | Use the shared library, but some functions are only in 6 | the static library, so try that secondarily. */ 7 | OUTPUT_FORMAT(elf32-littlearm) 8 | -GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) ) 9 | +GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-armhf.so.3 ) ) 10 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/EmbeddedSource.cmd: -------------------------------------------------------------------------------- 1 | csc /target:library /debug:portable /optimize- /deterministic /out:EmbeddedSource.dll /pathmap:%~dp0=C:\ /embed EmbeddedSource.cs EmbeddedSourceNoCode.cs EmbeddedSourceSmall.cs EmbeddedSourceNoSequencePoints.cs 2 | copy /y EmbeddedSource.pdb EmbeddedSource.pdbx 3 | copy /y EmbeddedSource.dll EmbeddedSource.dllx 4 | 5 | csc /target:library /debug+ /optimize- /deterministic /out:EmbeddedSource.dll /pathmap:%~dp0=C:\ /embed EmbeddedSource.cs EmbeddedSourceNoCode.cs EmbeddedSourceSmall.cs EmbeddedSourceNoSequencePoints.cs 6 | 7 | -------------------------------------------------------------------------------- /eng/common/cross/x64/tizen/tizen.patch: -------------------------------------------------------------------------------- 1 | diff -u -r a/usr/lib64/libc.so b/usr/lib64/libc.so 2 | --- a/usr/lib64/libc.so 2016-12-30 23:00:08.284951863 +0900 3 | +++ b/usr/lib64/libc.so 2016-12-30 23:00:32.140951815 +0900 4 | @@ -2,4 +2,4 @@ 5 | Use the shared library, but some functions are only in 6 | the static library, so try that secondarily. */ 7 | OUTPUT_FORMAT(elf64-x86-64) 8 | -GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) 9 | +GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-x86-64.so.2 ) ) 10 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/SourceLink.cmd: -------------------------------------------------------------------------------- 1 | csc /target:library /debug:portable /optimize- /deterministic /out:SourceLink.dll /sourcelink:SourceLink.json /embed:EmbeddedSourceNoCode.cs Documents.cs 2 | csc /target:library /debug:embedded /optimize- /deterministic /out:SourceLink.Embedded.dll /sourcelink:SourceLink.json /embed:EmbeddedSourceNoCode.cs Documents.cs 3 | 4 | copy /y SourceLink.dll SourceLink.dllx 5 | copy /y SourceLink.pdb SourceLink.pdbx 6 | 7 | csc.exe /target:library /debug:full /optimize- /deterministic /out:SourceLink.dll /sourcelink:SourceLink.json Documents.cs -------------------------------------------------------------------------------- /eng/common/cross/arm64/tizen/tizen.patch: -------------------------------------------------------------------------------- 1 | diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so 2 | --- a/usr/lib64/libc.so 2016-12-30 23:00:08.284951863 +0900 3 | +++ b/usr/lib64/libc.so 2016-12-30 23:00:32.140951815 +0900 4 | @@ -2,4 +2,4 @@ 5 | Use the shared library, but some functions are only in 6 | the static library, so try that secondarily. */ 7 | OUTPUT_FORMAT(elf64-littleaarch64) 8 | -GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-aarch64.so.1 ) ) 9 | +GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-aarch64.so.1 ) ) 10 | -------------------------------------------------------------------------------- /eng/common/cross/riscv64/tizen/tizen.patch: -------------------------------------------------------------------------------- 1 | diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so 2 | --- a/usr/lib64/libc.so 2016-12-30 23:00:08.284951863 +0900 3 | +++ b/usr/lib64/libc.so 2016-12-30 23:00:32.140951815 +0900 4 | @@ -2,4 +2,4 @@ 5 | Use the shared library, but some functions are only in 6 | the static library, so try that secondarily. */ 7 | OUTPUT_FORMAT(elf64-littleriscv) 8 | -GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-riscv64-lp64d.so.1 ) ) 9 | +GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-riscv64-lp64d.so.1 ) ) 10 | -------------------------------------------------------------------------------- /NuGet.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /eng/common/cibuild.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source="${BASH_SOURCE[0]}" 4 | 5 | # resolve $SOURCE until the file is no longer a symlink 6 | while [[ -h $source ]]; do 7 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" 8 | source="$(readlink "$source")" 9 | 10 | # if $source was a relative symlink, we need to resolve it relative to the path where 11 | # the symlink file was located 12 | [[ $source != /* ]] && source="$scriptroot/$source" 13 | done 14 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" 15 | 16 | . "$scriptroot/build.sh" --restore --build --test --pack --publish --ci $@ 17 | -------------------------------------------------------------------------------- /src/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Preview 8 | annotations 9 | enable 10 | MIT 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/EmbeddedSource.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | 7 | namespace Test 8 | { 9 | public static class SomeCode 10 | { 11 | public static int SomeMethod(int value) 12 | { 13 | if (value < 0) 14 | { 15 | throw new ArgumentOutOfRangeException(nameof(value)); 16 | } 17 | 18 | return checked(value + 42); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /eng/common/sdl/NuGet.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/CrossGen.cmd: -------------------------------------------------------------------------------- 1 | set ASSEMBLIES_PATH=%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1 2 | 3 | csc /target:library /debug:portable /optimize- /deterministic CrossGen.cs 4 | C:\ssd\coreclr\bin\Product\Windows_NT.x64.Debug\crossgen.exe /Platform_Assemblies_Paths "%ASSEMBLIES_PATH%" /out CrossGen.ni.dllx CrossGen.dll 5 | copy /y CrossGen.pdb CrossGen.pdbx 6 | copy /y CrossGen.dll CrossGen.dllx 7 | 8 | csc /target:library /debug+ /optimize- /deterministic CrossGen.cs 9 | C:\ssd\coreclr\bin\Product\Windows_NT.x64.Debug\crossgen.exe /Platform_Assemblies_Paths "%ASSEMBLIES_PATH%" /out CrossGen.ni.dll CrossGen.dll 10 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/VB.cmd: -------------------------------------------------------------------------------- 1 | set TUPLE=%USERPROFILE%\.nuget\packages\system.valuetuple\4.4.0\lib\net461\System.ValueTuple.dll 2 | set SYSTEM=%PROGRAM_FILES_32%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.dll 3 | set CORLIB=%PROGRAM_FILES_32%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\mscorlib.dll 4 | 5 | vbc /target:library /debug:portable /optimize- /deterministic /nostdlib /noconfig /r:"%SYSTEM%" /r:"%CORLIB%" /r:"%TUPLE%" @VB.rsp VB.vb 6 | copy /y VB.pdb VB.pdbx 7 | copy /y VB.dll VB.dllx 8 | 9 | vbc /target:library /debug+ /optimize- /deterministic /nostdlib /noconfig /r:"%SYSTEM%" /r:"%CORLIB%" /r:"%TUPLE%" @VB.rsp VB.vb -------------------------------------------------------------------------------- /eng/common/enable-cross-org-publishing.ps1: -------------------------------------------------------------------------------- 1 | param( 2 | [string] $token 3 | ) 4 | 5 | 6 | . $PSScriptRoot\pipeline-logging-functions.ps1 7 | 8 | # Write-PipelineSetVariable will no-op if a variable named $ci is not defined 9 | # Since this script is only ever called in AzDO builds, just universally set it 10 | $ci = $true 11 | 12 | Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -IsMultiJobVariable $false 13 | Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' -IsMultiJobVariable $false 14 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/CrossGen.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | #line 1 "C:\CrossGen.cs" 5 | #pragma checksum "C:\CrossGen.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DBEB2A067B2F0E0D678A002C587A2806056C3DCE" 6 | 7 | using System; 8 | 9 | public class CrossGen 10 | { 11 | public void Foo() 12 | { 13 | Console.WriteLine("This is a foo"); 14 | } 15 | 16 | public int Bar() 17 | { 18 | Console.WriteLine("This is a bar"); 19 | return 42; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | .vs/ 8 | .vscode/ 9 | 10 | # Build results 11 | artifacts/ 12 | Debug/ 13 | Release/ 14 | bin/ 15 | obj/ 16 | .dotnet/ 17 | .packages/ 18 | .tools/ 19 | .packages/ 20 | 21 | # Per-user project properties 22 | launchSettings.json 23 | 24 | # Visual Studio profiler 25 | *.psess 26 | *.vsp 27 | *.vspx 28 | 29 | # ReSharper is a .NET coding add-in 30 | _ReSharper*/ 31 | *.[Rr]e[Ss]harper 32 | 33 | # DotCover is a Code Coverage Tool 34 | *.dotCover 35 | 36 | # NCrunch 37 | *.ncrunch* 38 | .*crunch*.local.xml 39 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.ja.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | 予期しないトークンの種類: {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.ko.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | 예기치 않은 토큰 종류: {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.zh-Hans.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | 意外的标记类型: {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /eng/common/core-templates/steps/publish-pipeline-artifacts.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | - name: is1ESPipeline 3 | type: boolean 4 | default: false 5 | 6 | - name: args 7 | type: object 8 | default: {} 9 | 10 | steps: 11 | - ${{ if ne(parameters.is1ESPipeline, true) }}: 12 | - template: /eng/common/templates/steps/publish-pipeline-artifacts.yml 13 | parameters: 14 | ${{ each parameter in parameters }}: 15 | ${{ parameter.key }}: ${{ parameter.value }} 16 | - ${{ else }}: 17 | - template: /eng/common/templates-official/steps/publish-pipeline-artifacts.yml 18 | parameters: 19 | ${{ each parameter in parameters }}: 20 | ${{ parameter.key }}: ${{ parameter.value }} 21 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.cs.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | Neočekávaný druh tokenu: {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.de.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | Unerwartete Tokenart: {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.it.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | tipo di token imprevisto: {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.zh-Hant.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | 未預期的語彙基元種類: {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/PdbTestResources/TestResource.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | namespace Microsoft.DiaSymReader.Tools.UnitTests 5 | { 6 | public struct TestResource 7 | { 8 | public readonly byte[] PE; 9 | public readonly byte[] Pdb; 10 | 11 | public TestResource(byte[] pe, byte[] pdb) 12 | { 13 | PE = pe; 14 | Pdb = pdb; 15 | } 16 | 17 | public override string ToString() 18 | { 19 | return "TR"; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /eng/common/msbuild.ps1: -------------------------------------------------------------------------------- 1 | [CmdletBinding(PositionalBinding=$false)] 2 | Param( 3 | [string] $verbosity = 'minimal', 4 | [bool] $warnAsError = $true, 5 | [bool] $nodeReuse = $true, 6 | [switch] $ci, 7 | [switch] $prepareMachine, 8 | [switch] $excludePrereleaseVS, 9 | [string] $msbuildEngine = $null, 10 | [Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs 11 | ) 12 | 13 | . $PSScriptRoot\tools.ps1 14 | 15 | try { 16 | if ($ci) { 17 | $nodeReuse = $false 18 | } 19 | 20 | MSBuild @extraArgs 21 | } 22 | catch { 23 | Write-Host $_.ScriptStackTrace 24 | Write-PipelineTelemetryError -Category 'Build' -Message $_ 25 | ExitWithExitCode 1 26 | } 27 | 28 | ExitWithExitCode 0 -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.es.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | tipo de token no esperado: {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.fr.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | genre de jeton inattendu : {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.pl.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | nieoczekiwany rodzaj tokenu: {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.ru.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | Непредвиденный тип токена: {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.tr.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | beklenmeyen belirteç türü: {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/PdbToXmlResources.pt-BR.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | unexpected token kind: {0} 7 | tipo de token inesperado: {0} 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Async.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | #line 1 "C:\Async.cs" 5 | #pragma checksum "C:\Async.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DBEB2A067B2F0E0D678A002C587A2806056C3DCE" 6 | 7 | using System.Threading.Tasks; 8 | 9 | public class C 10 | { 11 | public async Task M1() 12 | { 13 | await Task.FromResult(0); 14 | await Task.FromResult(1); 15 | await Task.FromResult(2); 16 | 17 | return 1; 18 | } 19 | 20 | public async void M2() 21 | { 22 | await Task.FromResult(0); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /eng/common/core-templates/post-build/common-variables.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | - group: Publish-Build-Assets 3 | 4 | # Whether the build is internal or not 5 | - name: IsInternalBuild 6 | value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }} 7 | 8 | # Default Maestro++ API Endpoint and API Version 9 | - name: MaestroApiEndPoint 10 | value: "https://maestro.dot.net" 11 | - name: MaestroApiVersion 12 | value: "2020-02-20" 13 | 14 | - name: SourceLinkCLIVersion 15 | value: 3.0.0 16 | - name: SymbolToolVersion 17 | value: 1.0.1 18 | - name: BinlogToolVersion 19 | value: 1.0.11 20 | 21 | - name: runCodesignValidationInjection 22 | value: false 23 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter/Utilities/HResult.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | namespace Microsoft.DiaSymReader.Tools 6 | { 7 | internal static class HResult 8 | { 9 | internal const int S_OK = 0; 10 | internal const int S_FALSE = 1; 11 | internal const int E_NOTIMPL = unchecked((int)0x80004001); 12 | internal const int E_FAIL = unchecked((int)0x80004005); 13 | internal const int E_INVALIDARG = unchecked((int)0x80070057); 14 | internal const int E_UNEXPECTED = unchecked((int)0x8000FFFF); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/SourceData.srcsrv.txt: -------------------------------------------------------------------------------- 1 | SRCSRV: ini ------------------------------------------------ 2 | VERSION=2 3 | SRCSRV: variables ------------------------------------------ 4 | RAWURL=http://server/%var2% 5 | SRCSRVVERCTRL=http 6 | SRCSRVTRG=%RAWURL% 7 | SRCSRV: source files --------------------------------------- 8 | C:\Documents.cs*3/Documents.cs.g 9 | C:\a\b\c\d\1.cs*1/a/b/c/d/1.cs 10 | C:\a\b\c\D\2.cs*1/a/b/c/D/2.cs 11 | C:\a\b\C\d\3.cs*1/a/b/C/d/3.cs 12 | C:\a\b\c\d\x.cs*1/a/b/c/d/x.cs 13 | C:\A\b\c\x.cs*1/a/b/c/x.cs 14 | C:\a\b\x.cs*1/a/b/x.cs 15 | C:\a\B\3.cs*1/a/B/3.cs 16 | C:\a\B\c\4.cs*1/a/B/c/4.cs 17 | :6.cs*4/%3A6.cs 18 | C:\a\b\X.cs*1/a/b/X.cs 19 | C:\a\B\x.cs*1/a/B/x.cs 20 | SRCSRV: end ------------------------------------------------ -------------------------------------------------------------------------------- /eng/common/core-templates/steps/component-governance.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | disableComponentGovernance: false 3 | componentGovernanceIgnoreDirectories: '' 4 | is1ESPipeline: false 5 | displayName: 'Component Detection' 6 | 7 | steps: 8 | - ${{ if eq(parameters.disableComponentGovernance, 'true') }}: 9 | - script: echo "##vso[task.setvariable variable=skipComponentGovernanceDetection]true" 10 | displayName: Set skipComponentGovernanceDetection variable 11 | - ${{ if ne(parameters.disableComponentGovernance, 'true') }}: 12 | - task: ComponentGovernanceComponentDetection@0 13 | continueOnError: true 14 | displayName: ${{ parameters.displayName }} 15 | inputs: 16 | ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} 17 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Misc.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | #line 1 "C:\Misc.cs" 5 | #pragma checksum "C:\Misc.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DBEB2A067B2F0E0D678A002C587A2806056C3DCE" 6 | 7 | using System; 8 | using System.Collections.Generic; 9 | using X = C; 10 | 11 | unsafe class C 12 | { 13 | private void*[] x = null; 14 | private void* y = null; 15 | 16 | public void* M(Action b) 17 | { 18 | var c = new C(); 19 | Console.Write(c.x); // MemberRef to TypeSpec C 20 | return y; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /eng/common/core-templates/steps/publish-build-artifacts.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | - name: is1ESPipeline 3 | type: boolean 4 | default: false 5 | - name: args 6 | type: object 7 | default: {} 8 | steps: 9 | - ${{ if ne(parameters.is1ESPipeline, true) }}: 10 | - template: /eng/common/templates/steps/publish-build-artifacts.yml 11 | parameters: 12 | is1ESPipeline: ${{ parameters.is1ESPipeline }} 13 | ${{ each parameter in parameters.args }}: 14 | ${{ parameter.key }}: ${{ parameter.value }} 15 | - ${{ else }}: 16 | - template: /eng/common/templates-official/steps/publish-build-artifacts.yml 17 | parameters: 18 | is1ESPipeline: ${{ parameters.is1ESPipeline }} 19 | ${{ each parameter in parameters.args }}: 20 | ${{ parameter.key }}: ${{ parameter.value }} -------------------------------------------------------------------------------- /src/TestUtilities/TestUtilities.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | net7.0;net472 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /eng/common/post-build/nuget-validation.ps1: -------------------------------------------------------------------------------- 1 | # This script validates NuGet package metadata information using this 2 | # tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage 3 | 4 | param( 5 | [Parameter(Mandatory=$true)][string] $PackagesPath # Path to where the packages to be validated are 6 | ) 7 | 8 | # `tools.ps1` checks $ci to perform some actions. Since the post-build 9 | # scripts don't necessarily execute in the same agent that run the 10 | # build.ps1/sh script this variable isn't automatically set. 11 | $ci = $true 12 | $disableConfigureToolsetImport = $true 13 | . $PSScriptRoot\..\tools.ps1 14 | 15 | try { 16 | & $PSScriptRoot\nuget-verification.ps1 ${PackagesPath}\*.nupkg 17 | } 18 | catch { 19 | Write-Host $_.ScriptStackTrace 20 | Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_ 21 | ExitWithExitCode 1 22 | } 23 | -------------------------------------------------------------------------------- /eng/common/dotnet-install.ps1: -------------------------------------------------------------------------------- 1 | [CmdletBinding(PositionalBinding=$false)] 2 | Param( 3 | [string] $verbosity = 'minimal', 4 | [string] $architecture = '', 5 | [string] $version = 'Latest', 6 | [string] $runtime = 'dotnet', 7 | [string] $RuntimeSourceFeed = '', 8 | [string] $RuntimeSourceFeedKey = '' 9 | ) 10 | 11 | . $PSScriptRoot\tools.ps1 12 | 13 | $dotnetRoot = Join-Path $RepoRoot '.dotnet' 14 | 15 | $installdir = $dotnetRoot 16 | try { 17 | if ($architecture -and $architecture.Trim() -eq 'x86') { 18 | $installdir = Join-Path $installdir 'x86' 19 | } 20 | InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey 21 | } 22 | catch { 23 | Write-Host $_.ScriptStackTrace 24 | Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ 25 | ExitWithExitCode 1 26 | } 27 | 28 | ExitWithExitCode 0 29 | -------------------------------------------------------------------------------- /eng/common/dotnet.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script is used to install the .NET SDK. 4 | # It will also invoke the SDK with any provided arguments. 5 | 6 | source="${BASH_SOURCE[0]}" 7 | # resolve $SOURCE until the file is no longer a symlink 8 | while [[ -h $source ]]; do 9 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" 10 | source="$(readlink "$source")" 11 | 12 | # if $source was a relative symlink, we need to resolve it relative to the path where the 13 | # symlink file was located 14 | [[ $source != /* ]] && source="$scriptroot/$source" 15 | done 16 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" 17 | 18 | source $scriptroot/tools.sh 19 | InitializeDotNetCli true # install 20 | 21 | # Invoke acquired SDK with args if they are provided 22 | if [[ $# -gt 0 ]]; then 23 | __dotnetDir=${_InitializeDotNetCli} 24 | dotnetPath=${__dotnetDir}/dotnet 25 | ${dotnetPath} "$@" 26 | fi 27 | -------------------------------------------------------------------------------- /src/Pdb2Pdb.Tests/TempFiles/DisposableDirectory.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | using System.IO; 7 | 8 | namespace Microsoft.CodeAnalysis.Test.Utilities 9 | { 10 | public sealed class DisposableDirectory : TempDirectory, IDisposable 11 | { 12 | public DisposableDirectory(TempRoot root) 13 | : base(root) 14 | { 15 | } 16 | 17 | public void Dispose() 18 | { 19 | if (Path != null && Directory.Exists(Path)) 20 | { 21 | try 22 | { 23 | Directory.Delete(Path, recursive: true); 24 | } 25 | catch 26 | { 27 | } 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Iterator.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | #line 1 "C:\Iterator.cs" 5 | #pragma checksum "C:\Iterator.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DBEB2A067B2F0E0D678A002C587A2806056C3DCE" 6 | 7 | using System.Collections.Generic; 8 | 9 | class C 10 | { 11 | class D 12 | { 13 | IEnumerable M() 14 | { 15 | int a = 1; 16 | const int x = 1; 17 | for (int i = 0; i < 10; i++) 18 | { 19 | const int y = 2; 20 | int b = 2; 21 | yield return x + y + i + a + b; 22 | } 23 | } 24 | 25 | IEnumerable M() 26 | { 27 | yield return 1; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /eng/common/helixpublish.proj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | msbuild 6 | 7 | 8 | 9 | 10 | %(Identity) 11 | 12 | 13 | 14 | 15 | 16 | $(WorkItemDirectory) 17 | $(WorkItemCommand) 18 | $(WorkItemTimeout) 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Pdb2Pdb.Tests/Pdb2Pdb.UnitTests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | net472 6 | true 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /eng/common/core-templates/steps/cleanup-microbuild.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | # Enable cleanup tasks for MicroBuild 3 | enableMicrobuild: false 4 | # Enable cleanup tasks for MicroBuild on Mac and Linux 5 | # Will be ignored if 'enableMicrobuild' is false or 'Agent.Os' is 'Windows_NT' 6 | enableMicrobuildForMacAndLinux: false 7 | continueOnError: false 8 | 9 | steps: 10 | - ${{ if eq(parameters.enableMicrobuild, 'true') }}: 11 | - task: MicroBuildCleanup@1 12 | displayName: Execute Microbuild cleanup tasks 13 | condition: and( 14 | always(), 15 | or( 16 | and( 17 | eq(variables['Agent.Os'], 'Windows_NT'), 18 | in(variables['_SignType'], 'real', 'test') 19 | ), 20 | and( 21 | ${{ eq(parameters.enableMicrobuildForMacAndLinux, true) }}, 22 | ne(variables['Agent.Os'], 'Windows_NT'), 23 | eq(variables['_SignType'], 'real') 24 | ) 25 | )) 26 | continueOnError: ${{ parameters.continueOnError }} 27 | env: 28 | TeamName: $(_TeamName) 29 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter/Utilities/ExceptionUtilities.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | using System.Diagnostics; 7 | 8 | namespace Roslyn.Utilities 9 | { 10 | internal static class ExceptionUtilities 11 | { 12 | internal static Exception UnexpectedValue(object o) 13 | { 14 | string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : ""); 15 | Debug.Assert(false, output); 16 | 17 | // We do not throw from here because we don't want all Watson reports to be bucketed to this call. 18 | return new InvalidOperationException(output); 19 | } 20 | 21 | internal static Exception Unreachable 22 | { 23 | get { return new InvalidOperationException("This program location is thought to be unreachable."); } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /eng/common/core-templates/steps/install-microbuild-impl.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | - name: microbuildTaskInputs 3 | type: object 4 | default: {} 5 | 6 | - name: microbuildEnv 7 | type: object 8 | default: {} 9 | 10 | - name: enablePreviewMicrobuild 11 | type: boolean 12 | default: false 13 | 14 | - name: condition 15 | type: string 16 | 17 | - name: continueOnError 18 | type: boolean 19 | 20 | steps: 21 | - ${{ if eq(parameters.enablePreviewMicrobuild, 'true') }}: 22 | - task: MicroBuildSigningPluginPreview@4 23 | displayName: Install Preview MicroBuild plugin (Windows) 24 | inputs: ${{ parameters.microbuildTaskInputs }} 25 | env: ${{ parameters.microbuildEnv }} 26 | continueOnError: ${{ parameters.continueOnError }} 27 | condition: ${{ parameters.condition }} 28 | - ${{ else }}: 29 | - task: MicroBuildSigningPlugin@4 30 | displayName: Install MicroBuild plugin (Windows) 31 | inputs: ${{ parameters.microbuildTaskInputs }} 32 | env: ${{ parameters.microbuildEnv }} 33 | continueOnError: ${{ parameters.continueOnError }} 34 | condition: ${{ parameters.condition }} -------------------------------------------------------------------------------- /eng/common/templates-official/steps/publish-pipeline-artifacts.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | - name: is1ESPipeline 3 | type: boolean 4 | default: true 5 | 6 | - name: args 7 | type: object 8 | default: {} 9 | 10 | steps: 11 | - ${{ if ne(parameters.is1ESPipeline, true) }}: 12 | - 'eng/common/templates-official cannot be referenced from a non-1ES managed template': error 13 | - task: 1ES.PublishPipelineArtifact@1 14 | displayName: ${{ coalesce(parameters.args.displayName, 'Publish to Build Artifact') }} 15 | ${{ if parameters.args.condition }}: 16 | condition: ${{ parameters.args.condition }} 17 | ${{ else }}: 18 | condition: succeeded() 19 | ${{ if parameters.args.continueOnError }}: 20 | continueOnError: ${{ parameters.args.continueOnError }} 21 | inputs: 22 | targetPath: ${{ parameters.args.targetPath }} 23 | ${{ if parameters.args.artifactName }}: 24 | artifactName: ${{ parameters.args.artifactName }} 25 | ${{ if parameters.args.properties }}: 26 | properties: ${{ parameters.args.properties }} 27 | ${{ if parameters.args.sbomEnabled }}: 28 | sbomEnabled: ${{ parameters.args.sbomEnabled }} 29 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter/WindowsPdbConversionOptions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Collections.Immutable; 8 | 9 | namespace Microsoft.DiaSymReader.Tools 10 | { 11 | /// 12 | /// Windows to Portable PDB conversion options. 13 | /// 14 | public sealed class WindowsPdbConversionOptions 15 | { 16 | public static readonly WindowsPdbConversionOptions Default = new(); 17 | 18 | /// 19 | /// Customizes creation of the Windows PDB reader. 20 | /// 21 | public SymUnmanagedReaderCreationOptions ReaderCreationOptions { get; } 22 | 23 | public WindowsPdbConversionOptions( 24 | SymUnmanagedReaderCreationOptions readerCreationOptions = SymUnmanagedReaderCreationOptions.Default) 25 | { 26 | ReaderCreationOptions = readerCreationOptions; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) .NET Foundation and Contributors 4 | 5 | All rights reserved. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter/Utilities/EnumerableUtilities.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | using System.Collections.Generic; 7 | 8 | namespace Microsoft.DiaSymReader.Tools 9 | { 10 | internal static class EnumerableUtilities 11 | { 12 | public static int IndexOf(this IEnumerable sequence, Func predicate) 13 | { 14 | int index = 0; 15 | foreach (var item in sequence) 16 | { 17 | if (predicate(item)) 18 | { 19 | return index; 20 | } 21 | 22 | index++; 23 | } 24 | 25 | return -1; 26 | } 27 | 28 | public static IEnumerable<(T Value, int Index)> SelectWithIndex(this IEnumerable sequence) 29 | { 30 | int index = 0; 31 | foreach (var item in sequence) 32 | { 33 | yield return (item, index++); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Documents.cs: -------------------------------------------------------------------------------- 1 | #line 1 "C:\Documents.cs" 2 | #pragma checksum "C:\Documents.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DBEB2A067B2F0E0D678A002C587A2806056C3DCE" 3 | using System; 4 | 5 | class C 6 | { 7 | public void M() 8 | { 9 | #line 10 "C:\a\b\c\d\1.cs" 10 | Console.WriteLine(1); 11 | #line 20 "C:\a\b\c\D\2.cs" 12 | Console.WriteLine(2); 13 | #line 30 "C:\a\b\C\d\3.cs" 14 | Console.WriteLine(3); 15 | #line 40 16 | Console.WriteLine(4); 17 | #line hidden 18 | Console.WriteLine(); 19 | #line 50 "C:\a\b\c\d\x.cs" 20 | Console.WriteLine(5); 21 | #line 60 "C:\A\b\c\x.cs" 22 | Console.WriteLine(5); 23 | #line 70 "C:\a\b\x.cs" 24 | Console.WriteLine(5); 25 | #line 80 "C:\a\B\3.cs" 26 | Console.WriteLine(3); 27 | #line 90 "C:\a\B\c/4.cs" 28 | Console.WriteLine(4); 29 | #line 100 "C:\*\5.cs" 30 | Console.WriteLine(5); 31 | #line 110 ":6.cs" 32 | Console.WriteLine(6); 33 | #line 120 "C:\a\b\X.cs" 34 | Console.WriteLine(7); 35 | #line 130 "C:\a\B\x.cs" 36 | Console.WriteLine(8); 37 | } 38 | 39 | #line hidden 40 | void F() 41 | { 42 | _ = new Func(i => i + 1); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /eng/common/core-templates/steps/enable-internal-runtimes.yml: -------------------------------------------------------------------------------- 1 | # Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' 2 | # variable with the base64-encoded SAS token, by default 3 | 4 | parameters: 5 | - name: federatedServiceConnection 6 | type: string 7 | default: 'dotnetbuilds-internal-read' 8 | - name: outputVariableName 9 | type: string 10 | default: 'dotnetbuilds-internal-container-read-token-base64' 11 | - name: expiryInHours 12 | type: number 13 | default: 1 14 | - name: base64Encode 15 | type: boolean 16 | default: true 17 | - name: is1ESPipeline 18 | type: boolean 19 | default: false 20 | 21 | steps: 22 | - ${{ if ne(variables['System.TeamProject'], 'public') }}: 23 | - template: /eng/common/core-templates/steps/get-delegation-sas.yml 24 | parameters: 25 | federatedServiceConnection: ${{ parameters.federatedServiceConnection }} 26 | outputVariableName: ${{ parameters.outputVariableName }} 27 | expiryInHours: ${{ parameters.expiryInHours }} 28 | base64Encode: ${{ parameters.base64Encode }} 29 | storageAccount: dotnetbuilds 30 | container: internal 31 | permissions: rl 32 | is1ESPipeline: ${{ parameters.is1ESPipeline }} -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.zh-Hans.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | 元数据不可用 8 | 9 | 10 | 11 | Stream must be readable 12 | 流必须可读 13 | 14 | 15 | 16 | Stream must be seakable 17 | 流必须可查找 18 | 19 | 20 | 21 | Stream must be writable 22 | 流必须可写 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /eng/common/generate-sbom-prep.ps1: -------------------------------------------------------------------------------- 1 | Param( 2 | [Parameter(Mandatory=$true)][string] $ManifestDirPath # Manifest directory where sbom will be placed 3 | ) 4 | 5 | . $PSScriptRoot\pipeline-logging-functions.ps1 6 | 7 | # Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly 8 | # with their own overwriting ours. So we create it as a sub directory of the requested manifest path. 9 | $ArtifactName = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" 10 | $SafeArtifactName = $ArtifactName -replace '["/:<>\\|?@*"() ]', '_' 11 | $SbomGenerationDir = Join-Path $ManifestDirPath $SafeArtifactName 12 | 13 | Write-Host "Artifact name before : $ArtifactName" 14 | Write-Host "Artifact name after : $SafeArtifactName" 15 | 16 | Write-Host "Creating dir $ManifestDirPath" 17 | 18 | # create directory for sbom manifest to be placed 19 | if (!(Test-Path -path $SbomGenerationDir)) 20 | { 21 | New-Item -ItemType Directory -path $SbomGenerationDir 22 | Write-Host "Successfully created directory $SbomGenerationDir" 23 | } 24 | else{ 25 | Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." 26 | } 27 | 28 | Write-Host "Updating artifact name" 29 | Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$SafeArtifactName" 30 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.zh-Hant.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | 無法使用中繼資料 8 | 9 | 10 | 11 | Stream must be readable 12 | 資料流必須可讀取 13 | 14 | 15 | 16 | Stream must be seakable 17 | 資料流必須可搜尋 18 | 19 | 20 | 21 | Stream must be writable 22 | 資料流必須可寫入 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter/Utilities/DummySymReaderMetadataProvider.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | using System.Reflection; 7 | 8 | namespace Microsoft.DiaSymReader.Tools 9 | { 10 | internal sealed class DummySymReaderMetadataProvider : ISymReaderMetadataProvider 11 | { 12 | public static readonly ISymReaderMetadataProvider Instance = new DummySymReaderMetadataProvider(); 13 | 14 | public unsafe bool TryGetStandaloneSignature(int standaloneSignatureToken, out byte* signature, out int length) 15 | => throw new NotSupportedException(ConverterResources.MetadataNotAvailable); 16 | 17 | public bool TryGetTypeDefinitionInfo(int typeDefinitionToken, out string namespaceName, out string typeName, out TypeAttributes attributes) 18 | => throw new NotSupportedException(ConverterResources.MetadataNotAvailable); 19 | 20 | public bool TryGetTypeReferenceInfo(int typeReferenceToken, out string namespaceName, out string typeName) 21 | => throw new NotSupportedException(ConverterResources.MetadataNotAvailable); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.ja.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | メタデータを利用できません 8 | 9 | 10 | 11 | Stream must be readable 12 | ストリームは読み取り可能である必要があります 13 | 14 | 15 | 16 | Stream must be seakable 17 | ストリームはシーク可能である必要があります 18 | 19 | 20 | 21 | Stream must be writable 22 | ストリームは書き込み可能である必要があります 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.ko.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | 메타데이터를 사용할 수 없음 8 | 9 | 10 | 11 | Stream must be readable 12 | 스트림은 읽기 가능한 상태여야 합니다. 13 | 14 | 15 | 16 | Stream must be seakable 17 | 스트림은 검색 가능한 상태여야 합니다. 18 | 19 | 20 | 21 | Stream must be writable 22 | 스트림은 쓰기 가능한 상태여야 합니다. 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /eng/common/core-templates/steps/retain-build.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | # Optional azure devops PAT with build execute permissions for the build's organization, 3 | # only needed if the build that should be retained ran on a different organization than 4 | # the pipeline where this template is executing from 5 | Token: '' 6 | # Optional BuildId to retain, defaults to the current running build 7 | BuildId: '' 8 | # Azure devops Organization URI for the build in the https://dev.azure.com/ format. 9 | # Defaults to the organization the current pipeline is running on 10 | AzdoOrgUri: '$(System.CollectionUri)' 11 | # Azure devops project for the build. Defaults to the project the current pipeline is running on 12 | AzdoProject: '$(System.TeamProject)' 13 | 14 | steps: 15 | - task: powershell@2 16 | inputs: 17 | targetType: 'filePath' 18 | filePath: eng/common/retain-build.ps1 19 | pwsh: true 20 | arguments: > 21 | -AzdoOrgUri: ${{parameters.AzdoOrgUri}} 22 | -AzdoProject ${{parameters.AzdoProject}} 23 | -Token ${{coalesce(parameters.Token, '$env:SYSTEM_ACCESSTOKEN') }} 24 | -BuildId ${{coalesce(parameters.BuildId, '$env:BUILD_ID')}} 25 | displayName: Enable permanent build retention 26 | env: 27 | SYSTEM_ACCESSTOKEN: $(System.AccessToken) 28 | BUILD_ID: $(Build.BuildId) -------------------------------------------------------------------------------- /src/Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | <_ProjectDefinedPackageId>$(PackageId) 11 | *fake_packageid_for_project_$(MSBuildProjectName)* 12 | 13 | 14 | 18 | 19 | 20 | $(_ProjectDefinedPackageId) 21 | $(AssemblyName) 22 | $(MSBuildProjectName) 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.tr.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | Meta veriler kullanılamıyor 8 | 9 | 10 | 11 | Stream must be readable 12 | Akış okunabilir olmalıdır 13 | 14 | 15 | 16 | Stream must be seakable 17 | Akış aranabilir olmalıdır 18 | 19 | 20 | 21 | Stream must be writable 22 | Akış yazılabilir olmalıdır 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.pt-BR.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | Metadados não disponíveis 8 | 9 | 10 | 11 | Stream must be readable 12 | O fluxo deve ser legível 13 | 14 | 15 | 16 | Stream must be seakable 17 | O fluxo deve ser pesquisável 18 | 19 | 20 | 21 | Stream must be writable 22 | O fluxo deve ser gravável 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.cs.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | Metadata nejsou dostupná. 8 | 9 | 10 | 11 | Stream must be readable 12 | Stream musí být možné číst. 13 | 14 | 15 | 16 | Stream must be seakable 17 | Stream musí být možné prohledávat. 18 | 19 | 20 | 21 | Stream must be writable 22 | Stream musí být možné zapisovat. 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter/Utilities/StreamUtilities.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | using System.IO; 7 | 8 | namespace Microsoft.DiaSymReader.Tools 9 | { 10 | internal static class StreamUtilities 11 | { 12 | public static void ValidateStream(Stream stream, string parameterName, bool readRequired = false, bool writeRequired = false, bool seekRequired = false) 13 | { 14 | if (stream == null) 15 | { 16 | throw new ArgumentNullException(parameterName); 17 | } 18 | 19 | if (readRequired && !stream.CanRead) 20 | { 21 | throw new ArgumentException(ConverterResources.StreamMustBeReadable, parameterName); 22 | } 23 | 24 | if (writeRequired && !stream.CanWrite) 25 | { 26 | throw new ArgumentException(ConverterResources.StreamMustBeWritable, parameterName); 27 | } 28 | 29 | if (seekRequired && !stream.CanSeek) 30 | { 31 | throw new ArgumentException(ConverterResources.StreamMustBeSeakable, parameterName); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /eng/common/templates/steps/publish-build-artifacts.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | - name: is1ESPipeline 3 | type: boolean 4 | default: false 5 | 6 | - name: displayName 7 | type: string 8 | default: 'Publish to Build Artifact' 9 | 10 | - name: condition 11 | type: string 12 | default: succeeded() 13 | 14 | - name: artifactName 15 | type: string 16 | 17 | - name: pathToPublish 18 | type: string 19 | 20 | - name: continueOnError 21 | type: boolean 22 | default: false 23 | 24 | - name: publishLocation 25 | type: string 26 | default: 'Container' 27 | 28 | - name: retryCountOnTaskFailure 29 | type: string 30 | default: 10 31 | 32 | steps: 33 | - ${{ if eq(parameters.is1ESPipeline, true) }}: 34 | - 'eng/common/templates cannot be referenced from a 1ES managed template': error 35 | - task: PublishBuildArtifacts@1 36 | displayName: ${{ parameters.displayName }} 37 | condition: ${{ parameters.condition }} 38 | ${{ if parameters.continueOnError }}: 39 | continueOnError: ${{ parameters.continueOnError }} 40 | inputs: 41 | PublishLocation: ${{ parameters.publishLocation }} 42 | PathtoPublish: ${{ parameters.pathToPublish }} 43 | ${{ if parameters.artifactName }}: 44 | ArtifactName: ${{ parameters.artifactName }} 45 | ${{ if parameters.retryCountOnTaskFailure }}: 46 | retryCountOnTaskFailure: ${{ parameters.retryCountOnTaskFailure }} 47 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.fr.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | Métadonnées non disponibles 8 | 9 | 10 | 11 | Stream must be readable 12 | Le flux doit être lisible 13 | 14 | 15 | 16 | Stream must be seakable 17 | Le flux doit pouvoir être recherché 18 | 19 | 20 | 21 | Stream must be writable 22 | Le flux doit être accessible en écriture 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.it.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | Metadati non disponibili 8 | 9 | 10 | 11 | Stream must be readable 12 | Il flusso deve essere leggibile 13 | 14 | 15 | 16 | Stream must be seakable 17 | Il flusso deve supportare la ricerca 18 | 19 | 20 | 21 | Stream must be writable 22 | Il flusso deve essere scrivibile 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.pl.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | Metadane niedostępne 8 | 9 | 10 | 11 | Stream must be readable 12 | Strumień musi być możliwy do odczytu 13 | 14 | 15 | 16 | Stream must be seakable 17 | Strumień musi być możliwy do przeszukania 18 | 19 | 20 | 21 | Stream must be writable 22 | Strumień musi być możliwy do zapisu 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.ru.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | Метаданные недоступны 8 | 9 | 10 | 11 | Stream must be readable 12 | Поток должен быть доступен для чтения 13 | 14 | 15 | 16 | Stream must be seakable 17 | Поток должен быть доступен для поиска 18 | 19 | 20 | 21 | Stream must be writable 22 | Поток должен быть доступен для записи 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/Pdb2Xml/Pdb2Xml.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | net472 6 | Microsoft.DiaSymReader.Tools 7 | Exe 8 | true 9 | true 10 | AnyCPU 11 | 12 | 13 | true 14 | Microsoft.DiaSymReader.Pdb2Xml 15 | Pdb2Xml.nuspec 16 | $(OutputPath) 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /eng/common/sdl/sdl.ps1: -------------------------------------------------------------------------------- 1 | 2 | function Install-Gdn { 3 | param( 4 | [Parameter(Mandatory=$true)] 5 | [string]$Path, 6 | 7 | # If omitted, install the latest version of Guardian, otherwise install that specific version. 8 | [string]$Version 9 | ) 10 | 11 | $ErrorActionPreference = 'Stop' 12 | Set-StrictMode -Version 2.0 13 | $disableConfigureToolsetImport = $true 14 | $global:LASTEXITCODE = 0 15 | 16 | # `tools.ps1` checks $ci to perform some actions. Since the SDL 17 | # scripts don't necessarily execute in the same agent that run the 18 | # build.ps1/sh script this variable isn't automatically set. 19 | $ci = $true 20 | . $PSScriptRoot\..\tools.ps1 21 | 22 | $argumentList = @("install", "Microsoft.Guardian.Cli", "-Source https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json", "-OutputDirectory $Path", "-NonInteractive", "-NoCache") 23 | 24 | if ($Version) { 25 | $argumentList += "-Version $Version" 26 | } 27 | 28 | Start-Process nuget -Verbose -ArgumentList $argumentList -NoNewWindow -Wait 29 | 30 | $gdnCliPath = Get-ChildItem -Filter guardian.cmd -Recurse -Path $Path 31 | 32 | if (!$gdnCliPath) 33 | { 34 | Write-PipelineTelemetryError -Category 'Sdl' -Message 'Failure installing Guardian' 35 | } 36 | 37 | return $gdnCliPath.FullName 38 | } -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.es.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | Los metadatos no están disponibles. 8 | 9 | 10 | 11 | Stream must be readable 12 | La secuencia debe poderse leer. 13 | 14 | 15 | 16 | Stream must be seakable 17 | La secuencia debe poderse buscar. 18 | 19 | 20 | 21 | Stream must be writable 22 | La secuencia debe poderse escribir. 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/xlf/ConverterResources.de.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Metadata not available 7 | Metadaten nicht verfügbar. 8 | 9 | 10 | 11 | Stream must be readable 12 | Der Datenstrom muss lesbar sein. 13 | 14 | 15 | 16 | Stream must be seakable 17 | Der Datenstrom muss durchsuchbar sein. 18 | 19 | 20 | 21 | Stream must be writable 22 | In den Datenstrom muss geschrieben werden können. 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /eng/common/templates-official/steps/publish-build-artifacts.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | - name: displayName 3 | type: string 4 | default: 'Publish to Build Artifact' 5 | 6 | - name: condition 7 | type: string 8 | default: succeeded() 9 | 10 | - name: artifactName 11 | type: string 12 | 13 | - name: pathToPublish 14 | type: string 15 | 16 | - name: continueOnError 17 | type: boolean 18 | default: false 19 | 20 | - name: publishLocation 21 | type: string 22 | default: 'Container' 23 | 24 | - name: is1ESPipeline 25 | type: boolean 26 | default: true 27 | 28 | - name: retryCountOnTaskFailure 29 | type: string 30 | default: 10 31 | 32 | steps: 33 | - ${{ if ne(parameters.is1ESPipeline, true) }}: 34 | - 'eng/common/templates-official cannot be referenced from a non-1ES managed template': error 35 | - task: 1ES.PublishBuildArtifacts@1 36 | displayName: ${{ parameters.displayName }} 37 | condition: ${{ parameters.condition }} 38 | ${{ if parameters.continueOnError }}: 39 | continueOnError: ${{ parameters.continueOnError }} 40 | inputs: 41 | PublishLocation: ${{ parameters.publishLocation }} 42 | PathtoPublish: ${{ parameters.pathToPublish }} 43 | ${{ if parameters.artifactName }}: 44 | ArtifactName: ${{ parameters.artifactName }} 45 | ${{ if parameters.retryCountOnTaskFailure }}: 46 | retryCountOnTaskFailure: ${{ parameters.retryCountOnTaskFailure }} 47 | -------------------------------------------------------------------------------- /src/Common/PdbGuids.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | 7 | namespace Microsoft.DiaSymReader.Tools 8 | { 9 | internal static class PdbGuids 10 | { 11 | public static class Language 12 | { 13 | public static readonly Guid CSharp = new Guid("3f5162f8-07c6-11d3-9053-00c04fa302a1"); 14 | public static readonly Guid VisualBasic = new Guid("3a12d0b8-c26c-11d0-b442-00a0244a1dd2"); 15 | public static readonly Guid FSharp = new Guid("ab4f38c9-b6e6-43ba-be3b-58080b2ccce3"); 16 | } 17 | 18 | public static class HashAlgorithm 19 | { 20 | public static readonly Guid SHA1 = new Guid("ff1816ec-aa5e-4d10-87f7-6f4963833460"); 21 | public static readonly Guid SHA256 = new Guid("8829d00f-11b8-4213-878b-770e8597ac16"); 22 | } 23 | 24 | public static class LanguageVendor 25 | { 26 | public static readonly Guid Microsoft = new Guid("994b45c4-e6e9-11d2-903f-00c04fa302a1"); 27 | } 28 | 29 | public static class DocumentType 30 | { 31 | public static readonly Guid Text = new Guid("{5a869d0b-6611-11d3-bd2a-0000f80849bd}"); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /eng/common/core-templates/jobs/codeql-build.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md 3 | continueOnError: false 4 | # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job 5 | jobs: [] 6 | # Optional: if specified, restore and use this version of Guardian instead of the default. 7 | overrideGuardianVersion: '' 8 | is1ESPipeline: '' 9 | 10 | jobs: 11 | - template: /eng/common/core-templates/jobs/jobs.yml 12 | parameters: 13 | is1ESPipeline: ${{ parameters.is1ESPipeline }} 14 | enableMicrobuild: false 15 | enablePublishBuildArtifacts: false 16 | enablePublishTestResults: false 17 | enablePublishBuildAssets: false 18 | enableTelemetry: true 19 | 20 | variables: 21 | - group: Publish-Build-Assets 22 | # The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in 23 | # sync with the packages.config file. 24 | - name: DefaultGuardianVersion 25 | value: 0.109.0 26 | - name: GuardianPackagesConfigFile 27 | value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config 28 | - name: GuardianVersion 29 | value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }} 30 | 31 | jobs: ${{ parameters.jobs }} 32 | 33 | -------------------------------------------------------------------------------- /eng/common/msbuild.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source="${BASH_SOURCE[0]}" 4 | 5 | # resolve $source until the file is no longer a symlink 6 | while [[ -h "$source" ]]; do 7 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" 8 | source="$(readlink "$source")" 9 | # if $source was a relative symlink, we need to resolve it relative to the path where the 10 | # symlink file was located 11 | [[ $source != /* ]] && source="$scriptroot/$source" 12 | done 13 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" 14 | 15 | verbosity='minimal' 16 | warn_as_error=true 17 | node_reuse=true 18 | prepare_machine=false 19 | extra_args='' 20 | 21 | while (($# > 0)); do 22 | lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" 23 | case $lowerI in 24 | --verbosity) 25 | verbosity=$2 26 | shift 2 27 | ;; 28 | --warnaserror) 29 | warn_as_error=$2 30 | shift 2 31 | ;; 32 | --nodereuse) 33 | node_reuse=$2 34 | shift 2 35 | ;; 36 | --ci) 37 | ci=true 38 | shift 1 39 | ;; 40 | --preparemachine) 41 | prepare_machine=true 42 | shift 1 43 | ;; 44 | *) 45 | extra_args="$extra_args $1" 46 | shift 1 47 | ;; 48 | esac 49 | done 50 | 51 | . "$scriptroot/tools.sh" 52 | 53 | if [[ "$ci" == true ]]; then 54 | node_reuse=false 55 | fi 56 | 57 | MSBuild $extra_args 58 | ExitWithExitCode 0 59 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/Utilities/DateTimeUtilities.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | 7 | namespace Roslyn.Utilities 8 | { 9 | internal static class DateTimeUtilities 10 | { 11 | internal const string DateTimeDateDataFieldName = "dateData"; 12 | 13 | // From DateTime.cs. 14 | private const long TicksMask = 0x3FFFFFFFFFFFFFFF; 15 | 16 | internal static DateTime ToDateTime(double raw) 17 | { 18 | // This mechanism for getting the tick count from the underlying ulong field is copied 19 | // from System.DateTime.InternalTicks (ndp\clr\src\BCL\System\DateTime.cs). 20 | var tickCount = BitConverter.DoubleToInt64Bits(raw) & TicksMask; 21 | return new DateTime(tickCount); 22 | } 23 | 24 | internal static DateTime ToDateTime(ulong raw) 25 | { 26 | // This mechanism for getting the tick count from the underlying ulong field is copied 27 | // from System.DateTime.InternalTicks (ndp\clr\src\BCL\System\DateTime.cs). 28 | var tickCount = unchecked((long)raw) & TicksMask; 29 | return new DateTime(tickCount); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /eng/common/README.md: -------------------------------------------------------------------------------- 1 | # Don't touch this folder 2 | 3 | uuuuuuuuuuuuuuuuuuuu 4 | u" uuuuuuuuuuuuuuuuuu "u 5 | u" u$$$$$$$$$$$$$$$$$$$$u "u 6 | u" u$$$$$$$$$$$$$$$$$$$$$$$$u "u 7 | u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u 8 | u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u 9 | u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u 10 | $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ 11 | $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ 12 | $ $$$" ... "$... ...$" ... "$$$ ... "$$$ $ 13 | $ $$$u `"$$$$$$$ $$$ $$$$$ $$ $$$ $$$ $ 14 | $ $$$$$$uu "$$$$ $$$ $$$$$ $$ """ u$$$ $ 15 | $ $$$""$$$ $$$$ $$$u "$$$" u$$ $$$$$$$$ $ 16 | $ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $ 17 | $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ 18 | "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" 19 | "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" 20 | "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" 21 | "u "$$$$$$$$$$$$$$$$$$$$$$$$" u" 22 | "u "$$$$$$$$$$$$$$$$$$$$" u" 23 | "u """""""""""""""""" u" 24 | """""""""""""""""""" 25 | 26 | !!! Changes made in this directory are subject to being overwritten by automation !!! 27 | 28 | The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first. 29 | -------------------------------------------------------------------------------- /eng/common/templates/steps/publish-pipeline-artifacts.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | - name: is1ESPipeline 3 | type: boolean 4 | default: false 5 | 6 | - name: args 7 | type: object 8 | default: {} 9 | 10 | steps: 11 | - ${{ if eq(parameters.is1ESPipeline, true) }}: 12 | - 'eng/common/templates cannot be referenced from a 1ES managed template': error 13 | - task: PublishPipelineArtifact@1 14 | displayName: ${{ coalesce(parameters.args.displayName, 'Publish to Build Artifact') }} 15 | ${{ if parameters.args.condition }}: 16 | condition: ${{ parameters.args.condition }} 17 | ${{ else }}: 18 | condition: succeeded() 19 | ${{ if parameters.args.continueOnError }}: 20 | continueOnError: ${{ parameters.args.continueOnError }} 21 | inputs: 22 | targetPath: ${{ parameters.args.targetPath }} 23 | ${{ if parameters.args.artifactName }}: 24 | artifactName: ${{ parameters.args.artifactName }} 25 | ${{ if parameters.args.publishLocation }}: 26 | publishLocation: ${{ parameters.args.publishLocation }} 27 | ${{ if parameters.args.fileSharePath }}: 28 | fileSharePath: ${{ parameters.args.fileSharePath }} 29 | ${{ if parameters.args.Parallel }}: 30 | parallel: ${{ parameters.args.Parallel }} 31 | ${{ if parameters.args.parallelCount }}: 32 | parallelCount: ${{ parameters.args.parallelCount }} 33 | ${{ if parameters.args.properties }}: 34 | properties: ${{ parameters.args.properties }} -------------------------------------------------------------------------------- /src/PdbTestResources/ResourceLoader.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | using System.IO; 7 | using System.Reflection; 8 | 9 | namespace TestResources 10 | { 11 | internal static class ResourceLoader 12 | { 13 | internal static Stream GetResourceStream(string name) 14 | { 15 | var assembly = typeof(ResourceLoader).GetTypeInfo().Assembly; 16 | 17 | var stream = assembly.GetManifestResourceStream(name); 18 | if (stream == null) 19 | { 20 | throw new InvalidOperationException($"Resource '{name}' not found in {assembly.FullName}."); 21 | } 22 | 23 | return stream; 24 | } 25 | 26 | private static byte[] GetResourceBlob(string name) 27 | { 28 | using var stream = GetResourceStream(name); 29 | var bytes = new byte[stream.Length]; 30 | using (var memoryStream = new MemoryStream(bytes)) 31 | { 32 | stream.CopyTo(memoryStream); 33 | } 34 | 35 | return bytes; 36 | } 37 | 38 | public static byte[] GetOrCreateResource(ref byte[]? resource, string name) 39 | => resource ??= GetResourceBlob(name); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /eng/common/templates/vmr-build-pr.yml: -------------------------------------------------------------------------------- 1 | # This pipeline is used for running the VMR verification of the PR changes in repo-level PRs. 2 | # 3 | # It will run a full set of verification jobs defined in: 4 | # https://github.com/dotnet/dotnet/blob/10060d128e3f470e77265f8490f5e4f72dae738e/eng/pipelines/templates/stages/vmr-build.yml#L27-L38 5 | # 6 | # For repos that do not need to run the full set, you would do the following: 7 | # 8 | # 1. Copy this YML file to a repo-specific location, i.e. outside of eng/common. 9 | # 10 | # 2. Add `verifications` parameter to VMR template reference 11 | # 12 | # Examples: 13 | # - For source-build stage 1 verification, add the following: 14 | # verifications: [ "source-build-stage1" ] 15 | # 16 | # - For Windows only verifications, add the following: 17 | # verifications: [ "unified-build-windows-x64", "unified-build-windows-x86" ] 18 | 19 | trigger: none 20 | pr: none 21 | 22 | variables: 23 | - template: /eng/common/templates/variables/pool-providers.yml@self 24 | 25 | - name: skipComponentGovernanceDetection # we run CG on internal builds only 26 | value: true 27 | 28 | - name: Codeql.Enabled # we run CodeQL on internal builds only 29 | value: false 30 | 31 | resources: 32 | repositories: 33 | - repository: vmr 34 | type: github 35 | name: dotnet/dotnet 36 | endpoint: dotnet 37 | 38 | stages: 39 | - template: /eng/pipelines/templates/stages/vmr-build.yml@vmr 40 | parameters: 41 | isBuiltFromVmr: false 42 | scope: lite 43 | -------------------------------------------------------------------------------- /eng/common/retain-build.ps1: -------------------------------------------------------------------------------- 1 | 2 | Param( 3 | [Parameter(Mandatory=$true)][int] $buildId, 4 | [Parameter(Mandatory=$true)][string] $azdoOrgUri, 5 | [Parameter(Mandatory=$true)][string] $azdoProject, 6 | [Parameter(Mandatory=$true)][string] $token 7 | ) 8 | 9 | $ErrorActionPreference = 'Stop' 10 | Set-StrictMode -Version 2.0 11 | 12 | function Get-AzDOHeaders( 13 | [string] $token) 14 | { 15 | $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":${token}")) 16 | $headers = @{"Authorization"="Basic $base64AuthInfo"} 17 | return $headers 18 | } 19 | 20 | function Update-BuildRetention( 21 | [string] $azdoOrgUri, 22 | [string] $azdoProject, 23 | [int] $buildId, 24 | [string] $token) 25 | { 26 | $headers = Get-AzDOHeaders -token $token 27 | $requestBody = "{ 28 | `"keepForever`": `"true`" 29 | }" 30 | 31 | $requestUri = "${azdoOrgUri}/${azdoProject}/_apis/build/builds/${buildId}?api-version=6.0" 32 | write-Host "Attempting to retain build using the following URI: ${requestUri} ..." 33 | 34 | try { 35 | Invoke-RestMethod -Uri $requestUri -Method Patch -Body $requestBody -Header $headers -contentType "application/json" 36 | Write-Host "Updated retention settings for build ${buildId}." 37 | } 38 | catch { 39 | Write-Error "Failed to update retention settings for build: $_.Exception.Response.StatusDescription" 40 | exit 1 41 | } 42 | } 43 | 44 | Update-BuildRetention -azdoOrgUri $azdoOrgUri -azdoProject $azdoProject -buildId $buildId -token $token 45 | exit 0 46 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/Utilities/StringUtilities.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System.Globalization; 6 | using System.Text; 7 | 8 | namespace Roslyn.Utilities 9 | { 10 | internal static class StringUtilities 11 | { 12 | internal static string EscapeNonPrintableCharacters(string str) 13 | { 14 | StringBuilder sb = new StringBuilder(); 15 | 16 | foreach (char c in str) 17 | { 18 | bool escape; 19 | switch (CharUnicodeInfo.GetUnicodeCategory(c)) 20 | { 21 | case UnicodeCategory.Control: 22 | case UnicodeCategory.OtherNotAssigned: 23 | case UnicodeCategory.ParagraphSeparator: 24 | case UnicodeCategory.Surrogate: 25 | escape = true; 26 | break; 27 | 28 | default: 29 | escape = c >= 0xFFFC; 30 | break; 31 | } 32 | 33 | if (escape) 34 | { 35 | sb.AppendFormat("\\u{0:X4}", (int)c); 36 | } 37 | else 38 | { 39 | sb.Append(c); 40 | } 41 | } 42 | 43 | return sb.ToString(); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /eng/Versions.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 1.1.0 6 | beta2 7 | true 8 | true 9 | true 10 | 11 | 4.1.0-1.21523.2 12 | 4.1.0-1.21523.2 13 | 1.4.0-beta2-21528-01 14 | 17.0.0-beta1.21524.1 15 | 1.7.0-beta-21525-03 16 | 1.0.0-beta3.21151.2 17 | 1.1.0-beta-20527-03 18 | 19 | 5.0.0 20 | 5.0.0 21 | 5.0.0 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Tests/Microsoft.DiaSymReader.Converter.UnitTests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $(NetCurrent);net472 6 | true 7 | 11 | x64;x86 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/Pdb2Pdb/Pdb2Pdb.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | net472 6 | Microsoft.DiaSymReader.Tools 7 | Exe 8 | true 9 | true 10 | AnyCPU 11 | 12 | 13 | true 14 | Microsoft.DiaSymReader.Pdb2Pdb 15 | Pdb2Pdb.nuspec 16 | $(OutputPath) 17 | true 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /eng/common/sdl/run-sdl.ps1: -------------------------------------------------------------------------------- 1 | Param( 2 | [string] $GuardianCliLocation, 3 | [string] $WorkingDirectory, 4 | [string] $GdnFolder, 5 | [string] $UpdateBaseline, 6 | [string] $GuardianLoggerLevel='Standard' 7 | ) 8 | 9 | $ErrorActionPreference = 'Stop' 10 | Set-StrictMode -Version 2.0 11 | $disableConfigureToolsetImport = $true 12 | $global:LASTEXITCODE = 0 13 | 14 | try { 15 | # `tools.ps1` checks $ci to perform some actions. Since the SDL 16 | # scripts don't necessarily execute in the same agent that run the 17 | # build.ps1/sh script this variable isn't automatically set. 18 | $ci = $true 19 | . $PSScriptRoot\..\tools.ps1 20 | 21 | # We store config files in the r directory of .gdn 22 | $gdnConfigPath = Join-Path $GdnFolder 'r' 23 | $ValidPath = Test-Path $GuardianCliLocation 24 | 25 | if ($ValidPath -eq $False) 26 | { 27 | Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location." 28 | ExitWithExitCode 1 29 | } 30 | 31 | $gdnConfigFiles = Get-ChildItem $gdnConfigPath -Recurse -Include '*.gdnconfig' 32 | Write-Host "Discovered Guardian config files:" 33 | $gdnConfigFiles | Out-String | Write-Host 34 | 35 | Exec-BlockVerbosely { 36 | & $GuardianCliLocation run ` 37 | --working-directory $WorkingDirectory ` 38 | --baseline mainbaseline ` 39 | --update-baseline $UpdateBaseline ` 40 | --logger-level $GuardianLoggerLevel ` 41 | --config @gdnConfigFiles 42 | Exit-IfNZEC "Sdl" 43 | } 44 | } 45 | catch { 46 | Write-Host $_.ScriptStackTrace 47 | Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ 48 | ExitWithExitCode 1 49 | } 50 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to: 3 | # automatically normalize line endings on check-in, and 4 | # convert to Windows-style line endings on check-out 5 | ############################################################################### 6 | * text=auto encoding=UTF-8 7 | *.sh text eol=lf 8 | 9 | ############################################################################### 10 | # Set file behavior to: 11 | # treat as text, and 12 | # diff as C# source code 13 | ############################################################################### 14 | *.cs text diff=csharp 15 | 16 | ############################################################################### 17 | # Set file behavior to: 18 | # treat as text 19 | ############################################################################### 20 | *.cmd text 21 | *.config text 22 | *.csproj text 23 | *.groovy text 24 | *.json text 25 | *.md text 26 | *.nuspec text 27 | *.pkgdef text 28 | *.proj text 29 | *.projitems text 30 | *.props text 31 | *.ps1 text 32 | *.resx text 33 | *.ruleset text 34 | *.shproj text 35 | *.sln text 36 | *.targets text 37 | *.vb text 38 | *.vbproj text 39 | *.vcxproj text 40 | *.vcxproj.filters text 41 | *.vsct text 42 | *.vsixmanifest text 43 | 44 | ############################################################################### 45 | # Set file behavior to: 46 | # treat as binary 47 | ############################################################################### 48 | *.png binary 49 | *.snk binary 50 | -------------------------------------------------------------------------------- /eng/common/internal/Tools.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | net472 6 | false 7 | false 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/Imports.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | #line 1 "C:\Imports.cs" 5 | #pragma checksum "C:\Imports.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DBEB2A067B2F0E0D678A002C587A2806056C3DCE" 6 | 7 | namespace Y 8 | { 9 | extern alias ExternAlias1; 10 | using System; 11 | using ExternAlias1::System.Linq; 12 | using AliasedNamespace1 = System; 13 | using AliasedNamespace2 = ExternAlias1::System.IO; 14 | using static System.Math; 15 | using static ExternAlias1::System.Linq.Queryable; 16 | using AliasedType1 = System.Char; 17 | using AliasedType2 = ExternAlias1::System.Linq.ParallelEnumerable; 18 | using AliasedType3 = X.A.B; 19 | using AliasedType4 = System.Action< 20 | System.Action, 21 | System.Action>; 22 | using AliasedType5 = System.TypedReference; 23 | using AliasedType6 = System.Action; 24 | 25 | namespace X 26 | { 27 | using AliasedType7 = C.D; 28 | using AliasedType8 = System.Collections.Generic.Dictionary.KeyCollection; 29 | 30 | public class A 31 | { 32 | void F() { } 33 | 34 | public struct B 35 | { 36 | } 37 | } 38 | } 39 | } 40 | 41 | public class C 42 | { 43 | void G() { } 44 | 45 | public class D { } 46 | } 47 | -------------------------------------------------------------------------------- /eng/common/core-templates/steps/get-federated-access-token.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | - name: federatedServiceConnection 3 | type: string 4 | - name: outputVariableName 5 | type: string 6 | - name: is1ESPipeline 7 | type: boolean 8 | - name: stepName 9 | type: string 10 | default: 'getFederatedAccessToken' 11 | - name: condition 12 | type: string 13 | default: '' 14 | # Resource to get a token for. Common values include: 15 | # - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps 16 | # - 'https://storage.azure.com/' for storage 17 | # Defaults to Azure DevOps 18 | - name: resource 19 | type: string 20 | default: '499b84ac-1321-427f-aa17-267ca6975798' 21 | - name: isStepOutputVariable 22 | type: boolean 23 | default: false 24 | 25 | steps: 26 | - task: AzureCLI@2 27 | displayName: 'Getting federated access token for feeds' 28 | name: ${{ parameters.stepName }} 29 | ${{ if ne(parameters.condition, '') }}: 30 | condition: ${{ parameters.condition }} 31 | inputs: 32 | azureSubscription: ${{ parameters.federatedServiceConnection }} 33 | scriptType: 'pscore' 34 | scriptLocation: 'inlineScript' 35 | inlineScript: | 36 | $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv 37 | if ($LASTEXITCODE -ne 0) { 38 | Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" 39 | exit 1 40 | } 41 | Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" 42 | Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken" -------------------------------------------------------------------------------- /eng/common/generate-sbom-prep.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source="${BASH_SOURCE[0]}" 4 | 5 | # resolve $SOURCE until the file is no longer a symlink 6 | while [[ -h $source ]]; do 7 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" 8 | source="$(readlink "$source")" 9 | 10 | # if $source was a relative symlink, we need to resolve it relative to the path where the 11 | # symlink file was located 12 | [[ $source != /* ]] && source="$scriptroot/$source" 13 | done 14 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" 15 | . $scriptroot/pipeline-logging-functions.sh 16 | 17 | 18 | # replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts. 19 | artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM" 20 | safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}" 21 | manifest_dir=$1 22 | 23 | # Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly 24 | # with their own overwriting ours. So we create it as a sub directory of the requested manifest path. 25 | sbom_generation_dir="$manifest_dir/$safe_artifact_name" 26 | 27 | if [ ! -d "$sbom_generation_dir" ] ; then 28 | mkdir -p "$sbom_generation_dir" 29 | echo "Sbom directory created." $sbom_generation_dir 30 | else 31 | Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." 32 | fi 33 | 34 | echo "Artifact name before : "$artifact_name 35 | echo "Artifact name after : "$safe_artifact_name 36 | export ARTIFACT_NAME=$safe_artifact_name 37 | echo "##vso[task.setvariable variable=ARTIFACT_NAME]$safe_artifact_name" 38 | 39 | exit 0 40 | -------------------------------------------------------------------------------- /azure-pipelines-pr.yml: -------------------------------------------------------------------------------- 1 | # Branches that trigger builds on PR 2 | pr: 3 | branches: 4 | include: 5 | - main 6 | - release/* 7 | paths: 8 | exclude: 9 | - README.md 10 | - docs/* 11 | 12 | trigger: 13 | branches: 14 | include: 15 | - main 16 | - release/* 17 | 18 | variables: 19 | - template: /eng/common/templates/variables/pool-providers.yml 20 | - name: _PublishUsingPipelines 21 | value: true 22 | 23 | stages: 24 | - stage: build 25 | displayName: Build 26 | jobs: 27 | - template: /eng/common/templates/jobs/jobs.yml 28 | parameters: 29 | enableMicrobuild: true 30 | enablePublishBuildArtifacts: true 31 | enablePublishTestResults: true 32 | enablePublishBuildAssets: true 33 | enablePublishUsingPipelines: $(_PublishUsingPipelines) 34 | enableTelemetry: true 35 | helixRepo: dotnet/symreader 36 | jobs: 37 | - job: Windows 38 | pool: 39 | vmImage: 'windows-latest' 40 | strategy: 41 | matrix: 42 | Debug: 43 | _BuildConfig: Debug 44 | _SignType: test 45 | _DotNetPublishToBlobFeed: false 46 | _BuildArgs: '' 47 | Release: 48 | # PRs or external builds are not signed. 49 | _BuildConfig: Release 50 | _SignType: test 51 | _DotNetPublishToBlobFeed: false 52 | _BuildArgs: '' 53 | steps: 54 | - checkout: self 55 | clean: true 56 | 57 | - script: eng\common\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_BuildArgs) 58 | displayName: Build and Test 59 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Tests/SymReaderHelpersTest.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System.IO; 6 | using System.Reflection.PortableExecutable; 7 | using Xunit; 8 | 9 | namespace Microsoft.DiaSymReader.Tools.UnitTests 10 | { 11 | public class SymReaderHelpersTest 12 | { 13 | [Fact] 14 | public void TryReadPdbId_CrossGen_Portable() 15 | { 16 | using (var peStream = TestResources.CrossGen.PortableDll) 17 | { 18 | using (var peReader = new PEReader(peStream, PEStreamOptions.LeaveOpen)) 19 | { 20 | Assert.True(SymReaderHelpers.TryReadPdbId(peReader, out var pePdbId, out int peAge)); 21 | Assert.True(pePdbId.Guid == TestResources.CrossGen.PortableDllDebugDirectoryEntryGuid); 22 | Assert.True(peAge == 1); 23 | } 24 | } 25 | } 26 | 27 | [Fact] 28 | public void TryReadPdbId_CrossGen_Windows() 29 | { 30 | using (var peStream = TestResources.CrossGen.WindowsDll) 31 | { 32 | using (var peReader = new PEReader(peStream, PEStreamOptions.LeaveOpen)) 33 | { 34 | Assert.True(SymReaderHelpers.TryReadPdbId(peReader, out var pePdbId, out int peAge)); 35 | Assert.True(pePdbId.Guid == TestResources.CrossGen.WindowsDllDebugDirectoryEntryGuid); 36 | Assert.True(peAge == 1); 37 | } 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /eng/common/core-templates/job/source-index-stage1.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | runAsPublic: false 3 | sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" 4 | preSteps: [] 5 | binlogPath: artifacts/log/Debug/Build.binlog 6 | condition: '' 7 | dependsOn: '' 8 | pool: '' 9 | is1ESPipeline: '' 10 | 11 | jobs: 12 | - job: SourceIndexStage1 13 | dependsOn: ${{ parameters.dependsOn }} 14 | condition: ${{ parameters.condition }} 15 | variables: 16 | - name: BinlogPath 17 | value: ${{ parameters.binlogPath }} 18 | - template: /eng/common/core-templates/variables/pool-providers.yml 19 | parameters: 20 | is1ESPipeline: ${{ parameters.is1ESPipeline }} 21 | 22 | ${{ if ne(parameters.pool, '') }}: 23 | pool: ${{ parameters.pool }} 24 | ${{ if eq(parameters.pool, '') }}: 25 | pool: 26 | ${{ if eq(variables['System.TeamProject'], 'public') }}: 27 | name: $(DncEngPublicBuildPool) 28 | image: windows.vs2022.amd64.open 29 | ${{ if eq(variables['System.TeamProject'], 'internal') }}: 30 | name: $(DncEngInternalBuildPool) 31 | image: windows.vs2022.amd64 32 | 33 | steps: 34 | - ${{ if eq(parameters.is1ESPipeline, '') }}: 35 | - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error 36 | 37 | - ${{ each preStep in parameters.preSteps }}: 38 | - ${{ preStep }} 39 | - script: ${{ parameters.sourceIndexBuildCommand }} 40 | displayName: Build Repository 41 | 42 | - template: /eng/common/core-templates/steps/source-index-stage1-publish.yml 43 | parameters: 44 | binLogPath: ${{ parameters.binLogPath }} -------------------------------------------------------------------------------- /eng/common/core-templates/steps/get-delegation-sas.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | - name: federatedServiceConnection 3 | type: string 4 | - name: outputVariableName 5 | type: string 6 | - name: expiryInHours 7 | type: number 8 | default: 1 9 | - name: base64Encode 10 | type: boolean 11 | default: false 12 | - name: storageAccount 13 | type: string 14 | - name: container 15 | type: string 16 | - name: permissions 17 | type: string 18 | default: 'rl' 19 | - name: is1ESPipeline 20 | type: boolean 21 | default: false 22 | 23 | steps: 24 | - task: AzureCLI@2 25 | displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}' 26 | inputs: 27 | azureSubscription: ${{ parameters.federatedServiceConnection }} 28 | scriptType: 'pscore' 29 | scriptLocation: 'inlineScript' 30 | inlineScript: | 31 | # Calculate the expiration of the SAS token and convert to UTC 32 | $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") 33 | 34 | $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv 35 | 36 | if ($LASTEXITCODE -ne 0) { 37 | Write-Error "Failed to generate SAS token." 38 | exit 1 39 | } 40 | 41 | if ('${{ parameters.base64Encode }}' -eq 'true') { 42 | $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas)) 43 | } 44 | 45 | Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" 46 | Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas" 47 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter/PortablePdb/AsyncMethodData.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System.Collections.Immutable; 6 | using System.Diagnostics; 7 | using System.Reflection.Metadata; 8 | 9 | namespace Microsoft.DiaSymReader 10 | { 11 | // TODO: Copied from PortablePdb. Share. 12 | 13 | internal sealed class AsyncMethodData 14 | { 15 | public static readonly AsyncMethodData None = new AsyncMethodData(); 16 | 17 | public readonly MethodDefinitionHandle KickoffMethod; 18 | public readonly int CatchHandlerOffset; 19 | public readonly ImmutableArray YieldOffsets; 20 | public readonly ImmutableArray ResumeOffsets; 21 | public readonly ImmutableArray ResumeMethods; 22 | 23 | private AsyncMethodData() 24 | { 25 | } 26 | 27 | public AsyncMethodData( 28 | MethodDefinitionHandle kickoffMethod, 29 | int catchHandlerOffset, 30 | ImmutableArray yieldOffsets, 31 | ImmutableArray resumeOffsets, 32 | ImmutableArray resumeMethods) 33 | { 34 | Debug.Assert(!kickoffMethod.IsNil); 35 | Debug.Assert(catchHandlerOffset >= -1); 36 | 37 | Debug.Assert(yieldOffsets.Length == resumeOffsets.Length); 38 | Debug.Assert(yieldOffsets.Length == resumeMethods.Length); 39 | 40 | KickoffMethod = kickoffMethod; 41 | CatchHandlerOffset = catchHandlerOffset; 42 | YieldOffsets = yieldOffsets; 43 | ResumeOffsets = resumeOffsets; 44 | ResumeMethods = resumeMethods; 45 | } 46 | 47 | public bool IsNone => ReferenceEquals(this, None); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter.Xml/PdbToXmlOptions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | 7 | namespace Microsoft.DiaSymReader.Tools 8 | { 9 | [Flags] 10 | public enum PdbToXmlOptions 11 | { 12 | Default = 0, 13 | ThrowOnError = 1 << 1, 14 | ResolveTokens = 1 << 2, 15 | IncludeTokens = 1 << 3, 16 | IncludeMethodSpans = 1 << 4, 17 | ExcludeDocuments = 1 << 5, 18 | ExcludeMethods = 1 << 6, 19 | ExcludeSequencePoints = 1 << 7, 20 | ExcludeScopes = 1 << 8, 21 | ExcludeNamespaces = 1 << 9, 22 | ExcludeAsyncInfo = 1 << 10, 23 | ExcludeCustomDebugInformation = 1 << 11, 24 | IncludeSourceServerInformation = 1 << 12, 25 | IncludeEmbeddedSources = 1 << 13, 26 | 27 | /// 28 | /// Use DIA for reading Portable PDBs. 29 | /// Note that not all information is available via DIA APIs. 30 | /// 31 | UseNativeReader = 1 << 14, 32 | 33 | IncludeModuleDebugInfo = 1 << 15, 34 | 35 | /// 36 | /// Use alternate directory for loading Microsoft.DiaSymReader.Native.*.dll library. 37 | /// 38 | /// 39 | /// See . 40 | /// 41 | SymReaderLoadPolicyUseAlternateDirectory = 1 << 29, 42 | 43 | /// 44 | /// Do not use COM registry to locate an implementation of the reader. 45 | /// 46 | /// 47 | /// See . 48 | /// 49 | SymReaderLoadPolicyIgnoreComRegistry = 1 << 30, 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /eng/common/loc/P22DotNetHtmlLocalization.lss: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /eng/DiaSymReaderNative.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | AnyCPU 15 | 16 | 17 | 22 | 23 | 24 | PreserveNewest 25 | false 26 | false 27 | 28 | 29 | PreserveNewest 30 | false 31 | false 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /eng/common/core-templates/jobs/source-build.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | # This template adds arcade-powered source-build to CI. A job is created for each platform, as 3 | # well as an optional server job that completes when all platform jobs complete. 4 | 5 | # See /eng/common/core-templates/job/source-build.yml 6 | jobNamePrefix: 'Source_Build' 7 | 8 | # This is the default platform provided by Arcade, intended for use by a managed-only repo. 9 | defaultManagedPlatform: 10 | name: 'Managed' 11 | container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-10-amd64' 12 | 13 | # Defines the platforms on which to run build jobs. One job is created for each platform, and the 14 | # object in this array is sent to the job template as 'platform'. If no platforms are specified, 15 | # one job runs on 'defaultManagedPlatform'. 16 | platforms: [] 17 | 18 | is1ESPipeline: '' 19 | 20 | # If set to true and running on a non-public project, 21 | # Internal nuget and blob storage locations will be enabled. 22 | # This is not enabled by default because many repositories do not need internal sources 23 | # and do not need to have the required service connections approved in the pipeline. 24 | enableInternalSources: false 25 | 26 | jobs: 27 | 28 | - ${{ each platform in parameters.platforms }}: 29 | - template: /eng/common/core-templates/job/source-build.yml 30 | parameters: 31 | is1ESPipeline: ${{ parameters.is1ESPipeline }} 32 | jobNamePrefix: ${{ parameters.jobNamePrefix }} 33 | platform: ${{ platform }} 34 | enableInternalSources: ${{ parameters.enableInternalSources }} 35 | 36 | - ${{ if eq(length(parameters.platforms), 0) }}: 37 | - template: /eng/common/core-templates/job/source-build.yml 38 | parameters: 39 | is1ESPipeline: ${{ parameters.is1ESPipeline }} 40 | jobNamePrefix: ${{ parameters.jobNamePrefix }} 41 | platform: ${{ parameters.defaultManagedPlatform }} 42 | enableInternalSources: ${{ parameters.enableInternalSources }} 43 | -------------------------------------------------------------------------------- /eng/common/darc-init.ps1: -------------------------------------------------------------------------------- 1 | param ( 2 | $darcVersion = $null, 3 | $versionEndpoint = 'https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20', 4 | $verbosity = 'minimal', 5 | $toolpath = $null 6 | ) 7 | 8 | . $PSScriptRoot\tools.ps1 9 | 10 | function InstallDarcCli ($darcVersion, $toolpath) { 11 | $darcCliPackageName = 'microsoft.dotnet.darc' 12 | 13 | $dotnetRoot = InitializeDotNetCli -install:$true 14 | $dotnet = "$dotnetRoot\dotnet.exe" 15 | $toolList = & "$dotnet" tool list -g 16 | 17 | if ($toolList -like "*$darcCliPackageName*") { 18 | & "$dotnet" tool uninstall $darcCliPackageName -g 19 | } 20 | 21 | # If the user didn't explicitly specify the darc version, 22 | # query the Maestro API for the correct version of darc to install. 23 | if (-not $darcVersion) { 24 | $darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content 25 | } 26 | 27 | $arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' 28 | 29 | Write-Host "Installing Darc CLI version $darcVersion..." 30 | Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' 31 | if (-not $toolpath) { 32 | Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g" 33 | & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g 34 | }else { 35 | Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity --tool-path '$toolpath'" 36 | & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath" 37 | } 38 | } 39 | 40 | try { 41 | InstallDarcCli $darcVersion $toolpath 42 | } 43 | catch { 44 | Write-Host $_.ScriptStackTrace 45 | Write-PipelineTelemetryError -Category 'Darc' -Message $_ 46 | ExitWithExitCode 1 47 | } -------------------------------------------------------------------------------- /azure-pipelines-microbuild.yml: -------------------------------------------------------------------------------- 1 | resources: 2 | - repo: self 3 | clean: true 4 | queue: 5 | name: VSEng-MicroBuildVS2017 6 | demands: Cmd 7 | variables: 8 | BuildConfiguration: Release 9 | TeamName: Roslyn 10 | 11 | steps: 12 | - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1 13 | displayName: Install Signing Plugin 14 | inputs: 15 | signType: $(SignType) 16 | esrpSigning: true 17 | condition: and(succeeded(), ne(variables['SignType'], '')) 18 | 19 | - script: eng\common\CIBuild.cmd 20 | -configuration $(BuildConfiguration) 21 | /p:OfficialBuildId=$(BUILD.BUILDNUMBER) 22 | /p:DotNetSignType=$(SignType) 23 | /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) 24 | /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) 25 | displayName: Build 26 | 27 | - task: NuGetPublisher@0 28 | displayName: Publish NuGet Packages to MyGet 29 | inputs: 30 | searchPattern: 'artifacts\packages\$(BuildConfiguration)\Shipping\*.nupkg' 31 | connectedServiceName: 'SymReaderConverter NuGet feed' 32 | nuGetVersion: 4.0.0.2283 33 | condition: succeeded() 34 | 35 | - task: PublishBuildArtifacts@1 36 | displayName: Publish Logs 37 | inputs: 38 | PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)' 39 | ArtifactName: 'Logs' 40 | continueOnError: true 41 | condition: not(succeeded()) 42 | 43 | - task: PublishTestResults@1 44 | displayName: Publish Test Results 45 | inputs: 46 | testRunner: XUnit 47 | testResultsFiles: 'artifacts/TestResults/$(BuildConfiguration)/*.xml' 48 | mergeTestResults: true 49 | testRunTitle: 'Unit Tests' 50 | condition: always() 51 | 52 | # Archive NuGet packages to DevOps. 53 | - task: PublishBuildArtifacts@1 54 | displayName: Publish Artifact Packages 55 | inputs: 56 | PathtoPublish: 'artifacts\packages\$(BuildConfiguration)' 57 | ArtifactName: 'Packages' 58 | condition: succeeded() 59 | 60 | - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 61 | displayName: Cleanup 62 | condition: always() 63 | -------------------------------------------------------------------------------- /eng/common/core-templates/steps/source-index-stage1-publish.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | sourceIndexUploadPackageVersion: 2.0.0-20250906.1 3 | sourceIndexProcessBinlogPackageVersion: 1.0.1-20250906.1 4 | sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json 5 | binlogPath: artifacts/log/Debug/Build.binlog 6 | 7 | steps: 8 | - task: UseDotNet@2 9 | displayName: "Source Index: Use .NET 9 SDK" 10 | inputs: 11 | packageType: sdk 12 | version: 9.0.x 13 | installationPath: $(Agent.TempDirectory)/dotnet 14 | workingDirectory: $(Agent.TempDirectory) 15 | 16 | - script: | 17 | $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools 18 | $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools 19 | displayName: "Source Index: Download netsourceindex Tools" 20 | # Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk. 21 | workingDirectory: $(Agent.TempDirectory) 22 | 23 | - script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i ${{parameters.BinlogPath}} -r $(System.DefaultWorkingDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output 24 | displayName: "Source Index: Process Binlog into indexable sln" 25 | 26 | - ${{ if and(ne(parameters.runAsPublic, 'true'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: 27 | - task: AzureCLI@2 28 | displayName: "Source Index: Upload Source Index stage1 artifacts to Azure" 29 | inputs: 30 | azureSubscription: 'SourceDotNet Stage1 Publish' 31 | addSpnToEnvironment: true 32 | scriptType: 'ps' 33 | scriptLocation: 'inlineScript' 34 | inlineScript: | 35 | $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1 36 | -------------------------------------------------------------------------------- /eng/common/native/init-os-and-arch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Use uname to determine what the OS is. 4 | OSName=$(uname -s | tr '[:upper:]' '[:lower:]') 5 | 6 | if command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then 7 | OSName="android" 8 | fi 9 | 10 | case "$OSName" in 11 | freebsd|linux|netbsd|openbsd|sunos|android|haiku) 12 | os="$OSName" ;; 13 | darwin) 14 | os=osx ;; 15 | *) 16 | echo "Unsupported OS $OSName detected!" 17 | exit 1 ;; 18 | esac 19 | 20 | # On Solaris, `uname -m` is discouraged, see https://docs.oracle.com/cd/E36784_01/html/E36870/uname-1.html 21 | # and `uname -p` returns processor type (e.g. i386 on amd64). 22 | # The appropriate tool to determine CPU is isainfo(1) https://docs.oracle.com/cd/E36784_01/html/E36870/isainfo-1.html. 23 | if [ "$os" = "sunos" ]; then 24 | if uname -o 2>&1 | grep -q illumos; then 25 | os="illumos" 26 | else 27 | os="solaris" 28 | fi 29 | CPUName=$(isainfo -n) 30 | else 31 | # For the rest of the operating systems, use uname(1) to determine what the CPU is. 32 | CPUName=$(uname -m) 33 | fi 34 | 35 | case "$CPUName" in 36 | arm64|aarch64) 37 | arch=arm64 38 | if [ "$(getconf LONG_BIT)" -lt 64 ]; then 39 | # This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS) 40 | arch=arm 41 | fi 42 | ;; 43 | 44 | loongarch64) 45 | arch=loongarch64 46 | ;; 47 | 48 | riscv64) 49 | arch=riscv64 50 | ;; 51 | 52 | amd64|x86_64) 53 | arch=x64 54 | ;; 55 | 56 | armv7l|armv8l) 57 | # shellcheck disable=SC1091 58 | if (NAME=""; . /etc/os-release; test "$NAME" = "Tizen"); then 59 | arch=armel 60 | else 61 | arch=arm 62 | fi 63 | ;; 64 | 65 | armv6l) 66 | arch=armv6 67 | ;; 68 | 69 | i[3-6]86) 70 | echo "Unsupported CPU $CPUName detected, build might not succeed!" 71 | arch=x86 72 | ;; 73 | 74 | s390x) 75 | arch=s390x 76 | ;; 77 | 78 | ppc64le) 79 | arch=ppc64le 80 | ;; 81 | *) 82 | echo "Unknown CPU $CPUName detected!" 83 | exit 1 84 | ;; 85 | esac 86 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter/Diagnostics/PdbDiagnostic.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | using System.Globalization; 7 | using Microsoft.CodeAnalysis.Collections; 8 | using Roslyn.Utilities; 9 | 10 | namespace Microsoft.DiaSymReader.Tools 11 | { 12 | public readonly struct PdbDiagnostic : IEquatable 13 | { 14 | public PdbDiagnosticId Id { get; } 15 | public int Token { get; } 16 | public object[] Args { get; } 17 | 18 | internal PdbDiagnostic(PdbDiagnosticId id, int token, object[] args) 19 | { 20 | Id = id; 21 | Token = token; 22 | Args = args; 23 | } 24 | 25 | public override bool Equals(object? obj) => 26 | obj is PdbDiagnostic other && Equals(other); 27 | 28 | public bool Equals(PdbDiagnostic other) => 29 | Id == other.Id && 30 | Token == other.Token && 31 | SequenceComparer.Instance.Equals(Args, other.Args); 32 | 33 | public override int GetHashCode() => 34 | Hash.Combine((int)Id, Hash.Combine(Token, Hash.CombineValues(Args))); 35 | 36 | public override string ToString() => 37 | ToString(CultureInfo.CurrentCulture); 38 | 39 | public string ToString(IFormatProvider formatProvider) 40 | { 41 | string location = (Token != 0) ? ": " + string.Format(formatProvider, ConverterResources.DiagnosticLocation, Token) : ""; 42 | return $"PDB{(int)Id:D4}{location}: {GetMessage(formatProvider)}"; 43 | } 44 | 45 | public string? GetMessage(IFormatProvider formatProvider) 46 | { 47 | if (formatProvider == null) 48 | { 49 | throw new ArgumentNullException(nameof(formatProvider)); 50 | } 51 | 52 | var template = Id.GetMessageTemplate(); 53 | if (template == null) 54 | { 55 | return null; 56 | } 57 | 58 | return (Args?.Length > 0) ? string.Format(formatProvider, template, Args) : template; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter/Utilities/StringUtilities.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | 9 | namespace Microsoft.DiaSymReader.Tools 10 | { 11 | internal static class StringUtilities 12 | { 13 | public static int GetLongestCommonSuffixLength(string left, string right) 14 | { 15 | int n = Math.Min(left.Length, right.Length); 16 | 17 | for (int i = 0; i < n - 1; i++) 18 | { 19 | if (left[left.Length - i - 1] != right[right.Length - i - 1]) 20 | { 21 | return i; 22 | } 23 | } 24 | 25 | return n; 26 | } 27 | 28 | public static string GetLongestCommonPrefix(IEnumerable strings) 29 | { 30 | int prefixLength = 0; 31 | string? firstString = null; 32 | foreach (var str in strings) 33 | { 34 | if (firstString == null) 35 | { 36 | firstString = str; 37 | prefixLength = str.Length; 38 | } 39 | else 40 | { 41 | int i = IndexOfFirstDifference(str, firstString, prefixLength); 42 | if (i == 0) 43 | { 44 | return string.Empty; 45 | } 46 | 47 | if (i > 0) 48 | { 49 | prefixLength = i; 50 | } 51 | } 52 | } 53 | 54 | return firstString?.Substring(0, prefixLength) ?? string.Empty; 55 | } 56 | 57 | public static int IndexOfFirstDifference(string left, string right, int length) 58 | { 59 | for (int i = 0, n = Math.Min(left.Length, length); i < n; i++) 60 | { 61 | if (left[i] != right[i]) 62 | { 63 | return i; 64 | } 65 | } 66 | 67 | return -1; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /eng/common/native/install-dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # This is a simple script primarily used for CI to install necessary dependencies 6 | # 7 | # Usage: 8 | # 9 | # ./install-dependencies.sh 10 | 11 | os="$(echo "$1" | tr "[:upper:]" "[:lower:]")" 12 | 13 | if [ -z "$os" ]; then 14 | . "$(dirname "$0")"/init-os-and-arch.sh 15 | fi 16 | 17 | case "$os" in 18 | linux) 19 | if [ -e /etc/os-release ]; then 20 | . /etc/os-release 21 | fi 22 | 23 | if [ "$ID" = "debian" ] || [ "$ID_LIKE" = "debian" ]; then 24 | apt update 25 | 26 | apt install -y build-essential gettext locales cmake llvm clang lld lldb liblldb-dev libunwind8-dev libicu-dev liblttng-ust-dev \ 27 | libssl-dev libkrb5-dev pigz cpio 28 | 29 | localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 30 | elif [ "$ID" = "fedora" ] || [ "$ID" = "rhel" ] || [ "$ID" = "azurelinux" ]; then 31 | pkg_mgr="$(command -v tdnf 2>/dev/null || command -v dnf)" 32 | $pkg_mgr install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio 33 | elif [ "$ID" = "amzn" ]; then 34 | dnf install -y cmake llvm lld lldb clang python libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio 35 | elif [ "$ID" = "alpine" ]; then 36 | apk add build-base cmake bash curl clang llvm-dev lld lldb krb5-dev lttng-ust-dev icu-dev openssl-dev pigz cpio 37 | else 38 | echo "Unsupported distro. distro: $ID" 39 | exit 1 40 | fi 41 | ;; 42 | 43 | osx|maccatalyst|ios|iossimulator|tvos|tvossimulator) 44 | echo "Installed xcode version: $(xcode-select -p)" 45 | 46 | export HOMEBREW_NO_INSTALL_CLEANUP=1 47 | export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 48 | # Skip brew update for now, see https://github.com/actions/setup-python/issues/577 49 | # brew update --preinstall 50 | brew bundle --no-upgrade --file=- < _temps = new List(); 15 | public static readonly string Root; 16 | 17 | static TempRoot() 18 | { 19 | Root = Path.Combine(Path.GetTempPath(), "RoslynTests"); 20 | Directory.CreateDirectory(Root); 21 | } 22 | 23 | public void Dispose() 24 | { 25 | if (_temps != null) 26 | { 27 | DisposeAll(_temps); 28 | _temps.Clear(); 29 | } 30 | } 31 | 32 | private static void DisposeAll(IEnumerable temps) 33 | { 34 | foreach (var temp in temps) 35 | { 36 | try 37 | { 38 | temp?.Dispose(); 39 | } 40 | catch 41 | { 42 | // ignore 43 | } 44 | } 45 | } 46 | 47 | public TempDirectory CreateDirectory() 48 | { 49 | var dir = new DisposableDirectory(this); 50 | _temps.Add(dir); 51 | return dir; 52 | } 53 | 54 | public TempFile CreateFile(string? prefix = null, string? extension = null, string? directory = null, [CallerFilePath]string? callerSourcePath = null, [CallerLineNumber]int callerLineNumber = 0) 55 | { 56 | return AddFile(new DisposableFile(prefix, extension, directory, callerSourcePath, callerLineNumber)); 57 | } 58 | 59 | public DisposableFile AddFile(DisposableFile file) 60 | { 61 | _temps.Add(file); 62 | return file; 63 | } 64 | 65 | internal static void CreateStream(string fullPath) 66 | { 67 | using var _ = new FileStream(fullPath, FileMode.CreateNew); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/VB.vb: -------------------------------------------------------------------------------- 1 | #ExternalSource ("C:\VB.vb", 1) 2 | #Disable Warning BC42099 ' unused constants 3 | 4 | Imports System 5 | Imports System.Collections.Generic 6 | Imports 7 | Imports 8 | Imports AliasE = N2.D.E 9 | 10 | Namespace N1 11 | Class C 12 | Iterator Function Foo() As IEnumerable(Of Integer) 13 | Dim arr(1) As Integer 14 | arr(0) = 42 15 | 16 | For Each x As Integer In arr 17 | Yield x 18 | Yield x 19 | Next 20 | 21 | For Each x As Integer In {1, 2, 3} 22 | Yield x 23 | Yield x 24 | Next 25 | 26 | End Function 27 | End Class 28 | End Namespace 29 | 30 | Namespace N2 31 | Class D 32 | Class E 33 | Sub M() 34 | Const D1 As Decimal = Nothing 35 | Const D2 As Decimal = 1.23 36 | Const DT As DateTime = #1-1-2015# 37 | End Sub 38 | End Class 39 | End Class 40 | End Namespace 41 | 42 | Class F 43 | Sub Tuples() 44 | For Each x As Integer In {1, 2, 3} 45 | Dim a As (x As Integer, String, z As Integer) = Nothing 46 | Next 47 | 48 | For Each x As Integer In {1, 2, 3} 49 | Dim a As (u As Integer, String) = Nothing 50 | Next 51 | End Sub 52 | End Class 53 | 54 | #End ExternalSource 55 | 56 | Class NoSequencePoints 57 | Sub M() 58 | Console.WriteLine() 59 | End Sub 60 | End Class 61 | 62 | #ExternalSource ("C:\VB.vb", 62) 63 | 64 | Namespace N3 65 | Class G 66 | Iterator Function It1() As IEnumerable(Of Integer) 67 | Dim var As Integer = 1 68 | Yield 1 69 | Console.WriteLine(var) 70 | End Function 71 | 72 | Iterator Function It2() As IEnumerable(Of Integer) 73 | Dim var1 As Integer = 1 74 | Dim var2 As Integer = 1 75 | Dim var3 As Integer = 1 76 | Dim var4 As Integer = 1 77 | Yield 1 78 | Console.WriteLine(var1) 79 | Console.WriteLine(var2) 80 | Console.WriteLine(var3) 81 | Console.WriteLine(var3) 82 | End Function 83 | End Class 84 | End Namespace 85 | 86 | #End ExternalSource 87 | 88 | 89 | -------------------------------------------------------------------------------- /eng/common/post-build/check-channel-consistency.ps1: -------------------------------------------------------------------------------- 1 | param( 2 | [Parameter(Mandatory=$true)][string] $PromoteToChannels, # List of channels that the build should be promoted to 3 | [Parameter(Mandatory=$true)][array] $AvailableChannelIds # List of channel IDs available in the YAML implementation 4 | ) 5 | 6 | try { 7 | $ErrorActionPreference = 'Stop' 8 | Set-StrictMode -Version 2.0 9 | 10 | # `tools.ps1` checks $ci to perform some actions. Since the post-build 11 | # scripts don't necessarily execute in the same agent that run the 12 | # build.ps1/sh script this variable isn't automatically set. 13 | $ci = $true 14 | $disableConfigureToolsetImport = $true 15 | . $PSScriptRoot\..\tools.ps1 16 | 17 | if ($PromoteToChannels -eq "") { 18 | Write-PipelineTaskError -Type 'warning' -Message "This build won't publish assets as it's not configured to any Maestro channel. If that wasn't intended use Darc to configure a default channel using add-default-channel for this branch or to promote it to a channel using add-build-to-channel. See https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md#assigning-an-individual-build-to-a-channel for more info." 19 | ExitWithExitCode 0 20 | } 21 | 22 | # Check that every channel that Maestro told to promote the build to 23 | # is available in YAML 24 | $PromoteToChannelsIds = $PromoteToChannels -split "\D" | Where-Object { $_ } 25 | 26 | $hasErrors = $false 27 | 28 | foreach ($id in $PromoteToChannelsIds) { 29 | if (($id -ne 0) -and ($id -notin $AvailableChannelIds)) { 30 | Write-PipelineTaskError -Message "Channel $id is not present in the post-build YAML configuration! This is an error scenario. Please contact @dnceng." 31 | $hasErrors = $true 32 | } 33 | } 34 | 35 | # The `Write-PipelineTaskError` doesn't error the script and we might report several errors 36 | # in the previous lines. The check below makes sure that we return an error state from the 37 | # script if we reported any validation error 38 | if ($hasErrors) { 39 | ExitWithExitCode 1 40 | } 41 | 42 | Write-Host 'done.' 43 | } 44 | catch { 45 | Write-Host $_ 46 | Write-PipelineTelemetryError -Category 'CheckChannelConsistency' -Message "There was an error while trying to check consistency of Maestro default channels for the build and post-build YAML configuration." 47 | ExitWithExitCode 1 48 | } 49 | -------------------------------------------------------------------------------- /eng/common/templates-official/variables/pool-providers.yml: -------------------------------------------------------------------------------- 1 | # Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, 2 | # otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches. 3 | 4 | # Motivation: 5 | # Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS 6 | # (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing 7 | # (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS. 8 | # Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services 9 | # team needs to move resources around and create new and potentially differently-named pools. Using this template 10 | # file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming. 11 | 12 | # How to use: 13 | # This yaml assumes your shipped product branches use the naming convention "release/..." (which many do). 14 | # If we find alternate naming conventions in broad usage it can be added to the condition below. 15 | # 16 | # First, import the template in an arcade-ified repo to pick up the variables, e.g.: 17 | # 18 | # variables: 19 | # - template: /eng/common/templates-official/variables/pool-providers.yml 20 | # 21 | # ... then anywhere specifying the pool provider use the runtime variables, 22 | # $(DncEngInternalBuildPool) 23 | # 24 | # pool: 25 | # name: $(DncEngInternalBuildPool) 26 | # image: 1es-windows-2022 27 | 28 | variables: 29 | # Coalesce the target and source branches so we know when a PR targets a release branch 30 | # If these variables are somehow missing, fall back to main (tends to have more capacity) 31 | 32 | # Any new -Svc alternative pools should have variables added here to allow for splitting work 33 | 34 | - name: DncEngInternalBuildPool 35 | value: $[ 36 | replace( 37 | replace( 38 | eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), 39 | True, 40 | 'NetCore1ESPool-Svc-Internal' 41 | ), 42 | False, 43 | 'NetCore1ESPool-Internal' 44 | ) 45 | ] -------------------------------------------------------------------------------- /src/Microsoft.DiaSymReader.Converter/PortablePdbConversionOptions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Collections.Immutable; 8 | 9 | namespace Microsoft.DiaSymReader.Tools 10 | { 11 | /// 12 | /// Portable to Windows PDB conversion options. 13 | /// 14 | public sealed class PortablePdbConversionOptions 15 | { 16 | public static readonly PortablePdbConversionOptions Default = new(); 17 | 18 | /// 19 | /// When converting to Windows PDB do not convert Source Link to srcsrv. 20 | /// 21 | public bool SuppressSourceLinkConversion { get; } 22 | 23 | /// 24 | /// Additional variable definitions to add to variable section of the srcsvr stream. 25 | /// 26 | public ImmutableArray> SrcSvrVariables { get; } 27 | 28 | /// 29 | /// Customizes creation of the Windows PDB writer. 30 | /// 31 | public SymUnmanagedWriterCreationOptions WriterCreationOptions { get; } 32 | 33 | // backwards compat overload 34 | public PortablePdbConversionOptions(bool suppressSourceLinkConversion, IEnumerable>? srcSvrVariables) 35 | : this(suppressSourceLinkConversion, srcSvrVariables, SymUnmanagedWriterCreationOptions.Deterministic) 36 | { 37 | } 38 | 39 | public PortablePdbConversionOptions( 40 | bool suppressSourceLinkConversion = false, 41 | IEnumerable>? srcSvrVariables = null, 42 | SymUnmanagedWriterCreationOptions writerCreationOptions = SymUnmanagedWriterCreationOptions.Deterministic) 43 | { 44 | var variables = srcSvrVariables?.ToImmutableArray() ?? ImmutableArray>.Empty; 45 | PdbConverterPortableToWindows.ValidateSrcSvrVariables(variables, nameof(srcSvrVariables)); 46 | 47 | SuppressSourceLinkConversion = suppressSourceLinkConversion; 48 | SrcSvrVariables = variables; 49 | WriterCreationOptions = writerCreationOptions; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /eng/common/cross/tizen-build-rootfs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | ARCH=$1 5 | LINK_ARCH=$ARCH 6 | 7 | case "$ARCH" in 8 | arm) 9 | TIZEN_ARCH="armv7hl" 10 | ;; 11 | armel) 12 | TIZEN_ARCH="armv7l" 13 | LINK_ARCH="arm" 14 | ;; 15 | arm64) 16 | TIZEN_ARCH="aarch64" 17 | ;; 18 | x86) 19 | TIZEN_ARCH="i686" 20 | ;; 21 | x64) 22 | TIZEN_ARCH="x86_64" 23 | LINK_ARCH="x86" 24 | ;; 25 | riscv64) 26 | TIZEN_ARCH="riscv64" 27 | LINK_ARCH="riscv" 28 | ;; 29 | *) 30 | echo "Unsupported architecture for tizen: $ARCH" 31 | exit 1 32 | esac 33 | 34 | __CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) 35 | __TIZEN_CROSSDIR="$__CrossDir/${ARCH}/tizen" 36 | 37 | if [[ -z "$ROOTFS_DIR" ]]; then 38 | echo "ROOTFS_DIR is not defined." 39 | exit 1; 40 | fi 41 | 42 | TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp 43 | mkdir -p $TIZEN_TMP_DIR 44 | 45 | # Download files 46 | echo ">>Start downloading files" 47 | VERBOSE=1 $__CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR $TIZEN_ARCH 48 | echo "<>Start constructing Tizen rootfs" 51 | TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm` 52 | cd $ROOTFS_DIR 53 | for f in $TIZEN_RPM_FILES; do 54 | rpm2cpio $f | cpio -idm --quiet 55 | done 56 | echo "<>Start configuring Tizen rootfs" 63 | ln -sfn asm-${LINK_ARCH} ./usr/include/asm 64 | patch -p1 < $__TIZEN_CROSSDIR/tizen.patch 65 | if [[ "$TIZEN_ARCH" == "riscv64" ]]; then 66 | echo "Fixing broken symlinks in $PWD" 67 | rm ./usr/lib64/libresolv.so 68 | ln -s ../../lib64/libresolv.so.2 ./usr/lib64/libresolv.so 69 | rm ./usr/lib64/libpthread.so 70 | ln -s ../../lib64/libpthread.so.0 ./usr/lib64/libpthread.so 71 | rm ./usr/lib64/libdl.so 72 | ln -s ../../lib64/libdl.so.2 ./usr/lib64/libdl.so 73 | rm ./usr/lib64/libutil.so 74 | ln -s ../../lib64/libutil.so.1 ./usr/lib64/libutil.so 75 | rm ./usr/lib64/libm.so 76 | ln -s ../../lib64/libm.so.6 ./usr/lib64/libm.so 77 | rm ./usr/lib64/librt.so 78 | ln -s ../../lib64/librt.so.1 ./usr/lib64/librt.so 79 | rm ./lib/ld-linux-riscv64-lp64d.so.1 80 | ln -s ../lib64/ld-linux-riscv64-lp64d.so.1 ./lib/ld-linux-riscv64-lp64d.so.1 81 | fi 82 | echo "< 12 | 13 | Param( 14 | [string] $InputPath, 15 | [bool] $Recursive = $true 16 | ) 17 | 18 | $CliToolName = "Microsoft.DotNet.VersionTools.Cli" 19 | 20 | function Install-VersionTools-Cli { 21 | param( 22 | [Parameter(Mandatory=$true)][string]$Version 23 | ) 24 | 25 | Write-Host "Installing the package '$CliToolName' with a version of '$version' ..." 26 | $feed = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" 27 | 28 | $argumentList = @("tool", "install", "--local", "$CliToolName", "--add-source $feed", "--no-cache", "--version $Version", "--create-manifest-if-needed") 29 | Start-Process "$dotnet" -Verbose -ArgumentList $argumentList -NoNewWindow -Wait 30 | } 31 | 32 | # ------------------------------------------------------------------- 33 | 34 | if (!(Test-Path $InputPath)) { 35 | Write-Host "Input Path '$InputPath' does not exist" 36 | ExitWithExitCode 1 37 | } 38 | 39 | $ErrorActionPreference = 'Stop' 40 | Set-StrictMode -Version 2.0 41 | 42 | $disableConfigureToolsetImport = $true 43 | $global:LASTEXITCODE = 0 44 | 45 | # `tools.ps1` checks $ci to perform some actions. Since the SDL 46 | # scripts don't necessarily execute in the same agent that run the 47 | # build.ps1/sh script this variable isn't automatically set. 48 | $ci = $true 49 | . $PSScriptRoot\..\tools.ps1 50 | 51 | try { 52 | $dotnetRoot = InitializeDotNetCli -install:$true 53 | $dotnet = "$dotnetRoot\dotnet.exe" 54 | 55 | $toolsetVersion = Read-ArcadeSdkVersion 56 | Install-VersionTools-Cli -Version $toolsetVersion 57 | 58 | $cliToolFound = (& "$dotnet" tool list --local | Where-Object {$_.Split(' ')[0] -eq $CliToolName}) 59 | if ($null -eq $cliToolFound) { 60 | Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "The '$CliToolName' tool is not installed." 61 | ExitWithExitCode 1 62 | } 63 | 64 | Exec-BlockVerbosely { 65 | & "$dotnet" $CliToolName trim-assets-version ` 66 | --assets-path $InputPath ` 67 | --recursive $Recursive 68 | Exit-IfNZEC "Sdl" 69 | } 70 | } 71 | catch { 72 | Write-Host $_ 73 | Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ 74 | ExitWithExitCode 1 75 | } 76 | -------------------------------------------------------------------------------- /eng/common/sdl/extract-artifact-archives.ps1: -------------------------------------------------------------------------------- 1 | # This script looks for each archive file in a directory and extracts it into the target directory. 2 | # For example, the file "$InputPath/bin.tar.gz" extracts to "$ExtractPath/bin.tar.gz.extracted/**". 3 | # Uses the "tar" utility added to Windows 10 / Windows 2019 that supports tar.gz and zip. 4 | param( 5 | # Full path to directory where archives are stored. 6 | [Parameter(Mandatory=$true)][string] $InputPath, 7 | # Full path to directory to extract archives into. May be the same as $InputPath. 8 | [Parameter(Mandatory=$true)][string] $ExtractPath 9 | ) 10 | 11 | $ErrorActionPreference = 'Stop' 12 | Set-StrictMode -Version 2.0 13 | 14 | $disableConfigureToolsetImport = $true 15 | 16 | try { 17 | # `tools.ps1` checks $ci to perform some actions. Since the SDL 18 | # scripts don't necessarily execute in the same agent that run the 19 | # build.ps1/sh script this variable isn't automatically set. 20 | $ci = $true 21 | . $PSScriptRoot\..\tools.ps1 22 | 23 | Measure-Command { 24 | $jobs = @() 25 | 26 | # Find archive files for non-Windows and Windows builds. 27 | $archiveFiles = @( 28 | Get-ChildItem (Join-Path $InputPath "*.tar.gz") 29 | Get-ChildItem (Join-Path $InputPath "*.zip") 30 | ) 31 | 32 | foreach ($targzFile in $archiveFiles) { 33 | $jobs += Start-Job -ScriptBlock { 34 | $file = $using:targzFile 35 | $fileName = [System.IO.Path]::GetFileName($file) 36 | $extractDir = Join-Path $using:ExtractPath "$fileName.extracted" 37 | 38 | New-Item $extractDir -ItemType Directory -Force | Out-Null 39 | 40 | Write-Host "Extracting '$file' to '$extractDir'..." 41 | 42 | # Pipe errors to stdout to prevent PowerShell detecting them and quitting the job early. 43 | # This type of quit skips the catch, so we wouldn't be able to tell which file triggered the 44 | # error. Save output so it can be stored in the exception string along with context. 45 | $output = tar -xf $file -C $extractDir 2>&1 46 | # Handle NZEC manually rather than using Exit-IfNZEC: we are in a background job, so we 47 | # don't have access to the outer scope. 48 | if ($LASTEXITCODE -ne 0) { 49 | throw "Error extracting '$file': non-zero exit code ($LASTEXITCODE). Output: '$output'" 50 | } 51 | 52 | Write-Host "Extracted to $extractDir" 53 | } 54 | } 55 | 56 | Receive-Job $jobs -Wait 57 | } 58 | } 59 | catch { 60 | Write-Host $_ 61 | Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ 62 | ExitWithExitCode 1 63 | } 64 | -------------------------------------------------------------------------------- /eng/common/dotnet-install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source="${BASH_SOURCE[0]}" 4 | # resolve $source until the file is no longer a symlink 5 | while [[ -h "$source" ]]; do 6 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" 7 | source="$(readlink "$source")" 8 | # if $source was a relative symlink, we need to resolve it relative to the path where the 9 | # symlink file was located 10 | [[ $source != /* ]] && source="$scriptroot/$source" 11 | done 12 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" 13 | 14 | . "$scriptroot/tools.sh" 15 | 16 | version='Latest' 17 | architecture='' 18 | runtime='dotnet' 19 | runtimeSourceFeed='' 20 | runtimeSourceFeedKey='' 21 | while [[ $# -gt 0 ]]; do 22 | opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" 23 | case "$opt" in 24 | -version|-v) 25 | shift 26 | version="$1" 27 | ;; 28 | -architecture|-a) 29 | shift 30 | architecture="$1" 31 | ;; 32 | -runtime|-r) 33 | shift 34 | runtime="$1" 35 | ;; 36 | -runtimesourcefeed) 37 | shift 38 | runtimeSourceFeed="$1" 39 | ;; 40 | -runtimesourcefeedkey) 41 | shift 42 | runtimeSourceFeedKey="$1" 43 | ;; 44 | *) 45 | Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1" 46 | exit 1 47 | ;; 48 | esac 49 | shift 50 | done 51 | 52 | # Use uname to determine what the CPU is, see https://en.wikipedia.org/wiki/Uname#Examples 53 | cpuname=$(uname -m) 54 | case $cpuname in 55 | arm64|aarch64) 56 | buildarch=arm64 57 | if [ "$(getconf LONG_BIT)" -lt 64 ]; then 58 | # This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS) 59 | buildarch=arm 60 | fi 61 | ;; 62 | loongarch64) 63 | buildarch=loongarch64 64 | ;; 65 | amd64|x86_64) 66 | buildarch=x64 67 | ;; 68 | armv*l) 69 | buildarch=arm 70 | ;; 71 | i[3-6]86) 72 | buildarch=x86 73 | ;; 74 | riscv64) 75 | buildarch=riscv64 76 | ;; 77 | *) 78 | echo "Unknown CPU $cpuname detected, treating it as x64" 79 | buildarch=x64 80 | ;; 81 | esac 82 | 83 | dotnetRoot="${repo_root}.dotnet" 84 | if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then 85 | dotnetRoot="$dotnetRoot/$architecture" 86 | fi 87 | 88 | InstallDotNet "$dotnetRoot" $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || { 89 | local exit_code=$? 90 | Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2 91 | ExitWithExitCode $exit_code 92 | } 93 | 94 | ExitWithExitCode 0 95 | -------------------------------------------------------------------------------- /src/PdbTestResources/Resources/LanguageOnlyTypes.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the License.txt file in the project root for more information. 4 | #pragma warning disable 219,168 // Unused vars 5 | 6 | using System; 7 | 8 | class C 9 | { 10 | public void F() 11 | { 12 | { 13 | Action< 14 | Action, 15 | Action, 16 | Action, 17 | Action, 18 | Action, 19 | Action, 20 | Action> v1 = null; 21 | 22 | var v2 = default( 23 | ((dynamic n0, dynamic n1, dynamic n2, dynamic n3, dynamic n4, dynamic n5, dynamic n6, dynamic n7, dynamic n8, dynamic n9) a0, 24 | (dynamic n0, dynamic n1, dynamic n2, dynamic n3, dynamic n4, dynamic n5, dynamic n6, dynamic n7, dynamic n8, dynamic n9) a1, 25 | (dynamic n0, dynamic n1, dynamic n2, dynamic n3, dynamic n4, dynamic n5, dynamic n6, dynamic n7, dynamic n8, dynamic n9) a2, 26 | (dynamic n0, dynamic n1, dynamic n2, dynamic n3, dynamic n4, dynamic n5, dynamic n6, dynamic n7, dynamic n8, dynamic n9) a3, 27 | (dynamic n0, dynamic n1, dynamic n2, dynamic n3, dynamic n4, dynamic n5, dynamic n6, dynamic n7, dynamic n8, dynamic n9) a4, 28 | (dynamic n0, dynamic n1, dynamic n2, dynamic n3, dynamic n4, dynamic n5, dynamic n6, dynamic n7, dynamic n8, dynamic n9) a5)); 29 | 30 | const Action c1 = null; 31 | const Action<(dynamic, dynamic)> c2 = null; 32 | } 33 | 34 | { 35 | Action>, dynamic> v1 = null; 36 | (dynamic a1, (object, dynamic, (dynamic a4, dynamic)) a7, dynamic a8) v2; 37 | 38 | const Action c1 = null; 39 | const Action c2 = null; 40 | } 41 | } 42 | } 43 | --------------------------------------------------------------------------------