Repository: Microsoft/slow-cheetah Branch: main Commit: 6e80afd1f24d Files: 328 Total size: 999.6 KB Directory structure: gitextract_7_2kiagc/ ├── .azuredevops/ │ └── dependabot.yml ├── .config/ │ └── dotnet-tools.json ├── .editorconfig ├── .gitattributes ├── .github/ │ ├── .editorconfig │ ├── Prime-ForCopilot.ps1 │ ├── actions/ │ │ └── publish-artifacts/ │ │ └── action.yaml │ ├── copilot-instructions.md │ ├── renovate.json │ ├── skills/ │ │ └── update-library-template/ │ │ ├── SKILL.md │ │ └── template-release-notes.md │ └── workflows/ │ ├── copilot-setup-steps.yml │ ├── docs.yml │ ├── docs_validate.yml │ └── libtemplate-update.yml ├── .gitignore ├── .vscode/ │ ├── extensions.json │ ├── launch.json │ ├── mcp.json │ ├── settings.json │ └── tasks.json ├── .vsts-ci.yml ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CodeQL.yml ├── Directory.Build.props ├── Directory.Build.rsp ├── Directory.Build.targets ├── Directory.Packages.props ├── LICENSE ├── README.md ├── Restore.cmd ├── SECURITY.md ├── SUPPORT.md ├── ThirdPartyNotices.txt ├── appveyor.yml ├── azure-pipelines/ │ ├── Archive-SourceCode.ps1 │ ├── BuildStageVariables.yml │ ├── Get-InsertionPRId.ps1 │ ├── GlobalVariables.yml │ ├── Merge-CodeCoverage.ps1 │ ├── NuGetSbom.props │ ├── PoliCheckExclusions.xml │ ├── PostPRMessage.ps1 │ ├── TSAOptions.json │ ├── WIFtoPATauth.yml │ ├── apiscan.yml │ ├── archive-sourcecode.yml │ ├── build.yml │ ├── dotnet.yml │ ├── falsepositives.gdnsuppress │ ├── install-dependencies.yml │ ├── libtemplate-update.yml │ ├── microbuild.after.yml │ ├── microbuild.before.yml │ ├── no_authenticode.txt │ ├── no_strongname.txt │ ├── official.yml │ ├── prepare-insertion-stages.yml │ ├── publish-codecoverage.yml │ ├── publish-symbols.yml │ ├── publish_artifacts.ps1 │ ├── release-deployment-prep.yml │ ├── release.yml │ ├── unofficial.yml │ ├── vs-insertion-script.ps1 │ ├── vs-insertion.yml │ └── vs-validation.yml ├── azure-pipelines.yml ├── doc/ │ ├── targets.md │ ├── transforming_files.md │ └── update.md ├── docfx/ │ ├── .gitignore │ ├── docfx.json │ ├── docs/ │ │ ├── features.md │ │ ├── getting-started.md │ │ └── toc.yml │ ├── index.md │ └── toc.yml ├── global.json ├── init.cmd ├── init.ps1 ├── nuget.config ├── samples/ │ ├── FSharpDemo/ │ │ ├── FSharpDemo.fsproj │ │ ├── Program.fs │ │ ├── app.Debug.config │ │ ├── app.Release.config │ │ └── app.config │ ├── Linked-files/ │ │ ├── connectionStrings.Debug.config │ │ ├── connectionStrings.Release.config │ │ └── connectionStrings.config │ ├── SlowCheetah.Samples.sln │ ├── TransformSetupProject/ │ │ ├── .gitignore │ │ └── TransformSetupProject.vdproj │ ├── WebDemo/ │ │ ├── Default.aspx │ │ ├── Default.aspx.cs │ │ ├── Default.aspx.designer.cs │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ ├── WebDemo.csproj │ │ ├── connectionStrings.Debug.config │ │ ├── connectionStrings.Release.config │ │ ├── connectionStrings.ToPkg.config │ │ └── connectionStrings.config │ ├── WindowsAzure1/ │ │ ├── ServiceConfiguration.Cloud.cscfg │ │ ├── ServiceConfiguration.Local.cscfg │ │ ├── ServiceDefinition.csdef │ │ └── WindowsAzure1.ccproj │ ├── WorkerRole1/ │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── WorkerRole.cs │ │ ├── WorkerRole1.csproj │ │ ├── XMLFile1.xml │ │ ├── app.Debug.config │ │ ├── app.Release.config │ │ ├── app.config │ │ ├── contacts.Debug.xml │ │ ├── contacts.Release.xml │ │ ├── contacts.xml │ │ └── packages.config │ └── Wpf.Transform/ │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets/ │ │ └── BureauBlue.xaml │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── Properties/ │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── TransformModel.cs │ ├── Wpf.Transform.csproj │ ├── app.Debug.config │ ├── app.Release.config │ ├── app.config │ ├── connectionStrings.Debug.config │ ├── connectionStrings.Release.config │ ├── connectionStrings.config │ ├── contacts.Debug.xml │ ├── contacts.Release.xml │ └── contacts.xml ├── src/ │ ├── .editorconfig │ ├── AssemblyInfo.cs │ ├── AssemblyInfo.vb │ ├── Directory.Build.props │ ├── Directory.Build.targets │ ├── Microsoft.VisualStudio.SlowCheetah/ │ │ ├── Build/ │ │ │ ├── Microsoft.VisualStudio.SlowCheetah.App.targets │ │ │ ├── Microsoft.VisualStudio.SlowCheetah.ClickOnce.targets │ │ │ ├── Microsoft.VisualStudio.SlowCheetah.SetupProject.targets │ │ │ ├── Microsoft.VisualStudio.SlowCheetah.Web.targets │ │ │ ├── Microsoft.VisualStudio.SlowCheetah.targets │ │ │ ├── TransformTask.cs │ │ │ └── readme.txt │ │ ├── Exceptions/ │ │ │ └── TransformFailedException.cs │ │ ├── Logging/ │ │ │ ├── ITransformationLogger.cs │ │ │ ├── JsonShimLogger.cs │ │ │ ├── TransformationTaskLogger.cs │ │ │ └── XmlShimLogger.cs │ │ ├── Microsoft.VisualStudio.SlowCheetah.csproj │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── Resources/ │ │ │ ├── Resources.Designer.cs │ │ │ └── Resources.resx │ │ └── Transformer/ │ │ ├── ITransformer.cs │ │ ├── JsonTransformer.cs │ │ ├── TransformUtilities.cs │ │ ├── TransformerFactory.cs │ │ └── XmlTransformer.cs │ ├── Microsoft.VisualStudio.SlowCheetah.Tests/ │ │ ├── App.config │ │ ├── BaseTest.cs │ │ ├── BuildTests/ │ │ │ ├── ConfigTransformTestsBase.cs │ │ │ ├── ConsoleAppTests.cs │ │ │ ├── TestProjects/ │ │ │ │ ├── ConsoleApp/ │ │ │ │ │ ├── App.Debug.config │ │ │ │ │ ├── App.Release.config │ │ │ │ │ ├── App.config │ │ │ │ │ ├── ConsoleApp.csproj │ │ │ │ │ ├── Other.Debug.config │ │ │ │ │ ├── Other.Release.config │ │ │ │ │ ├── Other.config │ │ │ │ │ ├── Program.cs │ │ │ │ │ └── Properties/ │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ ├── Directory.Build.props │ │ │ │ ├── Directory.Build.targets │ │ │ │ └── WebApplication/ │ │ │ │ ├── Other.Debug.config │ │ │ │ ├── Other.Release.config │ │ │ │ ├── Other.config │ │ │ │ ├── Properties/ │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ ├── Web.Debug.config │ │ │ │ ├── Web.Release.config │ │ │ │ ├── Web.config │ │ │ │ └── WebApplication.csproj │ │ │ └── WebAppTests.cs │ │ ├── Microsoft.VisualStudio.SlowCheetah.Tests.csproj │ │ ├── TestUtilities.cs │ │ ├── TransformTest.cs │ │ └── example.txt │ ├── Microsoft.VisualStudio.SlowCheetah.VS/ │ │ ├── Directory.Build.targets │ │ ├── Microsoft.VisualStudio.SlowCheetah.VS.csproj │ │ ├── Microsoft.VisualStudio.SlowCheetah.VS.pkgdef │ │ ├── NugetHandler/ │ │ │ ├── PackageHandlers/ │ │ │ │ ├── BackgroundInstallationHandler.cs │ │ │ │ ├── BasePackageHandler.cs │ │ │ │ ├── DialogInstallationHandler.cs │ │ │ │ ├── EmptyHandler.cs │ │ │ │ ├── IPackageHandler.cs │ │ │ │ ├── NuGetUninstaller.cs │ │ │ │ ├── NugetInstaller.cs │ │ │ │ ├── TargetsUninstaller.cs │ │ │ │ └── UserInstallationHandler.cs │ │ │ ├── SlowCheetahNuGetManager.cs │ │ │ └── VsProjectTypes.cs │ │ ├── Options/ │ │ │ ├── AdvancedOptionsDialogPage.cs │ │ │ ├── AdvancedOptionsUserControl.Designer.cs │ │ │ ├── AdvancedOptionsUserControl.cs │ │ │ ├── AdvancedOptionsUserControl.resx │ │ │ ├── BaseOptionsDialogPage.cs │ │ │ ├── OptionsDialogPage.cs │ │ │ ├── OptionsUserControl.Designer.cs │ │ │ ├── OptionsUserControl.cs │ │ │ └── OptionsUserControl.resx │ │ ├── Package/ │ │ │ ├── AddTransformCommand.cs │ │ │ ├── BaseCommand.cs │ │ │ ├── PackageSolutionEvents.cs │ │ │ ├── PreviewTransformCommand.cs │ │ │ └── SlowCheetahPackageLogger.cs │ │ ├── Resources/ │ │ │ ├── Guids.cs │ │ │ ├── PkgCmdID.cs │ │ │ ├── Resources.Designer.cs │ │ │ └── Resources.resx │ │ ├── SlowCheetah.vsct │ │ ├── SlowCheetahPackage.cs │ │ ├── TransformationPreviewLogger.cs │ │ ├── Utilities/ │ │ │ ├── PackageUtilities.cs │ │ │ └── ProjectUtilities.cs │ │ ├── VSPackage.Designer.cs │ │ ├── VSPackage.resx │ │ └── source.extension.vsixmanifest │ ├── Microsoft.VisualStudio.SlowCheetah.VS.Tests/ │ │ ├── App.config │ │ ├── Microsoft.VisualStudio.SlowCheetah.VS.Tests.csproj │ │ ├── PackageUtilitiesTest.cs │ │ └── xunit.runner.json │ ├── Microsoft.VisualStudio.SlowCheetah.Vsix/ │ │ └── Microsoft.VisualStudio.SlowCheetah.Vsix.csproj │ ├── OptProf.targets │ ├── SlowCheetah.sln │ └── build/ │ ├── no_authenticode.txt │ └── no_strongname.txt ├── stylecop.json ├── test/ │ ├── .editorconfig │ ├── Directory.Build.props │ ├── Directory.Build.targets │ ├── Microsoft.VisualStudio.SlowCheetah.Tests/ │ │ ├── App.config │ │ ├── BaseTest.cs │ │ ├── BuildTests/ │ │ │ ├── ConfigTransformTestsBase.cs │ │ │ ├── ConsoleAppTests.cs │ │ │ ├── TestProjects/ │ │ │ │ ├── ConsoleApp/ │ │ │ │ │ ├── App.Debug.config │ │ │ │ │ ├── App.Release.config │ │ │ │ │ ├── App.config │ │ │ │ │ ├── ConsoleApp.csproj │ │ │ │ │ ├── Other.Debug.config │ │ │ │ │ ├── Other.Release.config │ │ │ │ │ ├── Other.config │ │ │ │ │ ├── Program.cs │ │ │ │ │ └── Properties/ │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ ├── Directory.Build.props │ │ │ │ ├── Directory.Build.targets │ │ │ │ └── WebApplication/ │ │ │ │ ├── Other.Debug.config │ │ │ │ ├── Other.Release.config │ │ │ │ ├── Other.config │ │ │ │ ├── Web.Debug.config │ │ │ │ ├── Web.Release.config │ │ │ │ ├── Web.config │ │ │ │ └── WebApplication.csproj │ │ │ └── WebAppTests.cs │ │ ├── Microsoft.VisualStudio.SlowCheetah.Tests.csproj │ │ ├── TestUtilities.cs │ │ ├── TransformTest.cs │ │ └── example.txt │ ├── Microsoft.VisualStudio.SlowCheetah.VS.Tests/ │ │ ├── App.config │ │ ├── Microsoft.VisualStudio.SlowCheetah.VS.Tests.csproj │ │ └── PackageUtilitiesTest.cs │ └── dirs.proj ├── tools/ │ ├── Check-DotNetRuntime.ps1 │ ├── Check-DotNetSdk.ps1 │ ├── Convert-PDB.ps1 │ ├── Download-NuGetPackage.ps1 │ ├── Get-ArtifactsStagingDirectory.ps1 │ ├── Get-CodeCovTool.ps1 │ ├── Get-ExternalSymbolFiles.ps1 │ ├── Get-LibTemplateBasis.ps1 │ ├── Get-NuGetTool.ps1 │ ├── Get-ProcDump.ps1 │ ├── Get-SymbolFiles.ps1 │ ├── Get-TempToolsPath.ps1 │ ├── Install-DotNetSdk.ps1 │ ├── Install-NuGetCredProvider.ps1 │ ├── Install-NuGetPackage.ps1 │ ├── MergeFrom-Template.ps1 │ ├── Prepare-Legacy-Symbols.ps1 │ ├── Set-EnvVars.ps1 │ ├── artifacts/ │ │ ├── APIScanInputs.ps1 │ │ ├── LocBin.ps1 │ │ ├── VSInsertion.ps1 │ │ ├── Variables.ps1 │ │ ├── _all.ps1 │ │ ├── _stage_all.ps1 │ │ ├── build_logs.ps1 │ │ ├── coverageResults.ps1 │ │ ├── deployables.ps1 │ │ ├── projectAssetsJson.ps1 │ │ ├── symbols.ps1 │ │ ├── testResults.ps1 │ │ └── test_symbols.ps1 │ ├── dotnet-test-cloud.ps1 │ ├── publish-CodeCov.ps1 │ ├── test.runsettings │ └── variables/ │ ├── BusinessGroupName.ps1 │ ├── DotNetSdkVersion.ps1 │ ├── InsertJsonValues.ps1 │ ├── InsertPropsValues.ps1 │ ├── InsertTargetBranch.ps1 │ ├── InsertVersionsValues.ps1 │ ├── LocLanguages.ps1 │ ├── ProfilingInputsDropName.ps1 │ ├── ProfilingInputsPropsName.ps1 │ ├── SymbolsFeatureName.ps1 │ ├── VstsDropNames.ps1 │ ├── _all.ps1 │ └── _define.ps1 └── version.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .azuredevops/dependabot.yml ================================================ # Please see the documentation for all configuration options: # https://eng.ms/docs/products/dependabot/configuration/version_updates version: 2 updates: - package-ecosystem: nuget directory: / schedule: interval: monthly ================================================ FILE: .config/dotnet-tools.json ================================================ { "version": 1, "isRoot": true, "tools": { "powershell": { "version": "7.6.1", "commands": [ "pwsh" ], "rollForward": false }, "dotnet-coverage": { "version": "18.6.2", "commands": [ "dotnet-coverage" ], "rollForward": false }, "nbgv": { "version": "3.9.50", "commands": [ "nbgv" ], "rollForward": false }, "docfx": { "version": "2.78.5", "commands": [ "docfx" ], "rollForward": false }, "nerdbank.dotnetrepotools": { "version": "1.3.22", "commands": [ "repo" ], "rollForward": false }, "dotnet-symbol": { "version": "9.0.661903", "commands": [ "dotnet-symbol" ], "rollForward": false } } } ================================================ FILE: .editorconfig ================================================ # EditorConfig is awesome:http://EditorConfig.org # top-most EditorConfig file root = true # Don't use tabs for indentation. [*] indent_style = space # (Please don't specify an indent_size here; that has too many unintended consequences.) [*.yml] indent_size = 2 indent_style = space # Code files [*.{cs,csx,vb,vbx,h,cpp,idl}] indent_size = 4 insert_final_newline = true trim_trailing_whitespace = true # MSBuild project files [*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj,props,targets}] indent_size = 2 # Xml config files [*.{ruleset,config,nuspec,resx,vsixmanifest,vsct,runsettings}] indent_size = 2 indent_style = space # JSON files [*.json] indent_size = 2 indent_style = space [*.ps1] indent_style = space indent_size = 4 # Dotnet code style settings: [*.{cs,vb}] # Sort using and Import directives with System.* appearing first dotnet_sort_system_directives_first = true dotnet_separate_import_directive_groups = false dotnet_style_qualification_for_field = true:warning dotnet_style_qualification_for_property = true:warning dotnet_style_qualification_for_method = true:warning dotnet_style_qualification_for_event = true:warning # Use language keywords instead of framework type names for type references dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion dotnet_style_predefined_type_for_member_access = true:suggestion # Suggest more modern language features when available dotnet_style_object_initializer = true:suggestion dotnet_style_collection_initializer = true:suggestion dotnet_style_coalesce_expression = true:suggestion dotnet_style_null_propagation = true:suggestion dotnet_style_explicit_tuple_names = true:suggestion # Non-private static fields are PascalCase dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected dotnet_naming_symbols.non_private_static_fields.required_modifiers = static dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case # Constants are PascalCase dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style dotnet_naming_symbols.constants.applicable_kinds = field, local dotnet_naming_symbols.constants.required_modifiers = const dotnet_naming_style.constant_style.capitalization = pascal_case # Static fields are camelCase dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style dotnet_naming_symbols.static_fields.applicable_kinds = field dotnet_naming_symbols.static_fields.required_modifiers = static dotnet_naming_style.static_field_style.capitalization = camel_case # Instance fields are camelCase dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style dotnet_naming_symbols.instance_fields.applicable_kinds = field dotnet_naming_style.instance_field_style.capitalization = camel_case # Locals and parameters are camelCase dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local dotnet_naming_style.camel_case_style.capitalization = camel_case # Local functions are PascalCase dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style dotnet_naming_symbols.local_functions.applicable_kinds = local_function dotnet_naming_style.local_function_style.capitalization = pascal_case # By default, name items with PascalCase dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style dotnet_naming_symbols.all_members.applicable_kinds = * dotnet_naming_style.pascal_case_style.capitalization = pascal_case # CSharp code style settings: [*.cs] # Indentation preferences csharp_indent_block_contents = true csharp_indent_braces = false csharp_indent_case_contents = true csharp_indent_switch_labels = true csharp_indent_labels = flush_left # Prefer "var" everywhere csharp_style_var_for_built_in_types = false csharp_style_var_when_type_is_apparent = true:suggestion csharp_style_var_elsewhere = false:warning # Prefer method-like constructs to have a block body csharp_style_expression_bodied_methods = false:none csharp_style_expression_bodied_constructors = false:none csharp_style_expression_bodied_operators = false:none # Prefer property-like constructs to have an expression-body csharp_style_expression_bodied_properties = true:none csharp_style_expression_bodied_indexers = true:none csharp_style_expression_bodied_accessors = true:none # Suggest more modern language features when available csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion csharp_style_pattern_matching_over_as_with_null_check = true:suggestion csharp_style_inlined_variable_declaration = true:suggestion csharp_style_throw_expression = true:suggestion csharp_style_conditional_delegate_call = true:suggestion # Newline settings csharp_new_line_before_open_brace = all csharp_new_line_before_else = true csharp_new_line_before_catch = true csharp_new_line_before_finally = true csharp_new_line_before_members_in_object_initializers = true csharp_new_line_before_members_in_anonymous_types = true # Blocks are allowed csharp_prefer_braces = true:silent # SA1130: Use lambda syntax dotnet_diagnostic.SA1130.severity = silent # IDE1006: Naming Styles - StyleCop handles these for us dotnet_diagnostic.IDE1006.severity = none dotnet_diagnostic.DOC100.severity = silent dotnet_diagnostic.DOC104.severity = warning dotnet_diagnostic.DOC105.severity = warning dotnet_diagnostic.DOC106.severity = warning dotnet_diagnostic.DOC107.severity = warning dotnet_diagnostic.DOC108.severity = warning dotnet_diagnostic.DOC200.severity = warning dotnet_diagnostic.DOC202.severity = warning # CA1062: Validate arguments of public methods dotnet_diagnostic.CA1062.severity = warning # CA2016: Forward the CancellationToken parameter dotnet_diagnostic.CA2016.severity = warning [*.sln] indent_style = tab ================================================ FILE: .gitattributes ================================================ ############################################################################### # Set default behavior to automatically normalize line endings. ############################################################################### * text=auto # Ensure shell scripts use LF line endings (linux only accepts LF) *.sh eol=lf *.ps1 eol=lf # The macOS codesign tool is extremely picky, and requires LF line endings. *.plist eol=lf ############################################################################### # Set default behavior for command prompt diff. # # This is need for earlier builds of msysgit that does not have it on by # default for csharp files. # Note: This is only used by command line ############################################################################### #*.cs diff=csharp ############################################################################### # Set the merge driver for project and solution files # # Merging from the command prompt will add diff markers to the files if there # are conflicts (Merging from VS is not affected by the settings below, in VS # the diff markers are never inserted). Diff markers may cause the following # file extensions to fail to load in VS. An alternative would be to treat # these files as binary and thus will always conflict and require user # intervention with every merge. To do so, just uncomment the entries below ############################################################################### #*.sln merge=binary #*.csproj merge=binary #*.vbproj merge=binary #*.vcxproj merge=binary #*.vcproj merge=binary #*.dbproj merge=binary #*.fsproj merge=binary #*.lsproj merge=binary #*.wixproj merge=binary #*.modelproj merge=binary #*.sqlproj merge=binary #*.wwaproj merge=binary ############################################################################### # behavior for image files # # image files are treated as binary by default. ############################################################################### #*.jpg binary #*.png binary #*.gif binary ############################################################################### # diff behavior for common document formats # # Convert binary document formats to text before diffing them. This feature # is only available from the command line. Turn it on by uncommenting the # entries below. ############################################################################### #*.doc diff=astextplain #*.DOC diff=astextplain #*.docx diff=astextplain #*.DOCX diff=astextplain #*.dot diff=astextplain #*.DOT diff=astextplain #*.pdf diff=astextplain #*.PDF diff=astextplain #*.rtf diff=astextplain #*.RTF diff=astextplain ================================================ FILE: .github/.editorconfig ================================================ [renovate.json*] indent_style = tab ================================================ FILE: .github/Prime-ForCopilot.ps1 ================================================ if ((git -C $PSScriptRoot rev-parse --is-shallow-repository) -eq 'true') { Write-Host "Shallow clone detected, disabling NBGV Git engine so the build can succeed." $env:NBGV_GitEngine='Disabled' } ================================================ FILE: .github/actions/publish-artifacts/action.yaml ================================================ name: Publish artifacts description: Publish artifacts runs: using: composite steps: - name: 📥 Collect artifacts run: tools/artifacts/_stage_all.ps1 shell: pwsh if: always() # TODO: replace this hard-coded list with a loop that utilizes the NPM package at # https://github.com/actions/toolkit/tree/main/packages/artifact (or similar) to push the artifacts. - name: 📢 Upload project.assets.json files if: always() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: projectAssetsJson-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/projectAssetsJson continue-on-error: true - name: 📢 Upload variables uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: variables-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/Variables continue-on-error: true - name: 📢 Upload build_logs if: always() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: build_logs-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/build_logs continue-on-error: true - name: 📢 Upload testResults if: always() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: testResults-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/testResults continue-on-error: true - name: 📢 Upload coverageResults if: always() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: coverageResults-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/coverageResults continue-on-error: true - name: 📢 Upload symbols uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: symbols-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/symbols continue-on-error: true - name: 📢 Upload deployables uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: deployables-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/deployables if: always() ================================================ FILE: .github/copilot-instructions.md ================================================ # Copilot instructions for this repository ## High level guidance * Review the `CONTRIBUTING.md` file for instructions to build and test the software. * Run the `.github/Prime-ForCopilot.ps1` script (once) before running any `dotnet` or `msbuild` commands. If you see any build errors about not finding git objects or a shallow clone, it may be time to run this script again. ## Software Design * Design APIs to be highly testable, and all functionality should be tested. * Avoid introducing binary breaking changes in public APIs of projects under `src` unless their project files have `IsPackable` set to `false`. ## Testing **IMPORTANT**: This repository uses Microsoft.Testing.Platform (MTP v2) with xunit v3. Traditional `--filter` syntax does NOT work. Use the options below instead. * There should generally be one test project (under the `test` directory) per shipping project (under the `src` directory). Test projects are named after the project being tested with a `.Tests` suffix. * Tests use xunit v3 with Microsoft.Testing.Platform (MTP v2). Traditional VSTest `--filter` syntax does NOT work. * Some tests are known to be unstable. When running tests, you should skip the unstable ones by using `-- --filter-not-trait "FailsInCloudTest=true"`. ### Running Tests **Run all tests**: ```bash dotnet test --no-build -c Release ``` **Run tests for a specific test project**: ```bash dotnet test --project test/Library.Tests/Library.Tests.csproj --no-build -c Release ``` **Run a single test method**: ```bash dotnet test --project test/Library.Tests/Library.Tests.csproj --no-build -c Release -- --filter-method ClassName.MethodName ``` **Run all tests in a test class**: ```bash dotnet test --project test/Library.Tests/Library.Tests.csproj --no-build -c Release -- --filter-class ClassName ``` **Run tests with wildcard matching** (supports wildcards at beginning and/or end): ```bash dotnet test --project test/Library.Tests/Library.Tests.csproj --no-build -c Release -- --filter-method "*Pattern*" ``` **Run tests with a specific trait** (equivalent to category filtering): ```bash dotnet test --project test/Library.Tests/Library.Tests.csproj --no-build -c Release -- --filter-trait "TraitName=value" ``` **Exclude tests with a specific trait** (skip unstable tests): ```bash dotnet test --project test/Library.Tests/Library.Tests.csproj --no-build -c Release -- --filter-not-trait "TestCategory=FailsInCloudTest" ``` **Run tests for a specific framework only**: ```bash dotnet test --project test/Library.Tests/Library.Tests.csproj --no-build -c Release --framework net9.0 ``` **List all available tests without running them**: ```bash cd test/Library.Tests dotnet run --no-build -c Release --framework net9.0 -- --list-tests ``` **Key points about test filtering with MTP v2 / xunit v3**: - Options after `--` are passed to the test runner, not to `dotnet test` - Use `--filter-method`, `--filter-class`, `--filter-namespace` for simple filtering - Use `--filter-trait` and `--filter-not-trait` for trait-based filtering (replaces `--filter "TestCategory=..."`) - Traditional VSTest `--filter` expressions do NOT work - Wildcards `*` are supported at the beginning and/or end of filter values - Multiple simple filters of the same type use OR logic, different types combine with AND - See `--help` for query filter language for advanced scenarios ## Coding style * Honor StyleCop rules and fix any reported build warnings *after* getting tests to pass. * In C# files, use namespace *statements* instead of namespace *blocks* for all new files. * Add API doc comments to all new public and internal members. ================================================ FILE: .github/renovate.json ================================================ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "github>microsoft/vs-renovate-presets:microbuild", "github>microsoft/vs-renovate-presets:vs_main_dependencies" ], "packageRules": [] } ================================================ FILE: .github/skills/update-library-template/SKILL.md ================================================ --- name: update-library-template description: Merges the latest Library.Template into this repo (at position of HEAD) and resolves conflicts. disable-model-invocation: true --- # Instructions 1. Run `./tools/MergeFrom-Template.ps1` from the repo root. 2. Resolve merge conflicts, taking into account conflict resolution policy below. 3. Validate the changes, as described in the validation section below. 4. Committing your changes (if applicable). ## Conflict resolution policy There may be [special notes](template-release-notes.md) that describe special considerations for certain files or scenarios to help you resolve conflicts appropriately. Always refer to that file before proceeding. In particular, focus on the *incoming* part of the file, since it represents the changes from the Library.Template that you are merging into your repo. Also consider that some repos choose to reject certain Library.Template patterns. For example the template uses MTPv2 for test projects, but a repo might have chosen not to adopt that. When resolving merge conflicts, consider whether it looks like the relevant code file is older than it should be given the changes the template is bringing in. Ask the user when in doubt as to whether the conflict should be resolved in favor of 'catching up' with the template or keeping the current changes. Use #runSubagent to analyze and resolve merge conflicts across files in parallel. ### Keep Current files Conflicts in the following files should always be resolved by keeping the current version (i.e. discard incoming changes): * README.md ### Deleted files Very typically, when the incoming change is to a file that was deleted locally, the correct resolution is to re-delete the file. In some cases however, the deleted file may have incoming changes that should be applied to other files. The `test/Library.Tests/Library.Tests.csproj` file is very typical of this. Changes to this file should very typically be applied to any and all test projects in the repo. You are responsible for doing this in addition to re-deleting this template file. ## Updating package and SDK versions After the merge, always check global.json for MSBuild Sdks with names starting with `Microsoft.VisualStudio.Internal.MicroBuild`. These SDK versions should match the value of the `MicroBuildVersion` property found in `Directory.Packages.props`. Always take the latest of the versions you see among these SDKs and the `MicroBuildVersion` property. ## Validation Validate the merge result (after resolving any conflicts, if applicable). Use #runSubagent for each step. 1. Verify that `dotnet restore` succeeds. Fix any issues that come up. 2. Verify that `dotnet build` succeeds. 3. Verify that tests succeed by running `tools/dotnet-test-cloud.ps1`. While these validations are described using `dotnet` CLI commands, some repos require using full msbuild.exe. You can detect this by checking the `azure-pipelines/dotnet.yml` or `.github/workflows/build.yml` files for use of one or the other tool. You are *not* responsible for fixing issues that the merge did not cause. If validation fails for reasons that seem unrelated to the changes brought in by the merge, advise the user and ask how they'd like you to proceed. That said, sometimes merges will bring in SDK or dependency updates that can cause breaks in seemingly unrelated areas. In such cases, you should investigate and solve the issues as needed. ## Committing your changes If you have to make any changes for validations to pass, consider whether they qualify as a bad merge conflict resolution or more of a novel change that you're making to work with the Library.Template update. Merge conflict resolution fixes ideally get amended into the merge commit, while novel changes would go into a novel commit after the merge commit. Always author your commits using `git commit --author "🤖 Copilot "` (and possibly other parameters). Describe the nature of the merge conflicts you encountered and how you resolved them in your commit message. Later, if asked to review pull request validation breaks, always author a fresh commit with each fix that you push, unless the user directs you to do otherwise. ================================================ FILE: .github/skills/update-library-template/template-release-notes.md ================================================ # Template release notes This file will describe significant changes in Library.Template as they are introduced, especially if they require special consideration when merging updates into existing repos. This file is referenced by update-library-template.prompt.md and should remain in place to facilitate future merges, whether done manually or by AI. ## Solution rename Never leave a Library.slnx file in the repository. You might even see one there even though this particular merge didn't bring it in. This can be an artifact of having renamed Library.sln to Library.slnx in the template repo, but ultimately the receiving repo should have only one .sln or .slnx file, with a better name than `Library`. Delete any `Library.slnx` that you see. Migrate an `.sln` in the repo root to `.slnx` using this command: ```ps1 dotnet solution EXISTING.sln migrate ``` This will create an EXISTING.slnx file. `git add` that file, then `git rm` the old `.sln` file. Sometimes a repo will reference the sln filename in a script or doc somewhere. Search the repo for such references and update them to the slnx file. ================================================ FILE: .github/workflows/copilot-setup-steps.yml ================================================ name: 💪🏼 Copilot Setup Steps # Automatically run the setup steps when they are changed to allow for easy validation, and # allow manual testing through the repository's "Actions" tab on: workflow_dispatch: push: branches: - main paths: - .github/workflows/copilot-setup-steps.yml pull_request: paths: - .github/workflows/copilot-setup-steps.yml jobs: # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. copilot-setup-steps: runs-on: ubuntu-latest # Set the permissions to the lowest permissions possible needed for your steps. # Copilot will be given its own token for its operations. permissions: # If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete. contents: read # You can define any steps you want, and they will run before the agent starts. # If you do not check out your code, Copilot will do this for you. steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - name: ⚙ Install prerequisites run: | ./init.ps1 -UpgradePrerequisites -NoNuGetCredProvider dotnet --info # Print mono version if it is present. if (Get-Command mono -ErrorAction SilentlyContinue) { mono --version } shell: pwsh ================================================ FILE: .github/workflows/docs.yml ================================================ name: 📚 Docs on: push: branches: - main # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: group: pages cancel-in-progress: false jobs: publish-docs: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: actions: read pages: write id-token: write contents: read environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - name: ⚙ Install prerequisites run: ./init.ps1 -UpgradePrerequisites - run: dotnet docfx docfx/docfx.json name: 📚 Generate documentation - name: Upload artifact uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: path: docfx/_site - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 ================================================ FILE: .github/workflows/docs_validate.yml ================================================ name: 📃 Docfx Validate on: push: branches: - main - microbuild workflow_dispatch: jobs: build: name: 📚 Doc validation runs-on: ubuntu-24.04 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - name: 🔗 Markup Link Checker (mlc) uses: becheran/mlc@7ec24825cefe0c9c8c6bac48430e1f69e3ec356e # v1.2.0 with: args: --do-not-warn-for-redirect-to https://learn.microsoft.com*,https://dotnet.microsoft.com/*,https://dev.azure.com/*,https://app.codecov.io/* -p docfx -i https://aka.ms/onboardsupport,https://aka.ms/spot,https://msrc.microsoft.com/*,https://www.microsoft.com/msrc*,https://microsoft.com/msrc*,https://www.npmjs.com/package/*,https://get.dot.net/ - name: ⚙ Install prerequisites run: | ./init.ps1 -UpgradePrerequisites dotnet --info shell: pwsh - name: 📚 Verify docfx build run: dotnet docfx docfx/docfx.json --warningsAsErrors --disableGitFeatures ================================================ FILE: .github/workflows/libtemplate-update.yml ================================================ name: ⛜ Library.Template update # PREREQUISITE: This workflow requires the repo to be configured to allow workflows to create pull requests. # Visit https://github.com/USER/REPO/settings/actions # Under "Workflow permissions" check "Allow GitHub Actions to create ...pull requests" # Click Save. on: schedule: - cron: "0 3 * * Mon" # Sun @ 8 or 9 PM Mountain Time (depending on DST) workflow_dispatch: jobs: merge: runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - name: merge id: merge shell: pwsh run: | $LibTemplateBranch = & ./tools/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } git fetch https://github.com/aarnott/Library.Template $LibTemplateBranch if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } $LibTemplateCommit = git rev-parse FETCH_HEAD git diff --stat ...FETCH_HEAD if ((git rev-list FETCH_HEAD ^HEAD --count) -eq 0) { Write-Host "There are no Library.Template updates to merge." echo "uptodate=true" >> $env:GITHUB_OUTPUT exit 0 } # Pushing commits that add or change files under .github/workflows will cause our workflow to fail. # But it usually isn't necessary because the target branch already has (or doesn't have) these changes. # So if the merge doesn't bring in any changes to these files, try the merge locally and push that # to keep github happy. if ((git rev-list FETCH_HEAD ^HEAD --count -- .github/workflows) -eq 0) { # Indeed there are no changes in that area. So merge locally to try to appease GitHub. git checkout -b auto/libtemplateUpdate git config user.name "Andrew Arnott" git config user.email "andrewarnott@live.com" git merge FETCH_HEAD if ($LASTEXITCODE -ne 0) { Write-Host "Merge conflicts prevent creating the pull request. Please run tools/MergeFrom-Template.ps1 locally and push the result as a pull request." exit 2 } git -c http.extraheader="AUTHORIZATION: bearer $env:GH_TOKEN" push origin -u HEAD } else { Write-Host "Changes to github workflows are included in this update. Please run tools/MergeFrom-Template.ps1 locally and push the result as a pull request." exit 1 } - name: pull request shell: pwsh if: success() && steps.merge.outputs.uptodate != 'true' run: | # If there is already an active pull request, don't create a new one. $existingPR = gh pr list -H auto/libtemplateUpdate --json url | ConvertFrom-Json if ($existingPR) { Write-Host "::warning::Skipping pull request creation because one already exists at $($existingPR[0].url)" exit 0 } $prTitle = "Merge latest Library.Template" $prBody = "This merges the latest features and fixes from [Library.Template's branch](https://github.com/AArnott/Library.Template/tree/). ⚠️ Do **not** squash this pull request when completing it. You must *merge* it.
Merge conflicts? Resolve merge conflicts locally by carrying out these steps: ``` git fetch git checkout auto/libtemplateUpdate git merge origin/main # resolve conflicts git commit git push ```
" gh pr create -H auto/libtemplateUpdate -b $prBody -t $prTitle env: GH_TOKEN: ${{ github.token }} ================================================ FILE: .gitignore ================================================ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore # User-specific files *.rsuser *.suo *.user *.userosscache *.sln.docstates *.lutconfig launchSettings.json # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Jetbrains Rider cache directory .idea/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp !Directory.Build.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # JustCode is a .NET coding add-in .JustCode # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Visual Studio code coverage results *.coverage *.coveragexml /coveragereport/ # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (https://github.com/github/gitignore/pull/2483#issue-259490424) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # dotnet tool local install directory .store/ # mac-created file to track user view preferences for a directory .DS_Store # Analysis results *.sarif # C# Dev Kit cache files *.lscache ================================================ FILE: .vscode/extensions.json ================================================ { // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp // List of extensions which should be recommended for users of this workspace. "recommendations": [ "ms-azure-devops.azure-pipelines", "ms-dotnettools.csharp", "k--kato.docomment", "editorconfig.editorconfig", "esbenp.prettier-vscode", "pflannery.vscode-versionlens", "davidanson.vscode-markdownlint", "dotjoshjohnson.xml", "ms-vscode-remote.remote-containers", "ms-azuretools.vscode-docker", "tintoy.msbuild-project-tools" ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [] } ================================================ FILE: .vscode/launch.json ================================================ { // Use IntelliSense to find out which attributes exist for C# debugging // Use hover for the description of the existing attributes // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md "version": "0.2.0", "configurations": [ { "name": ".NET Core Attach", "type": "coreclr", "request": "attach", "processId": "${command:pickProcess}" } ] } ================================================ FILE: .vscode/mcp.json ================================================ { "servers": { "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/" }, "azure-devops": { "type": "http", "url": "https://mcp.dev.azure.com/devdiv", "headers": { "X-MCP-Toolsets": "repos,pipelines,wit,wiki" } }, "microsoftdocs": { "type": "http", "url": "https://learn.microsoft.com/api/mcp" } } } ================================================ FILE: .vscode/settings.json ================================================ { "files.trimTrailingWhitespace": true, "files.insertFinalNewline": true, "files.trimFinalNewlines": true, "azure-pipelines.1ESPipelineTemplatesSchemaFile": true, "omnisharp.enableEditorConfigSupport": true, "omnisharp.enableRoslynAnalyzers": true, "dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true, "editor.formatOnSave": true, "[xml]": { "editor.wordWrap": "off" }, // Treat these files as Azure Pipelines files "files.associations": { "**/azure-pipelines/**/*.yml": "azure-pipelines", "azure-pipelines.yml": "azure-pipelines" }, // Use Prettier as the default formatter for Azure Pipelines files. // Needs to be explicitly configured: https://github.com/Microsoft/azure-pipelines-vscode#document-formatting "[azure-pipelines]": { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": false // enable this when they conform }, } ================================================ FILE: .vscode/tasks.json ================================================ { "version": "2.0.0", "tasks": [ { "label": "build", "command": "dotnet", "type": "process", "args": [ "build", "${workspaceFolder}", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], "problemMatcher": "$msCompile" } ] } ================================================ FILE: .vsts-ci.yml ================================================ trigger: branches: include: - main paths: exclude: - .github - doc - '*.md' schedules: - cron: "0 10 * * Sun" displayName: Weekly api-scan always: true branches: include: - main parameters: - name: RunApiScanTools displayName: Run API Scan? type: boolean default: false variables: NugetSecurityAnalysisWarningLevel: none ${{ if or(eq(parameters.RunApiScanTools, 'true'), eq(variables['Build.CronSchedule.DisplayName'], 'Weekly api-scan')) }}: RunAPIScan: true ${{ else }}: RunAPIScan: false Codeql.Enabled: true Codeql.TSAEnabled: true Codeql.TSAOptionsPath: $(Build.SourcesDirectory)\azure-pipelines\TSAOptions.json resources: repositories: - repository: MicroBuildTemplate type: git name: 1ESPipelineTemplates/MicroBuildTemplate ref: refs/tags/release extends: template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate parameters: sdl: sourceAnalysisPool: name: VSEngSS-MicroBuild2022-1ES image: server2022-microbuildVS2022-1es pool: name: VSEngSS-MicroBuild2022-1ES image: server2022-microbuildVS2022-1es os: windows customBuildTags: - ES365AIMigrationTooling stages: - stage: stage jobs: - job: job templateContext: mb: signing: enabled: true signType: $(SignType) zipSources: false outputs: - output: pipelineArtifact displayName: 'Publish Artifact: build logs' condition: succeededOrFailed() targetPath: $(Build.ArtifactStagingDirectory)/build_logs artifactName: build_logs artifactType: Container - output: pipelineArtifact displayName: 'Publish Artifact: symbols' condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) targetPath: '$(Build.ArtifactStagingDirectory)/symbols' artifactName: symbols publishLocation: Container - output: pipelineArtifact displayName: 'Publish packages' condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) targetPath: $(Build.ArtifactStagingDirectory)/packages artifactName: packages artifactType: Container - output: nuget displayName: 'Publish Sdk NuGet packages to VSTS feeds' condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) packageParentPath: '$(Build.ArtifactStagingDirectory)' searchPatternPush: 'bin/$(BuildConfiguration)/packages/*.nupkg' publishVstsFeed: $(feedGuid) allowPackageConflicts: true steps: - task: ComponentGovernanceComponentDetection@0 inputs: scanType: 'Register' verbosity: 'Verbose' alertWarningLevel: 'High' - task: PowerShell@2 displayName: Set VSTS variables inputs: targetType: inline script: | if ($env:SignType -eq 'Real') { $feedGuid = '09d8d03c-1ac8-456e-9274-4d2364527d99' ## VSIDE-RealSigned-Release } else { $feedGuid = 'da484c78-f942-44ef-b197-99e2a1bef53c' ## VSIDE-TestSigned-Release } Write-Host "##vso[task.setvariable variable=feedGuid]$feedGuid" $SkipPublishingNetworkArtifacts = 'true' ## Network artifacts not allowed on Scale Set Pool Write-Host "##vso[task.setvariable variable=SkipPublishingNetworkArtifacts]$SkipPublishingNetworkArtifacts" if ($env:ComputerName.StartsWith('factoryvm', [StringComparison]::OrdinalIgnoreCase)) { Write-Host "Running on hosted queue" Write-Host "##vso[task.setvariable variable=Hosted]true" } - task: CmdLine@2 inputs: script: | del /s /q "bin" displayName: Purge bin - task: NuGetToolInstaller@0 displayName: Pin nuget.exe version inputs: versionSpec: 6.4.0 - task: AntiMalware@4 displayName: 'Run MpCmdRun.exe' inputs: InputType: Basic ScanType: CustomScan FileDirPath: '$(Build.StagingDirectory)' DisableRemediation: false - task: NuGetAuthenticate@1 displayName: 'NuGet Authenticate' inputs: forceReinstallCredentialProvider: true - task: VSBuild@1 inputs: solution: 'src\SlowCheetah.sln' msbuildArgs: /t:Restore platform: $(BuildPlatform) configuration: $(BuildConfiguration) displayName: Restore SlowCheetah solution - task: VSBuild@1 inputs: solution: 'src\SlowCheetah.sln' msbuildArgs: '/bl:"$(Build.ArtifactStagingDirectory)/build_logs/slowcheetah.binlog"' platform: $(BuildPlatform) configuration: $(BuildConfiguration) displayName: Build SlowCheetah solution - task: MicroBuildCodesignVerify@3 inputs: TargetFolders: | $(Build.SourcesDirectory)\bin\$(BuildConfiguration)\packages ApprovalListPathForCerts: $(Build.SourcesDirectory)\src\build\no_authenticode.txt ApprovalListPathForSigs: $(Build.SourcesDirectory)\src\build\no_strongname.txt displayName: Verify code signing condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) - task: VSTest@2 inputs: testFiltercriteria: TestCategory!=FailsInCloudTest searchFolder: $(System.DefaultWorkingDirectory)\bin\ testAssemblyVer2: | $(BuildConfiguration)\**\*test*.dll !**\obj\** platform: $(BuildPlatform) configuration: $(BuildConfiguration) displayName: Run Tests condition: and(succeeded(), ne(variables['SignType'], 'real')) - task: PoliCheck@2 displayName: 'Run PoliCheck' inputs: targetType: F condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) - task: ManifestGeneratorTask@0 inputs: BuildDropPath: $(Build.ArtifactStagingDirectory)/build_logs - task: BinSkim@4 displayName: Run BinSkim inputs: InputType: 'Basic' Function: 'analyze' TargetPattern: 'guardianGlob' AnalyzeTargetGlob: 'bin/$(BuildConfiguration)/net472/Microsoft.VisualStudio.SlowCheetah*.dll;' - task: CopyFiles@2 displayName: 'Copy Files for APIScan' inputs: SourceFolder: 'bin/$(BuildConfiguration)/net472/' Contents: | **/Microsoft.VisualStudio.SlowCheetah*.dll **/Microsoft.VisualStudio.SlowCheetah*.pdb TargetFolder: $(Agent.TempDirectory)\APIScanFiles condition: and(succeeded(), eq(variables['RunAPIScan'], 'true')) - task: APIScan@2 displayName: Run APIScan inputs: softwareFolder: $(Agent.TempDirectory)\APIScanFiles softwareName: 'Slowcheetah' softwareVersionNum: '$(Build.BuildId)' isLargeApp: false toolVersion: 'Latest' condition: and(succeeded(), eq(variables['RunAPIScan'], 'true')) env: AzureServicesAuthConnectionString: RunAs=App;AppId=$(ApiScanClientId) - task: PublishSecurityAnalysisLogs@3 displayName: 'Publish Guardian Artifacts' inputs: ArtifactName: CodeAnalysisLogs ArtifactType: Container PublishProcessedResults: false AllTools: true - task: TSAUpload@2 displayName: 'Create bugs for APIScan' inputs: GdnPublishTsaOnboard: true GdnPublishTsaConfigFile: '$(Build.SourcesDirectory)\azure-pipelines\TSAOptions.json' condition: eq(variables['RunApiScan'], 'true') - task: CopyFiles@1 displayName: Collecting symbols artifacts inputs: SourceFolder: bin/$(BuildConfiguration)/net472 Contents: | **/Microsoft.VisualStudio.SlowCheetah?(*.dll|*.pdb|*.xml) !**/*Test* TargetFolder: $(Build.ArtifactStagingDirectory)/symbols condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) - task: MicroBuildArchiveSymbols@5 displayName: 🔣 Archive symbols to Symweb inputs: SymbolsFeatureName: $(SymbolsFeatureName) SymbolsProject: VS condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'), eq(variables['SignType'], 'real')) - task: CopyFiles@1 displayName: Collecting packages inputs: SourceFolder: bin/$(BuildConfiguration)/packages Contents: | *.nupkg *.vsix TargetFolder: $(Build.ArtifactStagingDirectory)/packages flattenFolders: false condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Microsoft Open Source Code of Conduct This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). Resources: - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns ================================================ FILE: CONTRIBUTING.md ================================================ # Microsoft.VisualStudio.SlowCheetah This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ## Pull requests When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. ## Prerequisites All dependencies can be installed by running the `init.ps1` script at the root of the repository using Windows PowerShell or [PowerShell Core][pwsh] (on any OS). Some dependencies installed by `init.ps1` may only be discoverable from the same command line environment the init script was run from due to environment variables, so be sure to launch Visual Studio or build the repo from that same environment. Alternatively, run `init.ps1 -InstallLocality Machine` (which may require elevation) in order to install dependencies at machine-wide locations so Visual Studio and builds work everywhere. The only prerequisite for building, testing, and deploying from this repository is the [.NET SDK](https://get.dot.net/). You should install the version specified in `global.json` or a later version within the same major.minor.Bxx "hundreds" band. For example if 2.2.300 is specified, you may install 2.2.300, 2.2.301, or 2.2.310 while the 2.2.400 version would not be considered compatible by .NET SDK. See [.NET Core Versioning](https://learn.microsoft.com/dotnet/core/versions/) for more information. ## Package restore The easiest way to restore packages may be to run `init.ps1` which automatically authenticates to the feeds that packages for this repo come from, if any. `dotnet restore` or `nuget restore` also work but may require extra steps to authenticate to any applicable feeds. ## Building This repository can be built on Windows, Linux, and OSX. Building, testing, and packing this repository can be done by using the standard dotnet CLI commands (e.g. `dotnet build`, `dotnet test`, `dotnet pack`, etc.). [pwsh]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell ## Releases Use `nbgv tag` to create a tag for a particular commit that you mean to release. [Learn more about `nbgv` and its `tag` and `prepare-release` commands](https://dotnet.github.io/Nerdbank.GitVersioning/docs/nbgv-cli.html). Push the tag. ### GitHub Actions When your repo is hosted by GitHub and you are using GitHub Actions, you should create a GitHub Release using the standard GitHub UI. Having previously used `nbgv tag` and pushing the tag will help you identify the precise commit and name to use for this release. After publishing the release, the `.github/workflows/release.yml` workflow will be automatically triggered, which will: 1. Find the most recent `.github/workflows/build.yml` GitHub workflow run of the tagged release. 1. Upload the `deployables` artifact from that workflow run to your GitHub Release. 1. If you have `NUGET_API_KEY` defined as a secret variable for your repo or org, any nuget packages in the `deployables` artifact will be pushed to nuget.org. ### Azure Pipelines When your repo builds with Azure Pipelines, use the `azure-pipelines/release.yml` pipeline. Trigger the pipeline by adding the `auto-release` tag on a run of your main `azure-pipelines.yml` pipeline. ## Tutorial and API documentation API and hand-written docs are found under the `docfx/` directory and are built by [docfx](https://dotnet.github.io/docfx/). You can make changes and host the site locally to preview them by switching to that directory and running the `dotnet docfx --serve` command. After making a change, you can rebuild the docs site while the localhost server is running by running `dotnet docfx` again from a separate terminal. The `.github/workflows/docs.yml` GitHub Actions workflow publishes the content of these docs to github.io if the workflow itself and [GitHub Pages is enabled for your repository](https://docs.github.com/en/pages/quickstart). ## Updating dependencies This repo uses Renovate to keep dependencies current. Configuration is in the `.github/renovate.json` file. [Learn more about configuring Renovate](https://docs.renovatebot.com/configuration-options/). When changing the renovate.json file, follow [these validation steps](https://docs.renovatebot.com/config-validation/). If Renovate is not creating pull requests when you expect it to, check that the [Renovate GitHub App](https://github.com/apps/renovate) is configured for your account or repo. ## Merging latest from Library.Template ### Maintaining your repo based on this template The best way to keep your repo in sync with Library.Template's evolving features and best practices is to periodically merge the template into your repo: ```ps1 git fetch git checkout origin/main ./tools/MergeFrom-Template.ps1 # resolve any conflicts, then commit the merge commit. git push origin -u HEAD ``` ================================================ FILE: CodeQL.yml ================================================ path_classifiers: library: - 'test/**' ================================================ FILE: Directory.Build.props ================================================ Debug $(MSBuildThisFileDirectory) $(RepoRootPath)obj\$([MSBuild]::MakeRelative($(RepoRootPath), $(MSBuildProjectDirectory)))\ $(RepoRootPath)bin\$(MSBuildProjectName)\ $(RepoRootPath)bin\Packages\$(Configuration)\NuGet\ $(RepoRootPath)bin\Packages\$(Configuration)\Vsix\$(Platform)\ $(RepoRootPath)bin\Packages\$(Configuration)\Vsix\ $(VSIXOutputPath) enable enable latest true true true true true true true $(MSBuildThisFileDirectory) embedded https://github.com/microsoft/slow-cheetah Microsoft Microsoft © Microsoft Corporation. All rights reserved. MIT true true true snupkg 14 16.9 $(RepositoryUrl)/releases/tag/v$(Version) ================================================ FILE: Directory.Build.rsp ================================================ #------------------------------------------------------------------------------ # This file contains command-line options that MSBuild will process as part of # every build, unless the "/noautoresponse" switch is specified. # # MSBuild processes the options in this file first, before processing the # options on the command line. As a result, options on the command line can # override the options in this file. However, depending on the options being # set, the overriding can also result in conflicts. # # NOTE: The "/noautoresponse" switch cannot be specified in this file, nor in # any response file that is referenced by this file. #------------------------------------------------------------------------------ /nr:false /m /verbosity:minimal /clp:Summary;ForceNoAlign ================================================ FILE: Directory.Build.targets ================================================ ================================================ FILE: Directory.Packages.props ================================================ true true 2.2.2 2.0.226 ================================================ FILE: LICENSE ================================================ Microsoft.VisualStudio.SlowCheetah Copyright (c) Microsoft Corporation All rights reserved. MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # slow-cheetah [![NuGet package](https://img.shields.io/nuget/v/Microsoft.VisualStudio.SlowCheetah.svg)](https://nuget.org/packages/Microsoft.VisualStudio.SlowCheetah) [![Build status](https://ci.appveyor.com/api/projects/status/qqvu367widkayo05/branch/master?svg=true)](https://ci.appveyor.com/project/jviau/slow-cheetah/branch/master) Transformations for XML files (such as app.config) and JSON files. Includes two primary components: 1. NuGet package that adds an msbuild task to perform transforms on build. 2. Visual Studio extension for generating and previewing transforms. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ## Supported Platforms * Visual Studio 2022: [SlowCheetah VS 2022 Extension](https://marketplace.visualstudio.com/items?itemName=vscps.SlowCheetah-XMLTransforms-VS2022) (version 4.x) * Visual Studio 2015-2019: [SlowCheetah VS 2015-2019 Extension](https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.SlowCheetah-XMLTransforms) (version 3.x) ## Supported File Types SlowCheetah supports transformations for XML files, specified by [XDT](https://msdn.microsoft.com/en-us/library/dd465326(v=vs.110).aspx) and for JSON files, specified by [JDT](https://github.com/Microsoft/json-document-transforms). Transform files created by the extension follow these formats. ## Features Perform transformations of XML and JSON files on build per configuration and publish profiles. Quickly add and preview transformations to a file in the project. ## [How to Perform Transformations](doc/transforming_files.md) ## Trademarks This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies. ================================================ FILE: Restore.cmd ================================================ @echo off WHERE /q msbuild IF ERRORLEVEL 1 ( ECHO Error: Could not find msbuild. Make sure msbuild is in the PATH and try again. EXIT /B %ERRORLEVEL% ) msbuild /t:restore %~dp0\src\SlowCheetah.sln ================================================ FILE: SECURITY.md ================================================ ## Security Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://learn.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. ## Reporting Security Issues **Please do not report security vulnerabilities through public GitHub issues.** Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/msrc/pgp-key-msrc). You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) * Full paths of source file(s) related to the manifestation of the issue * The location of the affected source code (tag/branch/commit or direct URL) * Any special configuration required to reproduce the issue * Step-by-step instructions to reproduce the issue * Proof-of-concept or exploit code (if possible) * Impact of the issue, including how an attacker might exploit the issue This information will help us triage your report more quickly. If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. ## Preferred Languages We prefer all communications to be in English. ## Policy Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/msrc/cvd). ================================================ FILE: SUPPORT.md ================================================ # Support ## How to file issues and get help This project uses GitHub Issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new Issue. For help and questions about using this project, please create an issue. ## Microsoft Support Policy Support for this **slow-cheetah** is limited to the resources listed above. ================================================ FILE: ThirdPartyNotices.txt ================================================ NOTICES AND INFORMATION Do Not Translate or Localize This software incorporates material from third parties. Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, or you may send a check or money order for US $5.00, including the product name, the open source component name, platform, and version number, to: Source Code Compliance Team Microsoft Corporation One Microsoft Way Redmond, WA 98052 USA Notwithstanding any other terms, you may reverse engineer this software to the extent required to debug changes to any libraries licensed under the GNU Lesser General Public License. --------------------------------------------------------- StyleCop.Analyzers 1.0.0 - Apache-2.0 Copyright Sam Harwell 2015 Copyright James Newton-King 2008 GetCopyrightText copyrightText WithDocumentText copyrightText CircularReference InvalidReference Copyright Sam Harwell 2015 StyleCop DotNetAnalyzers Roslyn Diagnostic Analyzer Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --------------------------------------------------------- ================================================ FILE: appveyor.yml ================================================ # Notes: # - Minimal appveyor.yml file is an empty file. All sections are optional. # - Indent each level of configuration with 2 spaces. Do not use tabs! # - All section names are case-sensitive. # - Section names should be unique on each level. #---------------------------------# # general configuration # #---------------------------------# # version format version: 1.0.{build} #---------------------------------# # environment configuration # #---------------------------------# # Build worker image (VM template) image: Visual Studio 2017 skip_tags: true branches: only: - master environment: DeployExtension: false Package: true cache: - packages -> **\packages.config configuration: Release #---------------------------------# # build configuration # #---------------------------------# before_build: nuget restore src build: project: src\SlowCheetah.sln # path to Visual Studio solution or project verbosity: normal # MSBuild verbosity level #---------------------------------# # test configuration # #---------------------------------# test: assemblies: - '**\*tests.dll' #---------------------------------# # artifact configuration # #---------------------------------# artifacts: - path: 'bin\**\packages\Microsoft.VisualStudio.SlowCheetah*.nupkg' name: Nuget Package - path: 'bin\**\packages\Microsoft.VisualStudio.SlowCheetah*.vsix' name: VSIX Package ================================================ FILE: azure-pipelines/Archive-SourceCode.ps1 ================================================ #Requires -PSEdition Core -Version 7 <# .SYNOPSIS Submits a source archival request for this repo. .PARAMETER Requester The alias for the user requesting this backup. .PARAMETER ManagerAlias The alias of the manager that owns the repo. .PARAMETER TeamAlias The alias of the team that owns the repo. .PARAMETER BusinessGroupName A human-readable title for your team or business group. .PARAMETER ProductionType .PARAMETER ReleaseType The type of release being backed up. .PARAMETER ReleaseDate The date of the release of your software. Defaults to today. .PARAMETER OwnerAlias The alias of the owner. .PARAMETER OS .PARAMETER ProductLanguage One or more languages. .PARAMETER Notes Any notes to record with the backup. .PARAMETER FileCollection One or more collections to archive. .PARAMETER ProductName The name of the product. This will default to the repository name. .PARAMETER RepoUrl The URL to the repository. This will default to the repository containing this script. .PARAMETER BackupType The kind of backup to be performed. .PARAMETER ServerPath The UNC path to the server to be backed up (if applicable). .PARAMETER SourceCodeArchivalUri The URI to POST the source code archival request to. This value will typically come automatically by a variable group associated with your pipeline. You can also look it up at https://dpsopsrequestforms.azurewebsites.net/#/help -> SCA Request Help -> SCA API Help -> Description #> [CmdletBinding(SupportsShouldProcess = $true, PositionalBinding = $false)] param ( [Parameter()] [string]$Requester, [Parameter(Mandatory = $true)] [string]$ManagerAlias, [Parameter(Mandatory = $true)] [string]$TeamAlias, [Parameter(Mandatory = $true)] [string]$BusinessGroupName, [Parameter()] [string]$ProductionType = 'Visual Studio', [Parameter()] [string]$ReleaseType = 'RTW', [Parameter()] [DateTime]$ReleaseDate = [DateTime]::Today, [Parameter()] [string]$OwnerAlias, [Parameter()] [ValidateSet('64-Bit Win', '32-Bit Win', 'Linux', 'Mac', '64-Bit ARM', '32-Bit ARM')] [string[]]$OS = @('64-Bit Win'), [Parameter(Mandatory = $true)] [ValidateSet('English', 'Chinese Simplified', 'Chinese Traditional', 'Czech', 'French', 'German', 'Italian', 'Japanese', 'Korean', 'Polish', 'Portuguese', 'Russian', 'Spanish', 'Turkish')] [string[]]$ProductLanguage, [Parameter()] [string]$Notes = '', [Parameter()] [ValidateSet('Binaries', 'Localization', 'Source Code')] [string[]]$FileCollection = @('Source Code'), [Parameter()] [string]$ProductName, [Parameter()] [Uri]$RepoUrl, [Parameter()] [ValidateSet('Server Path', 'Code Repo(Git URL/AzureDevOps)', 'Git', 'Azure Storage Account')] [string]$BackupType = 'Code Repo(Git URL/AzureDevOps)', [Parameter()] [string]$ServerPath = '', [Parameter()] [Uri]$SourceCodeArchivalUri = $env:SOURCECODEARCHIVALURI, [Parameter(Mandatory = $true)] [string]$AccessToken ) function Invoke-Git() { # Make sure we invoke git from within the repo. Push-Location $PSScriptRoot try { return (git $args) } finally { Pop-Location } } if (!$ProductName) { if ($env:BUILD_REPOSITORY_NAME) { Write-Verbose 'Using $env:BUILD_REPOSITORY_NAME for ProductName.' # single quotes are intentional so user sees the name of env var. $ProductName = $env:BUILD_REPOSITORY_NAME } else { $originUrl = [Uri](Invoke-Git remote get-url origin) if ($originUrl) { $lastPathSegment = $originUrl.Segments[$originUrl.Segments.Length - 1] if ($lastPathSegment.EndsWith('.git')) { $lastPathSegment = $lastPathSegment.Substring(0, $lastPathSegment.Length - '.git'.Length) } Write-Verbose 'Using origin remote URL to derive ProductName.' $ProductName = $lastPathSegment } } if (!$ProductName) { Write-Error "Unable to determine default value for -ProductName." } } if (!$OwnerAlias) { if ($env:BUILD_REQUESTEDFOREMAIL) { Write-Verbose 'Using $env:BUILD_REQUESTEDFOREMAIL and slicing to just the alias for OwnerAlias.' $OwnerAlias = ($env:BUILD_REQUESTEDFOREMAIL -split '@')[0] } else { $OwnerAlias = $TeamAlias } if (!$OwnerAlias) { Write-Error "Unable to determine default value for -OwnerAlias." } } if (!$Requester) { if ($env:BUILD_REQUESTEDFOREMAIL) { Write-Verbose 'Using $env:BUILD_REQUESTEDFOREMAIL and slicing to just the alias for Requester.' $Requester = ($env:BUILD_REQUESTEDFOREMAIL -split '@')[0] } else { Write-Verbose 'Using $env:USERNAME for Requester.' $Requester = $env:USERNAME } if (!$Requester) { $Requester = $OwnerAlias } } if (!$RepoUrl) { $RepoUrl = $env:BUILD_REPOSITORY_URI if (!$RepoUrl) { $originUrl = [Uri](Invoke-Git remote get-url origin) if ($originUrl) { Write-Verbose 'Using git origin remote url for GitURL.' $RepoUrl = $originUrl } if (!$RepoUrl) { Write-Error "Unable to determine default value for -RepoUrl." } } } Push-Location $PSScriptRoot $versionsObj = dotnet nbgv get-version -f json | ConvertFrom-Json Pop-Location $ReleaseDateString = $ReleaseDate.ToShortDateString() $Version = $versionsObj.Version $BackupSize = Get-ChildItem $PSScriptRoot\..\.git -Recurse -File | Measure-Object -Property Length -Sum $DataSizeMB = [int]($BackupSize.Sum / 1mb) $FileCount = $BackupSize.Count $Request = @{ "Requester" = $Requester "Manager" = $ManagerAlias "TeamAlias" = $TeamAlias "AdditionalContacts" = $AdditionalContacts "BusinessGroupName" = $BusinessGroupName "ProductName" = $ProductName "Version" = $Version "ProductionType" = $ProductionType "ReleaseType" = $ReleaseType "ReleaseDateString" = $ReleaseDateString "OS" = [string]::Join(',', $OS) "ProductLanguage" = [string]::Join(',', $ProductLanguage) "FileCollection" = [string]::Join(',', $FileCollection) "OwnerAlias" = $OwnerAlias "Notes" = $Notes.Trim() "CustomerProvidedDataSizeMB" = $DataSizeMB "CustomerProvidedFileCount" = $FileCount "BackupType" = $BackupType "ServerPath" = $ServerPath "AzureStorageAccount" = $AzureStorageAccount "AzureStorageContainer" = $AzureStorageContainer "GitURL" = $RepoUrl } $RequestJson = ConvertTo-Json $Request Write-Host "SCA request:`n$RequestJson" if ($PSCmdlet.ShouldProcess('source archival request', 'post')) { if (!$SourceCodeArchivalUri) { Write-Error "Unable to post request without -SourceCodeArchivalUri parameter." exit 1 } $headers = @{ 'Authorization' = "Bearer $AccessToken" } [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $Response = Invoke-WebRequest -Uri $SourceCodeArchivalUri -Method POST -Headers $headers -Body $RequestJson -ContentType "application/json" -UseBasicParsing -SkipHttpErrorCheck Write-Host "Status Code : " -NoNewline if ($Response.StatusCode -eq 200) { Write-Host $Response.StatusCode -ForegroundColor Green Write-Host "Ticket ID : " -NoNewline $responseContent = ConvertFrom-Json ($Response.Content) Write-Host $responseContent } else { Write-Host $Response.StatusCode -ForegroundColor Red try { $responseContent = ConvertFrom-Json $Response.Content Write-Host "Message : $($responseContent.message)" } catch { Write-Host "JSON Parse Error: $($_.Exception.Message)" Write-Host "Raw response content:" Write-Host $Response.Content } exit 2 } } elseif ($SourceCodeArchivalUri) { Write-Host "Would have posted to $SourceCodeArchivalUri" } ================================================ FILE: azure-pipelines/BuildStageVariables.yml ================================================ variables: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true BuildConfiguration: Release NUGET_PACKAGES: $(Agent.TempDirectory)/.nuget/packages/ ================================================ FILE: azure-pipelines/Get-InsertionPRId.ps1 ================================================ <# .SYNOPSIS Look up the pull request URL of the insertion PR. #> $stagingFolder = $env:BUILD_STAGINGDIRECTORY if (!$stagingFolder) { $stagingFolder = $env:SYSTEM_DEFAULTWORKINGDIRECTORY if (!$stagingFolder) { Write-Error "This script must be run in an Azure Pipeline." exit 1 } } $markdownFolder = Join-Path $stagingFolder (Join-Path 'MicroBuild' 'Output') $markdownFile = Join-Path $markdownFolder 'PullRequestUrl.md' if (!(Test-Path $markdownFile)) { Write-Error "This script should be run after the MicroBuildInsertVsPayload task." exit 2 } $insertionPRUrl = Get-Content $markdownFile if (!($insertionPRUrl -match 'https:.+?/pullrequest/(\d+)')) { Write-Error "Failed to parse pull request URL: $insertionPRUrl" exit 3 } $Matches[1] ================================================ FILE: azure-pipelines/GlobalVariables.yml ================================================ variables: # These variables are required for MicroBuild tasks TeamName: VS IDE TeamEmail: vsidemicrobuild@microsoft.com # These variables influence insertion pipelines ContainsVsix: false # This should be true when the repo builds a VSIX that should be inserted to VS. ================================================ FILE: azure-pipelines/Merge-CodeCoverage.ps1 ================================================ #!/usr/bin/env pwsh <# .SYNOPSIS Merges code coverage reports. .PARAMETER Path The path(s) to search for Cobertura code coverage reports. .PARAMETER Format The format for the merged result. The default is Cobertura .PARAMETER OutputDir The directory the merged result will be written to. The default is `coveragereport` in the root of this repo. #> [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [string[]]$Path, [ValidateSet('Badges', 'Clover', 'Cobertura', 'CsvSummary', 'Html', 'Html_Dark', 'Html_Light', 'HtmlChart', 'HtmlInline', 'HtmlInline_AzurePipelines', 'HtmlInline_AzurePipelines_Dark', 'HtmlInline_AzurePipelines_Light', 'HtmlSummary', 'JsonSummary', 'Latex', 'LatexSummary', 'lcov', 'MarkdownSummary', 'MHtml', 'PngChart', 'SonarQube', 'TeamCitySummary', 'TextSummary', 'Xml', 'XmlSummary')] [string]$Format='Cobertura', [string]$OutputFile=("$PSScriptRoot/../coveragereport/merged.cobertura.xml") ) $RepoRoot = [string](Resolve-Path $PSScriptRoot/..) Push-Location $RepoRoot try { Write-Verbose "Searching $Path for *.cobertura.xml files" $reports = Get-ChildItem -Recurse $Path -Filter *.cobertura.xml if ($reports) { $reports |% { $_.FullName } |% { # In addition to replacing {reporoot}, we also normalize on one kind of slash so that the report aggregates data for a file whether data was collected on Windows or not. Write-Verbose "Processing $_" $xml = [xml](Get-Content -LiteralPath $_) $xml.coverage.packages.package.classes.class |? { $_.filename} |% { $_.filename = $_.filename.Replace('{reporoot}', $RepoRoot).Replace([IO.Path]::AltDirectorySeparatorChar, [IO.Path]::DirectorySeparatorChar) } $xml.Save($_) } $Inputs = $reports |% { Resolve-Path -relative $_.FullName } if ((Split-Path $OutputFile) -and -not (Test-Path (Split-Path $OutputFile))) { New-Item -Type Directory -Path (Split-Path $OutputFile) | Out-Null } & dotnet dotnet-coverage merge $Inputs -o $OutputFile -f cobertura } else { Write-Error "No reports found to merge." } } finally { Pop-Location } ================================================ FILE: azure-pipelines/NuGetSbom.props ================================================ true 2 ================================================ FILE: azure-pipelines/PoliCheckExclusions.xml ================================================ NODE_MODULES|.STORE ================================================ FILE: azure-pipelines/PostPRMessage.ps1 ================================================ [CmdletBinding(SupportsShouldProcess = $true)] param( [Parameter(Mandatory=$true)] $AccessToken, [Parameter(Mandatory=$true)] $Markdown, [ValidateSet('Active','ByDesign','Closed','Fixed','Pending','Unknown','WontFix')] $CommentState='Active' ) # See https://learn.microsoft.com/dotnet/api/microsoft.teamfoundation.sourcecontrol.webapi.commentthreadstatus if ($CommentState -eq 'Active') { $StatusCode = 1 } elseif ($CommentState -eq 'ByDesign') { $StatusCode = 5 } elseif ($CommentState -eq 'Closed') { $StatusCode = 4 } elseif ($CommentState -eq 'Fixed') { $StatusCode = 2 } elseif ($CommentState -eq 'Pending') { $StatusCode = 6 } elseif ($CommentState -eq 'Unknown') { $StatusCode = 0 } elseif ($CommentState -eq 'WontFix') { $StatusCode = 3 } # Build the JSON body up $body = ConvertTo-Json @{ comments = @(@{ parentCommentId = 0 content = $Markdown commentType = 1 }) status = $StatusCode } Write-Verbose "Posting JSON payload: `n$Body" # Post the message to the Pull Request # https://learn.microsoft.com/rest/api/azure/devops/git/pull-request-threads $url = "$($env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)$env:SYSTEM_TEAMPROJECTID/_apis/git/repositories/$($env:BUILD_REPOSITORY_NAME)/pullRequests/$($env:SYSTEM_PULLREQUEST_PULLREQUESTID)/threads?api-version=5.1" if ($PSCmdlet.ShouldProcess($url, 'Post comment via REST call')) { try { if (!$env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI) { Write-Error "Posting to the pull request requires that the script is running in an Azure Pipelines context." exit 1 } Write-Host "Posting PR comment to: $url" Invoke-RestMethod -Uri $url -Method POST -Headers @{Authorization = "Bearer $AccessToken"} -Body $Body -ContentType application/json } catch { Write-Error $_ Write-Error $_.Exception.Message exit 2 } } ================================================ FILE: azure-pipelines/TSAOptions.json ================================================ { "tsaVersion": "TsaV2", "codebase": "NewOrUpdate", "codebaseName": "SlowCheetah", "tsaStamp": "DevDiv", "tsaEnvironment": "PROD", "notificationAliases": [ "vsslnx@microsoft.com" ], "codebaseAdmins": [ "REDMOND\\tevinstanley" ], "instanceUrl": "https://devdiv.visualstudio.com", "projectName": "DevDiv", "areaPath": "DevDiv\\VS Core\\Project\\SlowCheetah", "iterationPath": "DevDiv", "tools": [ "APIScan", "CodeQL" ], "repositoryName": "SlowCheetah" } ================================================ FILE: azure-pipelines/WIFtoPATauth.yml ================================================ parameters: - name: deadPATServiceConnectionId # The GUID of the PAT-based service connection whose access token must be replaced. type: string - name: wifServiceConnectionName # The name of the WIF service connection to use to get the access token. type: string - name: resource # The scope for which the access token is requested. type: string default: 499b84ac-1321-427f-aa17-267ca6975798 # Azure Artifact feeds (any of them) steps: - task: AzureCLI@2 displayName: 🔏 Authenticate with WIF service connection inputs: azureSubscription: ${{ parameters.wifServiceConnectionName }} scriptType: pscore scriptLocation: inlineScript inlineScript: | $accessToken = az account get-access-token --query accessToken --resource '${{ parameters.resource }}' -o tsv # Set the access token as a secret, so it doesn't get leaked in the logs Write-Host "##vso[task.setsecret]$accessToken" # Override the apitoken of the nuget service connection, for the duration of this stage Write-Host "##vso[task.setendpoint id=${{ parameters.deadPATServiceConnectionId }};field=authParameter;key=apitoken]$accessToken" ================================================ FILE: azure-pipelines/apiscan.yml ================================================ parameters: - name: windowsPool type: object - name: RealSign type: boolean jobs: - job: apiscan displayName: APIScan dependsOn: Windows pool: ${{ parameters.windowsPool }} timeoutInMinutes: 120 templateContext: ${{ if not(parameters.RealSign) }}: mb: signing: # if the build is test-signed, install the signing plugin so that CSVTestSignPolicy.xml is available enabled: true zipSources: false signType: test outputs: - output: pipelineArtifact displayName: 📢 collect apiscan artifact targetPath: $(Pipeline.Workspace)/.gdn/.r/apiscan/001/Logs artifactName: apiscan-logs condition: succeededOrFailed() variables: - name: SymbolsFeatureName value: $[ dependencies.Windows.outputs['SetPipelineVariables.SymbolsFeatureName'] ] - name: NBGV_MajorMinorVersion value: $[ dependencies.Windows.outputs['nbgv.NBGV_MajorMinorVersion'] ] - ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: # https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/25351/APIScan-step-by-step-guide-to-setting-up-a-Pipeline - group: VSEng sponsored APIScan # Expected to provide ApiScanClientId steps: # We need TSAOptions.json - checkout: self fetchDepth: 1 - download: current artifact: APIScanInputs displayName: 🔻 Download APIScanInputs artifact - task: APIScan@2 displayName: 🔍 Run APIScan inputs: softwareFolder: $(Pipeline.Workspace)/APIScanInputs softwareName: $(SymbolsFeatureName) softwareVersionNum: $(NBGV_MajorMinorVersion) isLargeApp: false toolVersion: Latest preserveLogsFolder: true azureSubscription: VSEng-APIScanSC env: AzureServicesAuthConnectionString: $(APIScanAuthConnectionString) SYSTEM_ACCESSTOKEN: $(System.AccessToken) # File bugs when APIScan finds issues - task: TSAUpload@2 displayName: 🪳 TSA upload inputs: GdnPublishTsaOnboard: True GdnPublishTsaConfigFile: $(Build.SourcesDirectory)\azure-pipelines\TSAOptions.json condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) ================================================ FILE: azure-pipelines/archive-sourcecode.yml ================================================ trigger: none # We only want to trigger manually or based on resources pr: none # Source archival requirements come from a compliance tenet. Review a sample task here: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1550985 # Source code should be archived within 30 days of the release date, and at least every quarter if your product is releasing more than once every 6 months. # If your sources on GitHub are public open source project, then using GitHub Public Archive is sufficient. schedules: - cron: "13 13 13 */3 *" # Every three months displayName: Periodic source archival branches: include: - main resources: repositories: - repository: MicroBuildTemplate type: git name: 1ESPipelineTemplates/MicroBuildTemplate ref: refs/tags/release parameters: - name: notes displayName: Notes to include in the SCA request type: string default: ' ' # optional parameters require a non-empty default. - name: whatif displayName: Only simulate the request type: boolean default: false variables: - group: VS Core team # Expected to provide ManagerAlias, SourceCodeArchivalUri - template: GlobalVariables.yml extends: template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate parameters: sdl: sourceAnalysisPool: VSEng-MicroBuildVSStable stages: - stage: archive jobs: - job: archive pool: name: AzurePipelines-EO demands: - ImageOverride -equals 1ESPT-Ubuntu22.04 os: Linux steps: - checkout: self clean: true fetchDepth: 0 - powershell: tools/Install-DotNetSdk.ps1 displayName: ⚙ Install .NET SDK - task: NuGetAuthenticate@1 displayName: 🔏 Authenticate NuGet feeds inputs: forceReinstallCredentialProvider: true - script: dotnet tool restore displayName: ⚙️ Restore CLI tools - powershell: tools/variables/_define.ps1 failOnStderr: true displayName: ⚙ Set pipeline variables based on source - task: AzureCLI@2 displayName: 🔏 Authenticate with WIF service connection inputs: azureSubscription: VS Core Source Code Archival scriptType: pscore scriptLocation: inlineScript inlineScript: | $accessToken = az account get-access-token --query accessToken --resource api://177cf50a-4bf5-4481-8b7e-f32900dfc8e6 -o tsv Write-Host "##vso[task.setvariable variable=scaToken;issecret=true]$accessToken" - pwsh: > $TeamAlias = '$(TeamEmail)'.Substring(0, '$(TeamEmail)'.IndexOf('@')) azure-pipelines/Archive-SourceCode.ps1 -ManagerAlias '$(ManagerAlias)' -TeamAlias $TeamAlias -BusinessGroupName '$(BusinessGroupName)' -ProductName '$(SymbolsFeatureName)' -ProductLanguage English -Notes '${{ parameters.notes }}' -AccessToken '$(scaToken)' -Verbose -WhatIf:$${{ parameters.whatif }} displayName: 🗃️ Submit archival request ================================================ FILE: azure-pipelines/build.yml ================================================ parameters: ##### The following parameters are not set by other YAML files that import this one, ##### but we use parameters because they support rich types and defaults. ##### Feel free to adjust their default value as needed. # Whether this repo uses OptProf to optimize the built binaries. # When enabling this, be sure to update these files: # - OptProf.targets: InstallationPath and match TestCase selection with what's in the VS repo. # - The project file(s) for the libraries to optimize must import OptProf.targets (for multi-targeted projects, only import it for ONE target). # - OptProf.yml: Search for LibraryName (or your library's name) and verify that those names are appropriate. # - OptProf_part2.yml: Search for LibraryName (or your library's name) and verify that those names are appropriate. # and create pipelines for OptProf.yml, OptProf_part2.yml - name: EnableOptProf type: boolean default: false # Whether this repo is localized. - name: EnableLocalization type: boolean default: false # Whether to run `dotnet format` as part of the build to ensure code style consistency. # This is just one of a a few mechanisms to enforce code style consistency. - name: EnableDotNetFormatCheck type: boolean default: false # This lists the names of the artifacts that will be published *from every OS build agent*. # Any new tools/artifacts/*.ps1 script needs to be added to this list. # If an artifact is only generated or collected on one OS, it should NOT be listed here, # but should be manually added to the `outputs:` field in the appropriate OS job. - name: artifact_names type: object default: - name: build_logs - name: coverageResults - name: deployables sbomEnabled: true - name: projectAssetsJson - name: symbols - name: testResults testOnly: true - name: test_symbols testOnly: true - name: Variables # The Enable*Build parameters turn non-Windows agents on or off. # Their default value should be based on whether the build and tests are expected/required to pass on that platform. # Callers (e.g. Official.yml) *may* expose these parameters at queue-time in order to turn OFF optional agents. - name: EnableLinuxBuild type: boolean default: false - name: EnableMacOSBuild type: boolean default: false ##### 👆🏼 You MAY change the defaults above. ##### 👇🏼 You should NOT change the defaults below. ##### The following parameters are expected to be set by other YAML files that import this one. ##### Those without defaults require explicit values to be provided by our importers. # Indicates whether the entrypoint file is 1ESPT compliant. Use this parameter to switch between publish tasks to fit 1ES or non-1ES needs. - name: Is1ESPT type: boolean # Indicates whether the 'official' 1ES PT templates are being used (as opposed to the unofficial ones). - name: Is1ESPTOfficial type: boolean default: false - name: RealSign type: boolean default: false - name: RunTests type: boolean default: true - name: PublishCodeCoverage type: boolean default: true # Whether this is a special one-off build for inserting into VS for a validation insertion PR (that will never be merged). - name: SkipCodesignVerify type: boolean default: false - name: EnableAPIScan type: boolean default: false # This parameter exists to provide a workaround to get a build out even when no OptProf profiling outputs can be found. # Entrypoint yaml files like official.yml should expose this as a queue-time setting when EnableOptProf is true in this file. # The OptProf.yml entrypoint sets this parameter to true so that collecting profile data isn't blocked by a prior lack of profile data. - name: ShouldSkipOptimize type: boolean default: false # The pool parameters are set to defaults that work in the azure-public AzDO account. # They are overridden by callers for the devdiv AzDO account to use 1ES compliant pools. - name: windowsPool type: object default: vmImage: windows-2025 - name: linuxPool type: object default: vmImage: ubuntu-24.04 - name: macOSPool type: object default: vmImage: macOS-15 jobs: - job: Windows pool: ${{ parameters.windowsPool }} timeoutInMinutes: 180 # Give plenty of time due to real signing ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: templateContext: mb: signing: enabled: true zipSources: false ${{ if parameters.RealSign }}: signType: real signWithProd: true ${{ else }}: signType: test sbom: enabled: true sbomToolVersion: 5.0.3 localization: enabled: ${{ parameters.EnableLocalization }} ${{ if eq(variables['Build.Reason'], 'pullRequest') }}: languages: ENU,JPN optprof: enabled: ${{ parameters.EnableOptProf }} ProfilingInputsDropName: $(ProfilingInputsDropName) GeneratePropsFile: true PropsPath: $(Build.ArtifactStagingDirectory)/InsertionOutputs/$(ProfilingInputsPropsName) OptimizationInputsLookupMethod: GitTagRepo GitTagProject: DevDiv GitTagRepo: VS ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }} AccessToken: $(System.AccessToken) mbpresteps: - checkout: self fetchDepth: 0 # avoid shallow clone so nbgv can do its work. clean: true - ${{ if parameters.EnableOptProf }}: - powershell: | Write-Host "##vso[task.setvariable variable=PROFILINGINPUTSDROPNAME]$(tools/variables/ProfilingInputsDropName.ps1)" Write-Host "##vso[task.setvariable variable=PROFILINGINPUTSPROPSNAME]$(tools/variables/ProfilingInputsPropsName.ps1)" displayName: ⚙ Setting variables for optprof sdl: binskim: analyzeTargetGlob: $(Build.ArtifactStagingDirectory)\symbols-Windows\** outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - ${{ each artifact in parameters.artifact_names }}: - ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }}: - output: pipelineArtifact displayName: 📢 Publish ${{ artifact.name }}-Windows targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Windows artifactName: ${{ artifact.name }}-Windows ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}: sbomEnabled: true - output: pipelineArtifact displayName: 📢 Publish ${{ artifact.name }}-Windows (for failed attempts) targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Windows artifactName: ${{ artifact.name }}-Windows-$(System.PhaseAttempt) ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}: sbomEnabled: true condition: failed() - output: pipelineArtifact displayName: 📢 Publish VSInsertion-Windows targetPath: $(Build.ArtifactStagingDirectory)/VSInsertion-Windows artifactName: VSInsertion-Windows - ${{ if parameters.EnableLocalization }}: - output: pipelineArtifact displayName: 📢 Publish LocBin-Windows targetPath: $(Build.ArtifactStagingDirectory)/LocBin-Windows artifactName: LocBin-Windows - ${{ if parameters.EnableAPIScan }}: - output: pipelineArtifact displayName: 📢 Publish APIScanInputs targetPath: $(Build.ArtifactStagingDirectory)/APIScanInputs-Windows artifactName: APIScanInputs - ${{ if parameters.EnableOptProf }}: - output: artifactsDrop displayName: 📢 Publish to Artifact Services - ProfilingInputs dropServiceURI: https://devdiv.artifacts.visualstudio.com buildNumber: $(ProfilingInputsDropName) sourcePath: $(Build.ArtifactStagingDirectory)\OptProf\ProfilingInputs toLowerCase: false retentionDays: 500 condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) steps: - ${{ if not(parameters.Is1ESPT) }}: - checkout: self fetchDepth: 0 # avoid shallow clone so nbgv can do its work. clean: true - ${{ if parameters.EnableOptProf }}: - powershell: Write-Host "##vso[task.setvariable variable=PROFILINGINPUTSDROPNAME]$(tools/variables/ProfilingInputsDropName.ps1)" displayName: ⚙ Set ProfilingInputsDropName for optprof - template: install-dependencies.yml - script: dotnet nbgv cloud -ca displayName: ⚙ Set build number name: nbgv - ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: - template: microbuild.before.yml parameters: EnableLocalization: ${{ parameters.EnableLocalization }} ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }} RealSign: ${{ parameters.RealSign }} - template: dotnet.yml parameters: Is1ESPT: ${{ parameters.Is1ESPT }} RunTests: ${{ parameters.RunTests }} - ${{ if and(parameters.EnableDotNetFormatCheck, not(parameters.EnableLinuxBuild)) }}: - script: dotnet format --verify-no-changes --no-restore src displayName: 💅 Verify formatted code env: dotnetformat: true # part of a workaround for https://github.com/dotnet/sdk/issues/44951 - ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: - template: microbuild.after.yml parameters: SkipCodesignVerify: ${{ parameters.SkipCodesignVerify }} - ${{ if parameters.EnableLinuxBuild }}: - job: Linux pool: ${{ parameters.linuxPool }} ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: templateContext: mb: ${{ if parameters.RealSign }}: signing: enabled: false # enable when building unique artifacts on this agent that must be signed signType: real signWithProd: true outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - ${{ each artifact in parameters.artifact_names }}: - ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }}: - output: pipelineArtifact displayName: 📢 Publish ${{ artifact.name }}-Linux targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Linux artifactName: ${{ artifact.name }}-Linux ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}: sbomEnabled: true - output: pipelineArtifact displayName: 📢 Publish ${{ artifact.name }}-Linux (for failed attempts) targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Linux artifactName: ${{ artifact.name }}-Linux-$(System.PhaseAttempt) ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}: sbomEnabled: true condition: failed() steps: - checkout: self fetchDepth: 0 # avoid shallow clone so nbgv can do its work. clean: true - template: install-dependencies.yml - template: dotnet.yml parameters: Is1ESPT: ${{ parameters.Is1ESPT }} RunTests: ${{ parameters.RunTests }} BuildRequiresAccessToken: ${{ parameters.RealSign }} # Real signing on non-Windows machines requires passing through access token to build steps that sign - ${{ if parameters.EnableDotNetFormatCheck }}: - script: dotnet format --verify-no-changes displayName: 💅 Verify formatted code env: dotnetformat: true # part of a workaround for https://github.com/dotnet/sdk/issues/44951 - template: expand-template.yml - ${{ if parameters.EnableMacOSBuild }}: - job: macOS pool: ${{ parameters.macOSPool }} ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: templateContext: mb: ${{ if parameters.RealSign }}: signing: enabled: false # enable when building unique artifacts on this agent that must be signed signType: real signWithProd: true outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - ${{ each artifact in parameters.artifact_names }}: - ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }}: - output: pipelineArtifact displayName: 📢 Publish ${{ artifact.name }}-macOS targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-macOS artifactName: ${{ artifact.name }}-macOS ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}: sbomEnabled: true - output: pipelineArtifact displayName: 📢 Publish ${{ artifact.name }}-macOS (for failed attempts) targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-macOS artifactName: ${{ artifact.name }}-macOS-$(System.PhaseAttempt) ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}: sbomEnabled: true condition: failed() steps: - checkout: self fetchDepth: 0 # avoid shallow clone so nbgv can do its work. clean: true - template: install-dependencies.yml - template: dotnet.yml parameters: Is1ESPT: ${{ parameters.Is1ESPT }} RunTests: ${{ parameters.RunTests }} BuildRequiresAccessToken: ${{ parameters.RealSign }} # Real signing on non-Windows machines requires passing through access token to build steps that sign - template: expand-template.yml - job: WrapUp dependsOn: - Windows - ${{ if parameters.EnableLinuxBuild }}: - Linux - ${{ if parameters.EnableMacOSBuild }}: - macOS pool: ${{ parameters.windowsPool }} # Use Windows agent because PublishSymbols task requires it (https://github.com/microsoft/azure-pipelines-tasks/issues/13821). condition: succeededOrFailed() variables: ONEES_ENFORCED_CODEQL_ENABLED: false # CodeQL runs on build jobs, we don't need it here ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: templateContext: ${{ if not(parameters.RealSign) }}: mb: signing: # if the build is test-signed, install the signing plugin so that CSVTestSignPolicy.xml is available enabled: true zipSources: false signType: test outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - output: pipelineArtifact displayName: 📢 Publish symbols-legacy targetPath: $(Build.ArtifactStagingDirectory)/symbols-legacy artifactName: symbols-legacy condition: succeededOrFailed() steps: - checkout: self fetchDepth: 0 # avoid shallow clone so nbgv can do its work. clean: true - template: install-dependencies.yml parameters: initArgs: -NoRestore - template: publish-symbols.yml parameters: EnableLinuxBuild: ${{ parameters.EnableLinuxBuild }} EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }} - ${{ if and(parameters.RunTests, parameters.PublishCodeCoverage) }}: - template: publish-codecoverage.yml parameters: EnableLinuxBuild: ${{ parameters.EnableLinuxBuild }} EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }} - ${{ if parameters.EnableAPIScan }}: - template: apiscan.yml parameters: windowsPool: ${{ parameters.windowsPool }} RealSign: ${{ parameters.RealSign }} ================================================ FILE: azure-pipelines/dotnet.yml ================================================ parameters: - name: RunTests - name: Is1ESPT type: boolean - name: BuildRequiresAccessToken type: boolean default: false steps: - task: VSBuild@1 inputs: solution: src/SlowCheetah.sln msbuildArgs: /t:build,pack /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog" configuration: $(BuildConfiguration) displayName: 🛠 Build - powershell: tools/dotnet-test-cloud.ps1 -Configuration $(BuildConfiguration) -Agent $(Agent.JobName) -PublishResults displayName: 🧪 dotnet test condition: and(succeeded(), ${{ parameters.RunTests }}) - powershell: tools/variables/_define.ps1 failOnStderr: true displayName: ⚙ Update pipeline variables based on build outputs condition: succeededOrFailed() - ${{ if parameters.Is1ESPT }}: - powershell: azure-pipelines/publish_artifacts.ps1 -StageOnly -AvoidSymbolicLinks -ArtifactNameSuffix "-$(Agent.JobName)" -Verbose failOnStderr: true displayName: 📢 Stage artifacts condition: succeededOrFailed() - ${{ else }}: - powershell: azure-pipelines/publish_artifacts.ps1 -ArtifactNameSuffix "-$(Agent.JobName)" -Verbose failOnStderr: true displayName: 📢 Publish artifacts condition: succeededOrFailed() - ${{ if parameters.RunTests }}: - powershell: | $ArtifactStagingFolder = & "tools/Get-ArtifactsStagingDirectory.ps1" $CoverageResultsFolder = Join-Path $ArtifactStagingFolder "coverageResults-$(Agent.JobName)" tools/publish-CodeCov.ps1 -CodeCovToken "$(CODECOV_TOKEN)" -PathToCodeCoverage "$CoverageResultsFolder" -Name "$(Agent.JobName) Coverage Results" -Flags "$(Agent.JobName)" displayName: 📢 Publish code coverage results to codecov.io timeoutInMinutes: 3 continueOnError: true # Set the CODECOV_TOKEN variable in your Azure Pipeline to enable code coverage reporting # Get a token from https://codecov.io/ condition: and(succeeded(), ne(variables['CODECOV_TOKEN'], '')) ================================================ FILE: azure-pipelines/falsepositives.gdnsuppress ================================================ { "version": "latest", "suppressionSets": { "falsepositives": { "name": "falsepositives", "createdDate": "2021-12-03 00:23:08Z", "lastUpdatedDate": "2021-12-03 00:23:08Z" } }, "results": { } } ================================================ FILE: azure-pipelines/install-dependencies.yml ================================================ parameters: - name: initArgs type: string default: '' - name: needsAzurePublicFeeds type: boolean default: true # If nuget.config pulls from the azure-public account, we need to authenticate when building on the devdiv account. steps: - ${{ if and(parameters.needsAzurePublicFeeds, eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9')) }}: - template: WIFtoPATauth.yml parameters: wifServiceConnectionName: azure-public/vside package pull deadPATServiceConnectionId: 0ae39abc-4d06-4436-a7b5-865833df49db # azure-public/msft_consumption - task: NuGetAuthenticate@1 displayName: 🔏 Authenticate NuGet feeds inputs: ${{ if and(parameters.needsAzurePublicFeeds, eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9')) }}: nuGetServiceConnections: azure-public/msft_consumption - powershell: | $AccessToken = '$(System.AccessToken)' # Avoid specifying the access token directly on the init.ps1 command line to avoid it showing up in errors .\init.ps1 -AccessToken $AccessToken ${{ parameters['initArgs'] }} -UpgradePrerequisites -NoNuGetCredProvider dotnet --info # Print mono version if it is present. if (Get-Command mono -ErrorAction SilentlyContinue) { mono --version } displayName: ⚙ Install prerequisites - powershell: tools/variables/_define.ps1 failOnStderr: true displayName: ⚙ Set pipeline variables based on source name: SetPipelineVariables ================================================ FILE: azure-pipelines/libtemplate-update.yml ================================================ # This pipeline schedules regular merges of Library.Template into a repo that is based on it. # Only Azure Repos are supported. GitHub support comes via a GitHub Actions workflow. trigger: none pr: none schedules: - cron: "0 3 * * Mon" # Sun @ 8 or 9 PM Mountain Time (depending on DST) displayName: Weekly trigger branches: include: - main always: true resources: repositories: - repository: MicroBuildTemplate type: git name: 1ESPipelineTemplates/MicroBuildTemplate ref: refs/tags/release parameters: - name: AutoComplete displayName: Auto-complete pull request type: boolean default: false variables: - template: GlobalVariables.yml extends: template: azure-pipelines/MicroBuild.1ES.Unofficial.yml@MicroBuildTemplate parameters: sdl: sourceAnalysisPool: name: AzurePipelines-EO demands: - ImageOverride -equals 1ESPT-Windows2022 credscan: enabled: false stages: - stage: Merge jobs: - job: merge pool: name: AzurePipelines-EO demands: - ImageOverride -equals 1ESPT-Ubuntu22.04 os: Linux steps: - checkout: self fetchDepth: 0 clean: true - pwsh: | $LibTemplateBranch = & ./tools/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } git fetch https://github.com/aarnott/Library.Template $LibTemplateBranch if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } $LibTemplateCommit = git rev-parse FETCH_HEAD if ((git rev-list FETCH_HEAD ^HEAD --count) -eq 0) { Write-Host "There are no Library.Template updates to merge." exit 0 } $UpdateBranchName = 'auto/libtemplateUpdate' git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin -f FETCH_HEAD:refs/heads/$UpdateBranchName Write-Host "Creating pull request" $contentType = 'application/json'; $headers = @{ Authorization = 'Bearer $(System.AccessToken)' }; $rawRequest = @{ sourceRefName = "refs/heads/$UpdateBranchName"; targetRefName = "refs/heads/main"; title = 'Merge latest Library.Template'; description = "This merges the latest features and fixes from [Library.Template's $LibTemplateBranch branch](https://github.com/AArnott/Library.Template/tree/$LibTemplateBranch)."; } $request = ConvertTo-Json $rawRequest $prApiBaseUri = '$(System.TeamFoundationCollectionUri)/$(System.TeamProject)/_apis/git/repositories/$(Build.Repository.ID)/pullrequests' $prCreationUri = $prApiBaseUri + "?api-version=6.0" Write-Host "POST $prCreationUri" Write-Host $request $prCreationResult = Invoke-RestMethod -uri $prCreationUri -method POST -Headers $headers -ContentType $contentType -Body $request $prUrl = "$($prCreationResult.repository.webUrl)/pullrequest/$($prCreationResult.pullRequestId)" Write-Host "Pull request: $prUrl" $prApiBaseUri += "/$($prCreationResult.pullRequestId)" $SummaryPath = Join-Path '$(Agent.TempDirectory)' 'summary.md' Set-Content -Path $SummaryPath -Value "[Insertion pull request]($prUrl)" Write-Host "##vso[task.uploadsummary]$SummaryPath" # Tag the PR $tagUri = "$prApiBaseUri/labels?api-version=7.0" $rawRequest = @{ name = 'auto-template-merge'; } $request = ConvertTo-Json $rawRequest Invoke-RestMethod -uri $tagUri -method POST -Headers $headers -ContentType $contentType -Body $request | Out-Null # Add properties to the PR that we can programatically parse later. Function Set-PRProperties($properties) { $rawRequest = $properties.GetEnumerator() |% { @{ op = 'add' path = "/$($_.key)" from = $null value = $_.value } } $request = ConvertTo-Json $rawRequest $setPrPropertyUri = "$prApiBaseUri/properties?api-version=7.0" Write-Debug "$request" $setPrPropertyResult = Invoke-RestMethod -uri $setPrPropertyUri -method PATCH -Headers $headers -ContentType 'application/json-patch+json' -Body $request -StatusCodeVariable setPrPropertyStatus -SkipHttpErrorCheck if ($setPrPropertyStatus -ne 200) { Write-Host "##vso[task.logissue type=warning]Failed to set pull request properties. Result: $setPrPropertyStatus. $($setPrPropertyResult.message)" } } Write-Host "Setting pull request properties" Set-PRProperties @{ 'AutomatedMerge.SourceBranch' = $LibTemplateBranch 'AutomatedMerge.SourceCommit' = $LibTemplateCommit } # Add an *active* PR comment to warn users to *merge* the pull request instead of squash it. $request = ConvertTo-Json @{ comments = @( @{ parentCommentId = 0 content = "Do **not** squash this pull request when completing it. You must *merge* it." commentType = 'system' } ) status = 'active' } $result = Invoke-RestMethod -uri "$prApiBaseUri/threads?api-version=7.1" -method POST -Headers $headers -ContentType $contentType -Body $request -StatusCodeVariable addCommentStatus -SkipHttpErrorCheck if ($addCommentStatus -ne 200) { Write-Host "##vso[task.logissue type=warning]Failed to post comment on pull request. Result: $addCommentStatus. $($result.message)" } # Set auto-complete on the PR if ('${{ parameters.AutoComplete }}' -eq 'True') { Write-Host "Setting auto-complete" $mergeMessage = "Merged PR $($prCreationResult.pullRequestId): " + $commitMessage $rawRequest = @{ autoCompleteSetBy = @{ id = $prCreationResult.createdBy.id }; completionOptions = @{ deleteSourceBranch = $true; mergeCommitMessage = $mergeMessage; mergeStrategy = 'noFastForward'; }; } $request = ConvertTo-Json $rawRequest Write-Host $request $uri = "$($prApiBaseUri)?api-version=6.0" $result = Invoke-RestMethod -uri $uri -method PATCH -Headers $headers -ContentType $contentType -Body $request -StatusCodeVariable autoCompleteStatus -SkipHttpErrorCheck if ($autoCompleteStatus -ne 200) { Write-Host "##vso[task.logissue type=warning]Failed to set auto-complete on pull request. Result: $autoCompleteStatus. $($result.message)" } } displayName: Create pull request ================================================ FILE: azure-pipelines/microbuild.after.yml ================================================ parameters: - name: SkipCodesignVerify type: boolean steps: - ${{ if not(parameters.SkipCodesignVerify) }}: - task: MicroBuildCodesignVerify@3 displayName: 🔍 Verify Signed Files inputs: ApprovalListPathForSigs: $(Build.SourcesDirectory)\azure-pipelines\no_strongname.txt ApprovalListPathForCerts: $(Build.SourcesDirectory)\azure-pipelines\no_authenticode.txt TargetFolders: | $(Build.SourcesDirectory)/bin/Packages/$(BuildConfiguration) condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) ================================================ FILE: azure-pipelines/microbuild.before.yml ================================================ parameters: - name: EnableLocalization type: boolean default: false - name: ShouldSkipOptimize type: boolean default: false - name: RealSign type: boolean steps: - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: # notice@0 requires CG detection to run first, and non-default branches don't inject it automatically. # default branch injection (main) is happening too late for notice@0 to run successfully. Adding this as a workaround. - task: ComponentGovernanceComponentDetection@0 displayName: 🔍 Component Detection - task: notice@0 displayName: 🛠️ Generate NOTICE file inputs: outputfile: $(System.DefaultWorkingDirectory)/obj/NOTICE outputformat: text retryCountOnTaskFailure: 10 # fails when the cloud service is overloaded continueOnError: ${{ not(parameters.RealSign) }} # Tolerate failures when we're not building something that may ship. ================================================ FILE: azure-pipelines/no_authenticode.txt ================================================ bin\packages\release\vsix\_manifest\manifest.cat,sbom signed bin\packages\release\vsix\_manifest\spdx_2.2\manifest.cat,sbom signed ================================================ FILE: azure-pipelines/no_strongname.txt ================================================ ================================================ FILE: azure-pipelines/official.yml ================================================ trigger: branches: include: - main schedules: # Monthly compliance sweep: runs at 03:00 UTC (8 PM PST previous day) on the 1st of every month. # `always: true` ensures it runs even if there have been no code changes since the last successful build, # so we can detect regressions in compliance tooling (APIScan, PoliCheck, CodeSignValidation, etc.). - cron: "0 3 1 * *" displayName: Monthly compliance sweep branches: include: - main always: true parameters: # As an entrypoint pipeline yml file, all parameters here show up in the Queue Run dialog. # If any paramaters should NOT be queue-time options, they should be removed from here # and references to them in this file replaced with hard-coded values. # - name: ShouldSkipOptimize # Uncomment this and references to it below when setting EnableOptProf to true in build.yml. # displayName: Skip OptProf optimization # type: boolean # default: false - name: EnableMacOSBuild displayName: Build on macOS type: boolean default: false # macOS is often bogged down in Azure Pipelines - name: RunTests displayName: Run tests type: boolean default: true - name: EnableAPIScan displayName: Include APIScan with compliance tools type: boolean default: true # enable in individual repos only AFTER updating TSAOptions.json with your own values - name: PublishCodeCoverage displayName: Publish code coverage type: boolean default: true resources: repositories: - repository: MicroBuildTemplate type: git name: 1ESPipelineTemplates/MicroBuildTemplate ref: refs/tags/release variables: - template: GlobalVariables.yml extends: template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate parameters: sdl: sourceAnalysisPool: VSEng-MicroBuildVSStable codeSignValidation: enabled: true break: true additionalTargetsGlobPattern: -|Variables-*\*.ps1;-|LocBin-*\**;-|APIScanInputs-*\**;-|test_symbols-*\**;-|MicroBuild\**;-|$(Build.ArtifactStagingDirectory)\VSInsertion-Windows\vs-insertion-script.ps1 policheck: enabled: true exclusionsFile: $(System.DefaultWorkingDirectory)\azure-pipelines\PoliCheckExclusions.xml suppression: suppressionFile: $(System.DefaultWorkingDirectory)\azure-pipelines\falsepositives.gdnsuppress sbom: enabled: false # Skip 1ES SBOM because microbuild has our own sbom system stages: - stage: Build variables: - template: /azure-pipelines/BuildStageVariables.yml@self jobs: - template: /azure-pipelines/build.yml@self parameters: Is1ESPT: true Is1ESPTOfficial: true RealSign: true # ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }} EnableAPIScan: ${{ parameters.EnableAPIScan }} windowsPool: VSEng-MicroBuildVSStable linuxPool: name: AzurePipelines-EO demands: - ImageOverride -equals 1ESPT-Ubuntu22.04 os: Linux macOSPool: name: Azure Pipelines vmImage: macOS-15 os: macOS EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }} RunTests: ${{ parameters.RunTests }} PublishCodeCoverage: ${{ parameters.PublishCodeCoverage }} - template: /azure-pipelines/prepare-insertion-stages.yml@self parameters: RealSign: true ================================================ FILE: azure-pipelines/prepare-insertion-stages.yml ================================================ parameters: - name: ArchiveSymbols type: boolean default: true - name: RealSign displayName: Real sign? type: boolean - name: PackagePush type: boolean default: false # Switch to true to enable the push job below stages: - ${{ if or(parameters.ArchiveSymbols, parameters.PackagePush) }}: - stage: release displayName: Publish jobs: - ${{ if parameters.ArchiveSymbols }}: - job: symbol_archive displayName: Archive symbols pool: VSEng-MicroBuildVSStable variables: ONEES_ENFORCED_CODEQL_ENABLED: false # CodeQL runs on build stages, we don't need it here steps: - checkout: none - download: current artifact: Variables-Windows displayName: 🔻 Download Variables-Windows artifact - powershell: $(Pipeline.Workspace)/Variables-Windows/_define.ps1 displayName: ⚙️ Set pipeline variables based on artifacts - download: current artifact: symbols-legacy displayName: 🔻 Download symbols-legacy artifact - task: MicroBuildArchiveSymbols@6 displayName: 🔣 Archive symbols to Symweb inputs: SymbolsFeatureName: $(SymbolsFeatureName) SymbolsProject: VS SymbolsAgentPath: $(Pipeline.Workspace)/symbols-legacy azureSubscription: Vseng-SymbolsUpload env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) - ${{ if parameters.PackagePush }}: - job: push ${{ if parameters.RealSign }}: displayName: azure-public/vs-impl feed ${{ else }}: displayName: devdiv/vs-impl feed # Leave this as-is, since non-signed builds must not be pushed to public feeds. ${{ if parameters.ArchiveSymbols }}: dependsOn: symbol_archive pool: name: AzurePipelines-EO demands: - ImageOverride -equals 1ESPT-Ubuntu22.04 os: Linux templateContext: outputs: - output: nuget displayName: 📦 Push nuget packages packagesToPush: '$(Pipeline.Workspace)/deployables-Windows/NuGet/*.nupkg' packageParentPath: $(Pipeline.Workspace)/deployables-Windows/NuGet allowPackageConflicts: true ${{ if parameters.RealSign }}: nuGetFeedType: external publishFeedCredentials: azure-public/vs-impl ${{ else }}: nuGetFeedType: internal publishVstsFeed: vs-impl # Leave this as-is, since non-signed builds must not be pushed to public feeds. variables: ONEES_ENFORCED_CODEQL_ENABLED: false # CodeQL runs on build stages, we don't need it here steps: - checkout: none - download: current artifact: Variables-Windows displayName: 🔻 Download Variables-Windows artifact - powershell: $(Pipeline.Workspace)/Variables-Windows/_define.ps1 displayName: ⚙️ Set pipeline variables based on artifacts - download: current artifact: deployables-Windows displayName: 🔻 Download deployables-Windows artifact - ${{ if parameters.RealSign }}: - template: WIFtoPATauth.yml parameters: wifServiceConnectionName: azure-public/vside package push deadPATServiceConnectionId: 207efd62-fd0f-43e7-aeae-17c4febcc660 # azure-public/vs-impl ================================================ FILE: azure-pipelines/publish-codecoverage.yml ================================================ parameters: - name: EnableMacOSBuild type: boolean - name: EnableLinuxBuild type: boolean steps: - download: current artifact: coverageResults-Windows displayName: 🔻 Download Windows code coverage results continueOnError: true - ${{ if parameters.EnableLinuxBuild }}: - download: current artifact: coverageResults-Linux displayName: 🔻 Download Linux code coverage results continueOnError: true - ${{ if parameters.EnableMacOSBuild }}: - download: current artifact: coverageResults-macOS displayName: 🔻 Download macOS code coverage results continueOnError: true - powershell: azure-pipelines/Merge-CodeCoverage.ps1 -Path '$(Pipeline.Workspace)' -OutputFile coveragereport/merged.cobertura.xml -Format Cobertura -Verbose displayName: ⚙ Merge coverage - task: PublishCodeCoverageResults@2 displayName: 📢 Publish code coverage results to Azure DevOps inputs: summaryFileLocation: coveragereport/merged.cobertura.xml failIfCoverageEmpty: true ================================================ FILE: azure-pipelines/publish-symbols.yml ================================================ parameters: - name: EnableMacOSBuild type: boolean - name: EnableLinuxBuild type: boolean steps: - task: DownloadPipelineArtifact@2 inputs: artifact: symbols-Windows path: $(Pipeline.Workspace)/symbols/Windows displayName: 🔻 Download Windows symbols continueOnError: true - ${{ if parameters.EnableLinuxBuild }}: - task: DownloadPipelineArtifact@2 inputs: artifact: symbols-Linux path: $(Pipeline.Workspace)/symbols/Linux displayName: 🔻 Download Linux symbols continueOnError: true - ${{ if parameters.EnableMacOSBuild }}: - task: DownloadPipelineArtifact@2 inputs: artifact: symbols-macOS path: $(Pipeline.Workspace)/symbols/macOS displayName: 🔻 Download macOS symbols continueOnError: true - task: DownloadPipelineArtifact@2 inputs: artifact: test_symbols-Windows path: $(Pipeline.Workspace)/test_symbols/Windows displayName: 🔻 Download Windows test symbols continueOnError: true - ${{ if parameters.EnableLinuxBuild }}: - task: DownloadPipelineArtifact@2 inputs: artifact: test_symbols-Linux path: $(Pipeline.Workspace)/test_symbols/Linux displayName: 🔻 Download Linux test symbols continueOnError: true - ${{ if parameters.EnableMacOSBuild }}: - task: DownloadPipelineArtifact@2 inputs: artifact: test_symbols-macOS path: $(Pipeline.Workspace)/test_symbols/macOS displayName: 🔻 Download macOS test symbols continueOnError: true - task: PublishSymbols@2 inputs: SymbolsFolder: $(Pipeline.Workspace)/symbols SearchPattern: '**/*.pdb' IndexSources: false SymbolServerType: TeamServices displayName: 📢 Publish symbols - task: PublishSymbols@2 inputs: SymbolsFolder: $(Pipeline.Workspace)/test_symbols SearchPattern: '**/*.pdb' IndexSources: false SymbolServerType: TeamServices displayName: 📢 Publish test symbols - powershell: tools/Prepare-Legacy-Symbols.ps1 -Path $(Pipeline.Workspace)/symbols/Windows displayName: ⚙ Prepare symbols for symbol archival ================================================ FILE: azure-pipelines/publish_artifacts.ps1 ================================================ <# .SYNOPSIS This script translates all the artifacts described by _all.ps1 into commands that instruct Azure Pipelines to actually collect those artifacts. #> [CmdletBinding()] param ( [string]$ArtifactNameSuffix, [switch]$StageOnly, [switch]$AvoidSymbolicLinks ) Function Set-PipelineVariable($name, $value) { if ((Test-Path "Env:\$name") -and (Get-Item "Env:\$name").Value -eq $value) { return # already set } #New-Item -LiteralPath "Env:\$name".ToUpper() -Value $value -Force | Out-Null Write-Host "##vso[task.setvariable variable=$name]$value" } Function Test-ArtifactUploaded($artifactName) { $varName = "ARTIFACTUPLOADED_$($artifactName.ToUpper())" Test-Path "env:$varName" } & "$PSScriptRoot/../tools/artifacts/_stage_all.ps1" -ArtifactNameSuffix $ArtifactNameSuffix -AvoidSymbolicLinks:$AvoidSymbolicLinks |% { # Set a variable which will out-live this script so that a subsequent attempt to collect and upload artifacts # will skip this one from a check in the _all.ps1 script. Set-PipelineVariable "ARTIFACTSTAGED_$($_.Name.ToUpper())" 'true' Write-Host "Staged artifact $($_.Name) to $($_.Path)" if (!$StageOnly) { if (Test-ArtifactUploaded $_.Name) { Write-Host "Skipping $($_.Name) because it has already been uploaded." -ForegroundColor DarkGray } else { Write-Host "##vso[artifact.upload containerfolder=$($_.Name);artifactname=$($_.Name);]$($_.Path)" # Set a variable which will out-live this script so that a subsequent attempt to collect and upload artifacts # will skip this one from a check in the _all.ps1 script. Set-PipelineVariable "ARTIFACTUPLOADED_$($_.Name.ToUpper())" 'true' } } } ================================================ FILE: azure-pipelines/release-deployment-prep.yml ================================================ steps: - download: CI artifact: Variables-Windows displayName: 🔻 Download Variables-Windows artifact - powershell: $(Pipeline.Workspace)/CI/Variables-Windows/_define.ps1 displayName: ⚙️ Set pipeline variables based on artifacts ================================================ FILE: azure-pipelines/release.yml ================================================ trigger: none # We only want to trigger manually or based on resources pr: none resources: repositories: - repository: MicroBuildTemplate type: git name: 1ESPipelineTemplates/MicroBuildTemplate ref: refs/tags/release pipelines: - pipeline: CI source: slow-cheetah-ci trigger: tags: - auto-release variables: - template: GlobalVariables.yml extends: template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate parameters: sdl: sourceAnalysisPool: VSEng-MicroBuildVSStable stages: - stage: release jobs: - job: nuget displayName: 📦 Push nuget.org packages pool: name: AzurePipelines-EO demands: - ImageOverride -equals 1ESPT-Ubuntu22.04 os: Linux templateContext: outputs: - output: nuget displayName: 📦 Push packages to nuget.org packagesToPush: '$(Pipeline.Workspace)/CI/deployables-Windows/NuGet/*.nupkg' packageParentPath: $(Pipeline.Workspace)/CI/deployables-Windows/NuGet allowPackageConflicts: true nuGetFeedType: external publishFeedCredentials: VisualStudioExtensibility (nuget.org) steps: - checkout: none - download: CI artifact: deployables-Windows displayName: 🔻 Download deployables-Windows artifact patterns: 'NuGet/*' - job: github displayName: 📢 GitHub release dependsOn: nuget pool: name: AzurePipelines-EO demands: - ImageOverride -equals 1ESPT-Ubuntu22.04 os: Linux templateContext: type: releaseJob isProduction: true inputs: - input: pipelineArtifact pipeline: CI artifactName: deployables-Windows targetPath: $(Pipeline.Workspace)/CI/deployables-Windows steps: - checkout: none - powershell: | Write-Host "##vso[build.updatebuildnumber]$(resources.pipeline.CI.runName)" if ('$(resources.pipeline.CI.runName)'.Contains('-')) { Write-Host "##vso[task.setvariable variable=IsPrerelease]true" } else { Write-Host "##vso[task.setvariable variable=IsPrerelease]false" } displayName: ⚙ Set up pipeline - task: GitHubRelease@1 displayName: 📢 GitHub release (create) inputs: gitHubConnection: ttstanley # service connection repositoryName: $(Build.Repository.Name) target: $(resources.pipeline.CI.sourceCommit) tagSource: userSpecifiedTag tag: v$(resources.pipeline.CI.runName) title: v$(resources.pipeline.CI.runName) isDraft: true # After running this step, visit the new draft release, edit, and publish. isPreRelease: $(IsPrerelease) assets: $(Pipeline.Workspace)/CI/deployables-Windows/NuGet/*.nupkg changeLogCompareToRelease: lastNonDraftRelease changeLogType: issueBased changeLogLabels: | [ { "label" : "breaking change", "displayName" : "Breaking changes", "state" : "closed" }, { "label" : "bug", "displayName" : "Fixes", "state" : "closed" }, { "label" : "enhancement", "displayName": "Enhancements", "state" : "closed" } ] ================================================ FILE: azure-pipelines/unofficial.yml ================================================ trigger: batch: true branches: include: - main - microbuild - 'validate/*' paths: exclude: - doc/ - '*.md' - .vscode/ - azure-pipelines/release.yml - azure-pipelines/vs-insertion.yml parameters: # As an entrypoint pipeline yml file, all parameters here show up in the Queue Run dialog. # If any paramaters should NOT be queue-time options, they should be removed from here # and references to them in this file replaced with hard-coded values. # - name: ShouldSkipOptimize # Uncomment this and references to it below when setting EnableOptProf to true in build.yml. # displayName: Skip OptProf optimization # type: boolean # default: false - name: EnableMacOSBuild displayName: Build on macOS type: boolean default: false # macOS is often bogged down in Azure Pipelines - name: RunTests displayName: Run tests type: boolean default: true - name: EnableAPIScan displayName: Include APIScan with compliance tools type: boolean default: false - name: EnableProductionSDL displayName: Enable Production SDL type: boolean default: false - name: PublishCodeCoverage displayName: Publish code coverage type: boolean default: true resources: repositories: - repository: MicroBuildTemplate type: git name: 1ESPipelineTemplates/MicroBuildTemplate ref: refs/tags/release variables: - template: GlobalVariables.yml extends: template: azure-pipelines/MicroBuild.1ES.Unofficial.yml@MicroBuildTemplate parameters: sdl: sourceAnalysisPool: VSEng-MicroBuildVSStable credscan: enabled: false suppression: suppressionFile: $(System.DefaultWorkingDirectory)\azure-pipelines\falsepositives.gdnsuppress enableProductionSDL: ${{ parameters.EnableProductionSDL }} codeSignValidation: enabled: ${{ parameters.EnableProductionSDL }} break: true additionalTargetsGlobPattern: -|Variables-*\*.ps1;-|APIScanInputs-*\**;-|test_symbols-*\**;-|MicroBuild\**;-|$(Build.ArtifactStagingDirectory)\VSInsertion-Windows\vs-insertion-script.ps1 policyFile: $(MBSIGN_APPFOLDER)\CSVTestSignPolicy.xml policheck: enabled: ${{ parameters.EnableProductionSDL }} exclusionsFile: $(System.DefaultWorkingDirectory)\azure-pipelines\PoliCheckExclusions.xml sbom: enabled: false # Skip 1ES SBOM because microbuild has our own sbom system stages: - stage: Build variables: - template: /azure-pipelines/BuildStageVariables.yml@self jobs: - template: /azure-pipelines/build.yml@self parameters: Is1ESPT: true RealSign: false # ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }} EnableAPIScan: ${{ parameters.EnableAPIScan }} windowsPool: VSEng-MicroBuildVSStable linuxPool: name: AzurePipelines-EO demands: - ImageOverride -equals 1ESPT-Ubuntu22.04 os: Linux macOSPool: name: Azure Pipelines vmImage: macOS-15 os: macOS EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }} RunTests: ${{ parameters.RunTests }} PublishCodeCoverage: ${{ parameters.PublishCodeCoverage }} ================================================ FILE: azure-pipelines/vs-insertion-script.ps1 ================================================ # List of build artifact files [Source => Destination] to be committed into the VS repo. $FilesToCommit = @{ "$env:PROFILINGINPUTSPROPSNAME" = "src/Tests/config/runsettings/Official/OptProf/External/$env:PROFILINGINPUTSPROPSNAME"; } foreach ($File in $FilesToCommit.GetEnumerator()) { $SourcePath = Join-Path $PSScriptRoot $File.Key if (Test-Path $SourcePath) { $DestinationPath = Join-Path (Get-Location) $File.Value Write-Host "Copying $SourcePath to $DestinationPath" Copy-Item -Path $SourcePath -Destination $DestinationPath git add $DestinationPath } else { Write-Host "$SourcePath is not present, skipping" } } ================================================ FILE: azure-pipelines/vs-insertion.yml ================================================ trigger: none # We only want to trigger manually or based on resources pr: none resources: repositories: - repository: MicroBuildTemplate type: git name: 1ESPipelineTemplates/MicroBuildTemplate ref: refs/tags/release pipelines: - pipeline: CI source: Library # TODO: This should match the name of your CI pipeline tags: - Real signed trigger: tags: - Real signed variables: - template: GlobalVariables.yml extends: template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate parameters: sdl: sourceAnalysisPool: VSEng-MicroBuildVSStable sbom: enabled: false stages: - stage: insertion jobs: - job: insertion displayName: VS insertion pool: VSEng-MicroBuildVSStable templateContext: outputParentDirectory: $(Pipeline.Workspace)/CI steps: - checkout: none - powershell: Write-Host "##vso[build.updatebuildnumber]$(resources.pipeline.CI.runName)" displayName: ⚙️ Set pipeline name - template: azure-pipelines/release-deployment-prep.yml@self - download: CI artifact: VSInsertion-Windows displayName: 🔻 Download VSInsertion-Windows artifact - ${{ if eq(variables['ContainsVsix'], 'true') }}: - task: 1ES.MicroBuildVstsDrop@1 displayName: 🔺 Upload VSTS Drop inputs: dropFolder: $(Pipeline.Workspace)/CI/VSInsertion-windows/Vsix dropName: $(VstsDropNames) accessToken: $(System.AccessToken) - task: 1ES.PublishNuget@1 displayName: 📦 Push VS-repo packages to VS feed inputs: packagesToPush: '$(Pipeline.Workspace)/CI/VSInsertion-Windows/*.nupkg' packageParentPath: $(Pipeline.Workspace)/CI/VSInsertion-Windows allowPackageConflicts: true publishVstsFeed: VS - task: MicroBuildInsertVsPayload@5 displayName: 🏭 Insert VS Payload inputs: TeamName: $(TeamName) TeamEmail: $(TeamEmail) InsertionPayloadName: $(Build.Repository.Name) $(Build.BuildNumber) InsertionBuildPolicies: Request Perf DDRITs InsertionReviewers: $(Build.RequestedFor) # Append `,Your team name` (without quotes) CustomScriptExecutionCommand: $(Pipeline.Workspace)\CI\VSInsertion-Windows\vs-insertion-script.ps1 AutoCompletePR: true AutoCompleteMergeStrategy: Squash ShallowClone: true ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: ConnectedVSDropServiceName: 'VSEng-VSDrop-MI' env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) - powershell: | $contentType = 'application/json'; $headers = @{ Authorization = 'Bearer $(System.AccessToken)' }; $rawRequest = @{ daysValid = 365 * 2; definitionId = $(resources.pipeline.CI.pipelineID); ownerId = 'User:$(Build.RequestedForId)'; protectPipeline = $false; runId = $(resources.pipeline.CI.runId) }; $request = ConvertTo-Json @($rawRequest); Write-Host $request $uri = "$(System.CollectionUri)$(System.TeamProject)/_apis/build/retention/leases?api-version=6.0-preview.1"; Invoke-RestMethod -uri $uri -method POST -Headers $headers -ContentType $contentType -Body $request; displayName: 🗻 Retain inserted builds ================================================ FILE: azure-pipelines/vs-validation.yml ================================================ # This is a top-level pipeline file, which is designed to be added as an optional PR build policy # so that a VS insertion and all the validation that entails can be done before ever merging the PR # in its original repo. trigger: none # We only want to trigger manually or based on resources pr: none # parameters: # - name: ShouldSkipOptimize # Uncomment this and references to it below when setting EnableOptProf to true in build.yml. # displayName: Skip OptProf optimization # type: boolean # default: false resources: repositories: - repository: MicroBuildTemplate type: git name: 1ESPipelineTemplates/MicroBuildTemplate ref: refs/tags/release variables: - template: GlobalVariables.yml - name: MicroBuild_NuPkgSigningEnabled value: false # test-signed nuget packages fail to restore in the VS insertion PR validations. Just don't sign them *at all*. extends: template: azure-pipelines/MicroBuild.1ES.Unofficial.yml@MicroBuildTemplate parameters: sdl: sourceAnalysisPool: VSEng-MicroBuildVSStable credscan: enabled: false stages: - stage: Build variables: - template: /azure-pipelines/BuildStageVariables.yml@self - name: SkipCodesignVerify value: true jobs: - template: /azure-pipelines/build.yml@self parameters: Is1ESPT: true RealSign: false # ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }} windowsPool: VSEng-MicroBuildVSStable linuxPool: name: AzurePipelines-EO demands: - ImageOverride -equals 1ESPT-Ubuntu22.04 os: Linux macOSPool: name: Azure Pipelines vmImage: macOS-15 os: macOS EnableMacOSBuild: false RunTests: false SkipCodesignVerify: true - template: /azure-pipelines/prepare-insertion-stages.yml@self parameters: ArchiveSymbols: false RealSign: false - stage: insertion displayName: VS insertion jobs: - job: insertion displayName: VS insertion pool: VSEng-MicroBuildVSStable steps: - checkout: self clean: true fetchDepth: 1 - download: current artifact: Variables-Windows displayName: 🔻 Download Variables-Windows artifact - powershell: $(Pipeline.Workspace)/Variables-Windows/_define.ps1 displayName: ⚙️ Set pipeline variables based on artifacts - download: current artifact: VSInsertion-Windows displayName: 🔻 Download VSInsertion-Windows artifact - ${{ if eq(variables['ContainsVsix'], 'true') }}: - task: 1ES.MicroBuildVstsDrop@1 displayName: 🔺 Upload VSTS Drop inputs: dropFolder: $(Pipeline.Workspace)/VSInsertion-windows/Vsix dropName: $(VstsDropNames) accessToken: $(System.AccessToken) - task: 1ES.PublishNuget@1 displayName: 📦 Push VS-repo packages to VS feed inputs: packagesToPush: '$(Pipeline.Workspace)/VSInsertion-Windows/*.nupkg' packageParentPath: $(Pipeline.Workspace)/VSInsertion-Windows allowPackageConflicts: true publishVstsFeed: VS - task: MicroBuildInsertVsPayload@5 displayName: 🏭 Insert VS Payload inputs: TeamName: $(TeamName) TeamEmail: $(TeamEmail) InsertionPayloadName: $(Build.Repository.Name) VALIDATION BUILD $(Build.BuildNumber) ($(Build.SourceBranch)) [Skip-SymbolCheck] [Skip-HashCheck] [Skip-SignCheck] InsertionDescription: | This PR is for **validation purposes only** for !$(System.PullRequest.PullRequestId). **Do not complete**. CustomScriptExecutionCommand: $(Pipeline.Workspace)\VSInsertion-Windows\vs-insertion-script.ps1; src\VSSDK\NuGet\AllowUnstablePackages.ps1 InsertionBuildPolicies: Request Perf DDRITs InsertionReviewers: $(Build.RequestedFor) DraftPR: false # set to true and update InsertionBuildPolicy when we can specify all the validations we want to run (https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2224288) AutoCompletePR: false ShallowClone: true ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: ConnectedVSDropServiceName: 'VSEng-VSDrop-MI' env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) - powershell: | $insertionPRId = azure-pipelines/Get-InsertionPRId.ps1 $Markdown = @" Validation insertion pull request created: !$insertionPRId Please check status there before proceeding to merge this PR. Remember to Abandon and (if allowed) to Delete Source Branch on that insertion PR when validation is complete. "@ azure-pipelines/PostPRMessage.ps1 -AccessToken '$(System.AccessToken)' -Markdown $Markdown -Verbose displayName: ✏️ Comment on pull request condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest')) ================================================ FILE: azure-pipelines.yml ================================================ trigger: batch: true branches: include: - main - 'v*.*' - microbuild - 'validate/*' paths: exclude: - doc/ - '*.md' - .vscode/ - .github/ - azure-pipelines/release.yml parameters: - name: EnableMacOSBuild displayName: Build on macOS type: boolean default: false # macOS is often bogged down in Azure Pipelines - name: RunTests displayName: Run tests type: boolean default: true variables: - template: /azure-pipelines/BuildStageVariables.yml@self jobs: - template: azure-pipelines/build.yml parameters: Is1ESPT: false EnableMacOSBuild: ${{ parameters.EnableMacOSBuild }} RunTests: ${{ parameters.RunTests }} ================================================ FILE: doc/targets.md ================================================ # SlowCheetah Build Targets ### Summary SlowCheetah alters the build process for projects to ensure that the transformations are executed in the correct order and that the transformed files are used properly. To allow users to extend the behavior for their own build process, this document outlines all the native targets for SlowCheetah, including properties and items that can be modified to alter existing target behavior. ## Main ### Targets **ScCollectTransformFiles**: Collects all the files with *TransformOnBuild* true and adds them to *ScFilesToTransform*, with the necessary metadata for transformation. Runs before *ScApplyTransforms*. **ScApplyTransforms**: First creates the destination directory for all the transformations that will occur. Then, applies the transform task to each item of *ScFilesToTransform* per their metadata. Runs after *CopyFilesToOutputDirectory*. ### Properties **ScAllowReferencedConfig**: Whether config files from referenced projects are allowed when resolving references. Defaults to true. **BuildDependsOn**: List of targets that should be run as part of the build process. *ScApplyTransforms* get appended to this. ### ItemGroups **ScFilesToTransform**: Populated in ScCollectTransformationFiles. Contains all the data for files that should be transformed. Metadata: - *SourceFile*: Transformation source. - *TransformFile*: Transformation input. - *DestinationFile*: Output file of transformation. The directory for this file is created in case it does not previously exist. ## App ### Targets **ScCollectAppFiles**: Removes the app.config file from *ScFilesToTransform* and adds it to ScAppConfigToTransform for separate transformation. Copies the original app.config to *ScIntermediateAppConfig*. Depends on *ScCollectTransformFiles*. Runs before *ScApplyTransforms*. **ScTransformAppConfig**: Performs transformations on *ScIntermediateAppConfig*. Replaces the app config location before it is copied to the output. Depends on *ScCollectAppFiles*. Runs before *_CopyAppConfig*. ### Properties **ScIsApp**: Whether the project is an application. Used in *SetupProject* and *ClickOnce* targets. If *ScIsWap* is true, sets to false. Defaults to true. **ScAppConfigName**: Name of the application configuration file that should be especially transformed. Defaults to “app.config”. ### Item Groups **ScAppConfigToTransform**: Populated in *ScCollectAppFiles*. Contains data for application configuration files that should be transformed. For metadata, see *ScFilesToTransform*. ## Web ### Targets **ScCollectWebFiles**: Gets the publish configuration and adds publish transformation data to ScFilesToTransform. Depends on *ScCollectTransformFiles*. Runs before *ScApplyWebTransforms*. **ScApplyWebTransforms**: Inserted into the deploy pipeline. Depends on *ScApplyTransforms*. ### Properties **ScIsWap**: Whether the project is a web application. Verifies the project GUIDs. Defaults to false. **ScAppConfigName**: Changed to “web.config”. ### ItemGroups **ScFilesToTransform**: Adds publish transform metadata: - *PublishDestinationFile*: Location of the temporary directory used to publish from - *PublishTransformFile*: Location of the publish profile transform file. ## Additional Targets ### SetupProject Ensures a Setup Project uses the correct location for copying output files. Enabled if *ScEnableSetupProjects* is true (default is true). ### ClickOnce Ensures that the published files are extracted from the correct location for Click Once publishing. ================================================ FILE: doc/transforming_files.md ================================================ # Transforming Files with SlowCheetah ## Summary The [SlowCheetah Visual Studio extension](https://marketplace.visualstudio.com/items?itemName=vscps.SlowCheetah-XMLTransforms) allows you to add and preview transformation to files in your project. The [SlowCheetah NuGet package](https://www.nuget.org/packages/Microsoft.VisualStudio.SlowCheetah) is required for build-time transformations, which are discussed in more detail below. ## Getting Started Once the SlowCheetah extension has been installed, transformations are added by right-clicking a file. If the file type is supported, the `Add Transform` option should be visible. ![Add Transform](AddTransforms.png) Selecting this option will add transform files according to your project's [build configurations](https://docs.microsoft.com/en-us/visualstudio/ide/understanding-build-configurations). If the project has any publish profiles, transform files are also created for them. ![Transform files](TransformFiles.png) To quickly preview the transformations, right-click any of the transform files and select the `Preview Transform` option. ![Transform files](PreviewTransform.png) ![Transform files](PreviewDiff.png) ## Executing Build-Time Transformations The SlowCheetah NuGet package adds transformations logic to the build process of the project. By adding transforms using the extension and having the package installed to the project, transformations will be executed on build. It is possible to perform build-time transformation using only the NuGet package. Files that should be transformed require the `TransformOnBuild` metadata set to true. Files that specify the transformations should have the `IsTransformFile` metadata set to true. If your project supports the `DependentUpon` metadata, add that to the transform files, specifying the original file. The resulting project file would look similar to this: ``` xml true App.config True App.config True ``` ================================================ FILE: doc/update.md ================================================ # SlowCheetah in VS 2017 We have made significant changes to the SlowCheetah extension and NuGet package. This is because the old version had the following limitations: - Installation methods were inconsistent throughout versions, mixing VS extensions with NuGet packages - Build tools were installed directly to the local app data - Users' project files were manually edited to include SC files - Unnecessary files were imported into the project To fix these issues, the new version includes the following: - Support for Visual Studio 2015 and 2017 - A VS extension that assists with adding and previewing transform - A NuGet package that handles all the build and transformation logic To use this new version, the older one must be manually removed from your project before installing the new version. From here on, all updates to the extension and NuGet packages will be handled by their respective platform. ## Instructions If SlowCheetah has never been installed on your computer or used in any of your projects, simply install the latest Nuget package [here](https://www.nuget.org/packages/Microsoft.VisualStudio.SlowCheetah/). Version 3.0.61 and higher of the SlowCheetah Extension should prompt the user to automatically remove any present older installations. If you have issues with this, the following instructions guide you through manually updating your project. If you have used SlowCheetah before, remove the following lines from your project file. First, a PropertyGroup that looks like this: ``` XML $([System.IO.Path]::GetFullPath( $(MSBuildProjectDirectory)\..\packages\SlowCheetah.2.5.15\tools\)) true $([System.IO.Path]::GetFullPath( $(MSBuildProjectDirectory)\Properties\SlowCheetah\SlowCheetah.Transforms.targets )) $(SlowCheetah_NuGetImportPath) ``` Then, remove an import that looks like this: ``` XML ``` Lastly, remove the following includes: ``` XML ``` Also, delete the `Properties\SlowCheetah` folder and the `packageRestore.proj` file from your project if they are present. If there are any other lines in the project file or any items in the project tree related to SlowCheetah, those should also be removed. All SlowCheetah related lines that should be present are the transformation files which are marked with `true` on the project file. Now, install or update to the latest SlowCheetah package through the NuGet package manager and download the latest extension from the Visual Studio extension gallery. Optionally, if you no longer plan on using the older version of SlowCheetah on any projects, you may safely delete the `%LocalAppData%\Microsoft\MSBuild\SlowCheetah` folder. ================================================ FILE: docfx/.gitignore ================================================ _site/ api/ ================================================ FILE: docfx/docfx.json ================================================ { "metadata": [ { "src": [ { "src": "../src/Library", "files": [ "**/*.csproj" ] } ], "dest": "api" } ], "build": { "content": [ { "files": [ "**/*.{md,yml}" ], "exclude": [ "_site/**" ] } ], "resource": [ { "files": [ "images/**" ] } ], "xref": [ "https://learn.microsoft.com/en-us/dotnet/.xrefmap.json" ], "output": "_site", "template": [ "default", "modern" ], "globalMetadata": { "_appName": "Library", "_appTitle": "Library", "_enableSearch": true, "pdf": false } } } ================================================ FILE: docfx/docs/features.md ================================================ # Features TODO ================================================ FILE: docfx/docs/getting-started.md ================================================ # Getting Started ## Installation Consume this library via its NuGet Package. Click on the badge to find its latest version and the instructions for consuming it that best apply to your project. [![NuGet package](https://img.shields.io/nuget/v/Library.svg)](https://nuget.org/packages/Library) ## Usage TODO ================================================ FILE: docfx/docs/toc.yml ================================================ items: - name: Features href: features.md - name: Getting Started href: getting-started.md ================================================ FILE: docfx/index.md ================================================ --- _layout: landing --- # Overview This is your docfx landing page. Click "Docs" across the top to get started. ================================================ FILE: docfx/toc.yml ================================================ items: - name: Docs href: docs/ - name: API href: api/ ================================================ FILE: global.json ================================================ { "sdk": { "version": "10.0.204", "rollForward": "patch", "allowPrerelease": false }, "msbuild-sdks": { "Microsoft.Build.NoTargets": "3.7.56", "Microsoft.Build.Traversal": "3.1.6" } } ================================================ FILE: init.cmd ================================================ @echo off SETLOCAL set PS1UnderCmd=1 :: Get the datetime in a format that can go in a filename. set _my_datetime=%date%_%time% set _my_datetime=%_my_datetime: =_% set _my_datetime=%_my_datetime::=% set _my_datetime=%_my_datetime:/=_% set _my_datetime=%_my_datetime:.=_% set CmdEnvScriptPath=%temp%\envvarscript_%_my_datetime%.cmd powershell.exe -NoProfile -NoLogo -ExecutionPolicy bypass -Command "try { & '%~dpn0.ps1' %*; exit $LASTEXITCODE } catch { write-host $_; exit 1 }" :: Set environment variables in the parent cmd.exe process. IF EXIST "%CmdEnvScriptPath%" ( ENDLOCAL CALL "%CmdEnvScriptPath%" DEL "%CmdEnvScriptPath%" ) ================================================ FILE: init.ps1 ================================================ #!/usr/bin/env pwsh <# .SYNOPSIS Installs dependencies required to build and test the projects in this repository. .DESCRIPTION This MAY not require elevation, as the SDK and runtimes are installed to a per-user location, unless the `-InstallLocality` switch is specified directing to a per-repo or per-machine location. See detailed help on that switch for more information. The CmdEnvScriptPath environment variable may be optionally set to a path to a cmd shell script to be created (or appended to if it already exists) that will set the environment variables in cmd.exe that are set within the PowerShell environment. This is used by init.cmd in order to reapply any new environment variables to the parent cmd.exe process that were set in the powershell child process. .PARAMETER InstallLocality A value indicating whether dependencies should be installed locally to the repo or at a per-user location. Per-user allows sharing the installed dependencies across repositories and allows use of a shared expanded package cache. Visual Studio will only notice and use these SDKs/runtimes if VS is launched from the environment that runs this script. Per-repo allows for high isolation, allowing for a more precise recreation of the environment within an Azure Pipelines build. When using 'repo', environment variables are set to cause the locally installed dotnet SDK to be used. Per-repo can lead to file locking issues when dotnet.exe is left running as a build server and can be mitigated by running `dotnet build-server shutdown`. Per-machine requires elevation and will download and install all SDKs and runtimes to machine-wide locations so all applications can find it. .PARAMETER NoPrerequisites Skips the installation of prerequisite software (e.g. SDKs, tools). .PARAMETER NoNuGetCredProvider Skips the installation of the NuGet credential provider. Useful in pipelines with the `NuGetAuthenticate` task, as a workaround for https://github.com/microsoft/artifacts-credprovider/issues/244. This switch is ignored and installation is skipped when -NoPrerequisites is specified. .PARAMETER UpgradePrerequisites Takes time to install prerequisites even if they are already present in case they need to be upgraded. No effect if -NoPrerequisites is specified. .PARAMETER NoRestore Skips the package restore step. .PARAMETER NoToolRestore Skips the dotnet tool restore step. .PARAMETER Signing Install the MicroBuild signing plugin for building test-signed builds on desktop machines. .PARAMETER Localization Install the MicroBuild localization plugin for building loc builds on desktop machines. The environment is configured to build pseudo-loc for JPN only, but may be used to build all languages with shipping-style loc by using the `/p:loctype=full,loclanguages=vs` when building. .PARAMETER Setup Install the MicroBuild setup plugin for building VSIXv3 packages. .PARAMETER OptProf Install the MicroBuild OptProf plugin for building optimized assemblies on desktop machines. .PARAMETER Sbom Install the MicroBuild SBOM plugin. .PARAMETER AccessToken An optional access token for authenticating to Azure Artifacts authenticated feeds. .PARAMETER Interactive Runs NuGet restore in interactive mode. This can turn authentication failures into authentication challenges. #> [CmdletBinding(SupportsShouldProcess = $true)] Param ( [ValidateSet('repo', 'user', 'machine')] [string]$InstallLocality = 'user', [Parameter()] [switch]$NoPrerequisites, [Parameter()] [switch]$NoNuGetCredProvider, [Parameter()] [switch]$UpgradePrerequisites, [Parameter()] [switch]$NoRestore, [Parameter()] [switch]$NoToolRestore, [Parameter()] [switch]$Signing, [Parameter()] [switch]$Localization, [Parameter()] [switch]$Setup, [Parameter()] [switch]$OptProf, [Parameter()] [switch]$SBOM, [Parameter()] [string]$AccessToken, [Parameter()] [switch]$Interactive ) $EnvVars = @{} $PrependPath = @() if (!$NoPrerequisites) { if (!$NoNuGetCredProvider) { & "$PSScriptRoot\tools\Install-NuGetCredProvider.ps1" -AccessToken $AccessToken -Force:$UpgradePrerequisites } & "$PSScriptRoot\tools\Install-DotNetSdk.ps1" -InstallLocality $InstallLocality if ($LASTEXITCODE -eq 3010) { Exit 3010 } # The procdump tool and env var is required for dotnet test to collect hang/crash dumps of tests. # But it only works on Windows. if ($env:OS -eq 'Windows_NT') { $EnvVars['PROCDUMP_PATH'] = & "$PSScriptRoot\tools\Get-ProcDump.ps1" } } # Workaround nuget credential provider bug that causes very unreliable package restores on Azure Pipelines $env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20 $env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20 Push-Location $PSScriptRoot try { $HeaderColor = 'Green' $RestoreArguments = @() if ($Interactive) { $RestoreArguments += '--interactive' } if (!$NoRestore -and $PSCmdlet.ShouldProcess("NuGet packages", "Restore")) { Write-Host "Restoring NuGet packages" -ForegroundColor $HeaderColor dotnet restore @RestoreArguments src if ($lastexitcode -ne 0) { throw "Failure while restoring packages." } } if (!$NoToolRestore -and $PSCmdlet.ShouldProcess("dotnet tool", "restore")) { dotnet tool restore @RestoreArguments if ($lastexitcode -ne 0) { throw "Failure while restoring dotnet CLI tools." } } $InstallNuGetPkgScriptPath = "$PSScriptRoot\tools\Install-NuGetPackage.ps1" $nugetVerbosity = 'quiet' if ($Verbose) { $nugetVerbosity = 'normal' } $MicroBuildPackageSource = 'https://pkgs.dev.azure.com/devdiv/_packaging/MicroBuildToolset%40Local/nuget/v3/index.json' if ($Signing) { Write-Host "Installing MicroBuild signing plugin" -ForegroundColor $HeaderColor & $InstallNuGetPkgScriptPath MicroBuild.Plugins.Signing -source $MicroBuildPackageSource -Verbosity $nugetVerbosity $EnvVars['SignType'] = "Test" } if ($Setup) { Write-Host "Installing MicroBuild SwixBuild plugin..." -ForegroundColor $HeaderColor & $InstallNuGetPkgScriptPath Microsoft.VisualStudioEng.MicroBuild.Plugins.SwixBuild -source $MicroBuildPackageSource -Verbosity $nugetVerbosity } if ($OptProf) { Write-Host "Installing MicroBuild OptProf plugin" -ForegroundColor $HeaderColor & $InstallNuGetPkgScriptPath MicroBuild.Plugins.OptProf -source $MicroBuildPackageSource -Verbosity $nugetVerbosity $EnvVars['OptProfEnabled'] = '1' } if ($Localization) { Write-Host "Installing MicroBuild localization plugin" -ForegroundColor $HeaderColor & $InstallNuGetPkgScriptPath MicroBuild.Plugins.Localization -source $MicroBuildPackageSource -Verbosity $nugetVerbosity $EnvVars['LocType'] = "Pseudo" $EnvVars['LocLanguages'] = "JPN" } if ($SBOM) { Write-Host "Installing MicroBuild SBOM plugin" -ForegroundColor $HeaderColor & $InstallNuGetPkgScriptPath MicroBuild.Plugins.Sbom -source $MicroBuildPackageSource -Verbosity $nugetVerbosity # The feed with the latest versions of the tool is at 'https://1essharedassets.pkgs.visualstudio.com/1esPkgs/_packaging/SBOMTool/nuget/v3/index.json', # but we'll use the feed that the SBOM task itself uses to install the tool for consistency. $PkgMicrosoft_ManifestTool_CrossPlatform = & $InstallNuGetPkgScriptPath Microsoft.ManifestTool.CrossPlatform -source $MicroBuildPackageSource -Verbosity $nugetVerbosity $EnvVars['GenerateSBOM'] = "true" $EnvVars['PkgMicrosoft_ManifestTool_CrossPlatform'] = $PkgMicrosoft_ManifestTool_CrossPlatform } & "$PSScriptRoot/tools/Set-EnvVars.ps1" -Variables $EnvVars -PrependPath $PrependPath | Out-Null } catch { Write-Error $error[0] exit $lastexitcode } finally { Pop-Location } ================================================ FILE: nuget.config ================================================  ================================================ FILE: samples/FSharpDemo/FSharpDemo.fsproj ================================================  Debug x86 8.0.30703 2.0 {85361198-db0e-4528-a513-80e025de74a0} Exe FSharpDemo FSharpDemo v4.0 Client FSharpDemo true full false false bin\Debug\ DEBUG;TRACE 3 x86 bin\Debug\FSharpDemo.XML pdbonly true true bin\Release\ TRACE 3 x86 bin\Release\FSharpDemo.XML $(LOCALAPPDATA)\Microsoft\MSBuild\SlowCheetah\v1\SlowCheetah.Transforms.targets 11 true True True ================================================ FILE: samples/FSharpDemo/Program.fs ================================================ // Learn more about F# at http://fsharp.net let settingOne = System.Configuration.ConfigurationManager.AppSettings.["settingOne"]; let settingTwo = System.Configuration.ConfigurationManager.AppSettings.["settingTwo"]; let settingthree = System.Configuration.ConfigurationManager.AppSettings.["settingThree"]; printfn "settingOne: %s" settingOne printfn "settingTwo: %s" settingTwo printfn "settingThree: %s" settingthree printfn " " printfn "Press any key to close" System.Console.ReadKey(true) ================================================ FILE: samples/FSharpDemo/app.Debug.config ================================================ ================================================ FILE: samples/FSharpDemo/app.Release.config ================================================ ================================================ FILE: samples/FSharpDemo/app.config ================================================  ================================================ FILE: samples/Linked-files/connectionStrings.Debug.config ================================================ ================================================ FILE: samples/Linked-files/connectionStrings.Release.config ================================================ ================================================ FILE: samples/Linked-files/connectionStrings.config ================================================  ================================================ FILE: samples/SlowCheetah.Samples.sln ================================================  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wpf.Transform", "Wpf.Transform\Wpf.Transform.csproj", "{F5E1A5EA-4544-49B2-AE4A-8590D96E6537}" EndProject Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "TransformSetupProject", "TransformSetupProject\TransformSetupProject.vdproj", "{2B730C2F-9E22-49CE-8908-E40E82CBAE9E}" EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharpDemo", "FSharpDemo\FSharpDemo.fsproj", "{85361198-DB0E-4528-A513-80E025DE74A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDemo", "WebDemo\WebDemo.csproj", "{B6F0849F-279E-4BDA-B7CF-8E83D4BF88AA}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Azure", "Azure", "{08423D14-F6E1-467E-94FC-53077FBB0D71}" EndProject Project("{CC5FD16D-436D-48AD-A40C-5A424C6E3E79}") = "WindowsAzure1", "WindowsAzure1\WindowsAzure1.ccproj", "{0F00D743-DBAE-48CE-AAA0-CB9B407551D9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkerRole1", "WorkerRole1\WorkerRole1.csproj", "{DAE9103D-C4AF-48AE-8008-F0425E33F0EB}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|Mixed Platforms = Debug|Mixed Platforms Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU Release|Mixed Platforms = Release|Mixed Platforms Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {F5E1A5EA-4544-49B2-AE4A-8590D96E6537}.Debug|Any CPU.ActiveCfg = Debug|x86 {F5E1A5EA-4544-49B2-AE4A-8590D96E6537}.Debug|Any CPU.Build.0 = Debug|x86 {F5E1A5EA-4544-49B2-AE4A-8590D96E6537}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {F5E1A5EA-4544-49B2-AE4A-8590D96E6537}.Debug|Mixed Platforms.Build.0 = Debug|x86 {F5E1A5EA-4544-49B2-AE4A-8590D96E6537}.Debug|x86.ActiveCfg = Debug|x86 {F5E1A5EA-4544-49B2-AE4A-8590D96E6537}.Debug|x86.Build.0 = Debug|x86 {F5E1A5EA-4544-49B2-AE4A-8590D96E6537}.Release|Any CPU.ActiveCfg = Release|x86 {F5E1A5EA-4544-49B2-AE4A-8590D96E6537}.Release|Any CPU.Build.0 = Release|x86 {F5E1A5EA-4544-49B2-AE4A-8590D96E6537}.Release|Mixed Platforms.ActiveCfg = Release|x86 {F5E1A5EA-4544-49B2-AE4A-8590D96E6537}.Release|Mixed Platforms.Build.0 = Release|x86 {F5E1A5EA-4544-49B2-AE4A-8590D96E6537}.Release|x86.ActiveCfg = Release|x86 {F5E1A5EA-4544-49B2-AE4A-8590D96E6537}.Release|x86.Build.0 = Release|x86 {2B730C2F-9E22-49CE-8908-E40E82CBAE9E}.Debug|Any CPU.ActiveCfg = Debug {2B730C2F-9E22-49CE-8908-E40E82CBAE9E}.Debug|Any CPU.Build.0 = Debug {2B730C2F-9E22-49CE-8908-E40E82CBAE9E}.Debug|Mixed Platforms.ActiveCfg = Debug {2B730C2F-9E22-49CE-8908-E40E82CBAE9E}.Debug|Mixed Platforms.Build.0 = Debug {2B730C2F-9E22-49CE-8908-E40E82CBAE9E}.Debug|x86.ActiveCfg = Debug {2B730C2F-9E22-49CE-8908-E40E82CBAE9E}.Release|Any CPU.ActiveCfg = Release {2B730C2F-9E22-49CE-8908-E40E82CBAE9E}.Release|Any CPU.Build.0 = Release {2B730C2F-9E22-49CE-8908-E40E82CBAE9E}.Release|Mixed Platforms.ActiveCfg = Release {2B730C2F-9E22-49CE-8908-E40E82CBAE9E}.Release|Mixed Platforms.Build.0 = Release {2B730C2F-9E22-49CE-8908-E40E82CBAE9E}.Release|x86.ActiveCfg = Release {85361198-DB0E-4528-A513-80E025DE74A0}.Debug|Any CPU.ActiveCfg = Debug|x86 {85361198-DB0E-4528-A513-80E025DE74A0}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {85361198-DB0E-4528-A513-80E025DE74A0}.Debug|Mixed Platforms.Build.0 = Debug|x86 {85361198-DB0E-4528-A513-80E025DE74A0}.Debug|x86.ActiveCfg = Debug|x86 {85361198-DB0E-4528-A513-80E025DE74A0}.Debug|x86.Build.0 = Debug|x86 {85361198-DB0E-4528-A513-80E025DE74A0}.Release|Any CPU.ActiveCfg = Release|x86 {85361198-DB0E-4528-A513-80E025DE74A0}.Release|Any CPU.Build.0 = Release|x86 {85361198-DB0E-4528-A513-80E025DE74A0}.Release|Mixed Platforms.ActiveCfg = Release|x86 {85361198-DB0E-4528-A513-80E025DE74A0}.Release|Mixed Platforms.Build.0 = Release|x86 {85361198-DB0E-4528-A513-80E025DE74A0}.Release|x86.ActiveCfg = Release|x86 {85361198-DB0E-4528-A513-80E025DE74A0}.Release|x86.Build.0 = Release|x86 {B6F0849F-279E-4BDA-B7CF-8E83D4BF88AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B6F0849F-279E-4BDA-B7CF-8E83D4BF88AA}.Debug|Any CPU.Build.0 = Debug|Any CPU {B6F0849F-279E-4BDA-B7CF-8E83D4BF88AA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {B6F0849F-279E-4BDA-B7CF-8E83D4BF88AA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {B6F0849F-279E-4BDA-B7CF-8E83D4BF88AA}.Debug|x86.ActiveCfg = Debug|Any CPU {B6F0849F-279E-4BDA-B7CF-8E83D4BF88AA}.Release|Any CPU.ActiveCfg = Release|Any CPU {B6F0849F-279E-4BDA-B7CF-8E83D4BF88AA}.Release|Any CPU.Build.0 = Release|Any CPU {B6F0849F-279E-4BDA-B7CF-8E83D4BF88AA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {B6F0849F-279E-4BDA-B7CF-8E83D4BF88AA}.Release|Mixed Platforms.Build.0 = Release|Any CPU {B6F0849F-279E-4BDA-B7CF-8E83D4BF88AA}.Release|x86.ActiveCfg = Release|Any CPU {0F00D743-DBAE-48CE-AAA0-CB9B407551D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0F00D743-DBAE-48CE-AAA0-CB9B407551D9}.Debug|Any CPU.Build.0 = Debug|Any CPU {0F00D743-DBAE-48CE-AAA0-CB9B407551D9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {0F00D743-DBAE-48CE-AAA0-CB9B407551D9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {0F00D743-DBAE-48CE-AAA0-CB9B407551D9}.Debug|x86.ActiveCfg = Debug|Any CPU {0F00D743-DBAE-48CE-AAA0-CB9B407551D9}.Release|Any CPU.ActiveCfg = Release|Any CPU {0F00D743-DBAE-48CE-AAA0-CB9B407551D9}.Release|Any CPU.Build.0 = Release|Any CPU {0F00D743-DBAE-48CE-AAA0-CB9B407551D9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {0F00D743-DBAE-48CE-AAA0-CB9B407551D9}.Release|Mixed Platforms.Build.0 = Release|Any CPU {0F00D743-DBAE-48CE-AAA0-CB9B407551D9}.Release|x86.ActiveCfg = Release|Any CPU {DAE9103D-C4AF-48AE-8008-F0425E33F0EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DAE9103D-C4AF-48AE-8008-F0425E33F0EB}.Debug|Any CPU.Build.0 = Debug|Any CPU {DAE9103D-C4AF-48AE-8008-F0425E33F0EB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {DAE9103D-C4AF-48AE-8008-F0425E33F0EB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {DAE9103D-C4AF-48AE-8008-F0425E33F0EB}.Debug|x86.ActiveCfg = Debug|Any CPU {DAE9103D-C4AF-48AE-8008-F0425E33F0EB}.Release|Any CPU.ActiveCfg = Release|Any CPU {DAE9103D-C4AF-48AE-8008-F0425E33F0EB}.Release|Any CPU.Build.0 = Release|Any CPU {DAE9103D-C4AF-48AE-8008-F0425E33F0EB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {DAE9103D-C4AF-48AE-8008-F0425E33F0EB}.Release|Mixed Platforms.Build.0 = Release|Any CPU {DAE9103D-C4AF-48AE-8008-F0425E33F0EB}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {0F00D743-DBAE-48CE-AAA0-CB9B407551D9} = {08423D14-F6E1-467E-94FC-53077FBB0D71} {DAE9103D-C4AF-48AE-8008-F0425E33F0EB} = {08423D14-F6E1-467E-94FC-53077FBB0D71} EndGlobalSection EndGlobal ================================================ FILE: samples/TransformSetupProject/.gitignore ================================================ # Folders Debug Release # Files ================================================ FILE: samples/TransformSetupProject/TransformSetupProject.vdproj ================================================ "DeployProject" { "VSVersion" = "3:800" "ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}" "IsWebType" = "8:FALSE" "ProjectName" = "8:TransformSetupProject" "LanguageId" = "3:1033" "CodePage" = "3:1252" "UILanguageId" = "3:1033" "SccProjectName" = "8:" "SccLocalPath" = "8:" "SccAuxPath" = "8:" "SccProvider" = "8:" "Hierarchy" { "Entry" { "MsmKey" = "8:_F27A358992344590BBC1C5CA77A38F30" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_F27A358992344590BBC1C5CA77A38F30" "MsmSig" = "8:_UNDEFINED" } } "Configurations" { "Debug" { "DisplayName" = "8:Debug" "IsDebugOnly" = "11:TRUE" "IsReleaseOnly" = "11:FALSE" "OutputFilename" = "8:Debug\\TransformSetupProject.msi" "PackageFilesAs" = "3:2" "PackageFileSize" = "3:-2147483648" "CabType" = "3:1" "Compression" = "3:2" "SignOutput" = "11:FALSE" "CertificateFile" = "8:" "PrivateKeyFile" = "8:" "TimeStampServer" = "8:" "InstallerBootstrapper" = "3:2" "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" { "Enabled" = "11:TRUE" "PromptEnabled" = "11:TRUE" "PrerequisitesLocation" = "2:1" "Url" = "8:" "ComponentsUrl" = "8:" "Items" { "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.0,Profile=Client" { "Name" = "8:Microsoft .NET Framework 4 Client Profile (x86 and x64)" "ProductCode" = "8:.NETFramework,Version=v4.0,Profile=Client" } "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1" { "Name" = "8:Windows Installer 3.1" "ProductCode" = "8:Microsoft.Windows.Installer.3.1" } } } } "Release" { "DisplayName" = "8:Release" "IsDebugOnly" = "11:FALSE" "IsReleaseOnly" = "11:TRUE" "OutputFilename" = "8:Release\\TransformSetupProject.msi" "PackageFilesAs" = "3:2" "PackageFileSize" = "3:-2147483648" "CabType" = "3:1" "Compression" = "3:2" "SignOutput" = "11:FALSE" "CertificateFile" = "8:" "PrivateKeyFile" = "8:" "TimeStampServer" = "8:" "InstallerBootstrapper" = "3:2" "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" { "Enabled" = "11:TRUE" "PromptEnabled" = "11:TRUE" "PrerequisitesLocation" = "2:1" "Url" = "8:" "ComponentsUrl" = "8:" "Items" { "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.0,Profile=Client" { "Name" = "8:Microsoft .NET Framework 4 Client Profile (x86 and x64)" "ProductCode" = "8:.NETFramework,Version=v4.0,Profile=Client" } "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1" { "Name" = "8:Windows Installer 3.1" "ProductCode" = "8:Microsoft.Windows.Installer.3.1" } } } } } "Deployable" { "CustomAction" { } "DefaultFeature" { "Name" = "8:DefaultFeature" "Title" = "8:" "Description" = "8:" } "ExternalPersistence" { "LaunchCondition" { "{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_71517CAEDC524221A9EDD84DED877D59" { "Name" = "8:.NET Framework" "Message" = "8:[VSDNETMSG]" "FrameworkVersion" = "8:.NETFramework,Version=v4.0,Profile=Client" "AllowLaterVersions" = "11:FALSE" "InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=131000" } } } "File" { } "FileType" { } "Folder" { "{1525181F-901A-416C-8A58-119130FE478E}:_742E28C099B4475A81762B1574DF4C0C" { "Name" = "8:#1919" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" "Transitive" = "11:FALSE" "Property" = "8:ProgramMenuFolder" "Folders" { } } "{3C67513D-01DD-4637-8A68-80971EB9504F}:_89C62D7C835442DCA303478A82CAD89B" { "DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]" "Name" = "8:#1925" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" "Transitive" = "11:FALSE" "Property" = "8:TARGETDIR" "Folders" { } } "{1525181F-901A-416C-8A58-119130FE478E}:_C4D9D6411394445CB40C88AA843AB193" { "Name" = "8:#1916" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" "Transitive" = "11:FALSE" "Property" = "8:DesktopFolder" "Folders" { } } } "LaunchCondition" { } "Locator" { } "MsiBootstrapper" { "LangId" = "3:1033" "RequiresElevation" = "11:FALSE" } "Product" { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:TransformSetupProject" "ProductCode" = "8:{F5369A89-3C1D-4C1F-9106-4DDB0DE62372}" "PackageCode" = "8:{2DD46CDB-8679-4313-B6AE-800BDC482D64}" "UpgradeCode" = "8:{022F29ED-59D2-43E7-8BA8-164F91D9AE65}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:FALSE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" "ProductVersion" = "8:1.0.0" "Manufacturer" = "8:SlowCheetah" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" "Title" = "8:TransformSetupProject" "Subject" = "8:" "ARPCONTACT" = "8:SlowCheetah" "Keywords" = "8:" "ARPCOMMENTS" = "8:" "ARPURLINFOABOUT" = "8:" "ARPPRODUCTICON" = "8:" "ARPIconIndex" = "3:0" "SearchPath" = "8:" "UseSystemSearchPath" = "11:TRUE" "TargetPlatform" = "3:0" "PreBuildEvent" = "8:" "PostBuildEvent" = "8:" "RunPostBuildEvent" = "3:0" } "Registry" { "HKLM" { "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_1D47AC607192492795B501101C97184D" { "Name" = "8:Software" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_D4F77F0403764FF2AFD7CDEDF156A4D4" { "Name" = "8:[Manufacturer]" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { } "Values" { } } } "Values" { } } } } "HKCU" { "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_BDFF528BD9394B3EB3237262AC9A062F" { "Name" = "8:Software" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_2F854B15E50641B29117685E19D30D11" { "Name" = "8:[Manufacturer]" "Condition" = "8:" "AlwaysCreate" = "11:FALSE" "DeleteAtUninstall" = "11:FALSE" "Transitive" = "11:FALSE" "Keys" { } "Values" { } } } "Values" { } } } } "HKCR" { "Keys" { } } "HKU" { "Keys" { } } "HKPU" { "Keys" { } } } "Sequences" { } "Shortcut" { } "UserInterface" { "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_2655780606CC4E7FBD7ED7FD032A7059" { "Name" = "8:#1901" "Sequence" = "3:1" "Attributes" = "3:2" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_1AFC385270184EEE965265BD99F06C7E" { "Sequence" = "3:100" "DisplayName" = "8:Progress" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdProgressDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "ShowProgress" { "Name" = "8:ShowProgress" "DisplayName" = "8:#1009" "Description" = "8:#1109" "Type" = "3:5" "ContextData" = "8:1;True=1;False=0" "Attributes" = "3:0" "Setting" = "3:0" "Value" = "3:1" "DefaultValue" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_2863FE074CE044B783610E64B41EE551" { "Name" = "8:#1902" "Sequence" = "3:1" "Attributes" = "3:3" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F5A581076C9B4C38B113299A8D30011C" { "Sequence" = "3:100" "DisplayName" = "8:Finished" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdFinishedDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "UpdateText" { "Name" = "8:UpdateText" "DisplayName" = "8:#1058" "Description" = "8:#1158" "Type" = "3:15" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1258" "DefaultValue" = "8:#1258" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_4F6B30A8778B493A8B781A89AE074CDA" { "Name" = "8:#1901" "Sequence" = "3:2" "Attributes" = "3:2" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_17A7A0A918724F24A92D9137DA562309" { "Sequence" = "3:100" "DisplayName" = "8:Progress" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminProgressDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "ShowProgress" { "Name" = "8:ShowProgress" "DisplayName" = "8:#1009" "Description" = "8:#1109" "Type" = "3:5" "ContextData" = "8:1;True=1;False=0" "Attributes" = "3:0" "Setting" = "3:0" "Value" = "3:1" "DefaultValue" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_4FA92381D3BA4C67A28338E4DD759371" { "Name" = "8:#1900" "Sequence" = "3:1" "Attributes" = "3:1" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_88F47C13FEDE4052A0F9428CF4F29C06" { "Sequence" = "3:100" "DisplayName" = "8:Welcome" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdWelcomeDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "CopyrightWarning" { "Name" = "8:CopyrightWarning" "DisplayName" = "8:#1002" "Description" = "8:#1102" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1202" "DefaultValue" = "8:#1202" "UsePlugInResources" = "11:TRUE" } "Welcome" { "Name" = "8:Welcome" "DisplayName" = "8:#1003" "Description" = "8:#1103" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1203" "DefaultValue" = "8:#1203" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_A6E7528FE2E14FF8B695E1FDED92FC84" { "Sequence" = "3:300" "DisplayName" = "8:Confirm Installation" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdConfirmDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_B8FA2E13763E452AABB24FD1399CE001" { "Sequence" = "3:200" "DisplayName" = "8:Installation Folder" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdFolderDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "InstallAllUsersVisible" { "Name" = "8:InstallAllUsersVisible" "DisplayName" = "8:#1059" "Description" = "8:#1159" "Type" = "3:5" "ContextData" = "8:1;True=1;False=0" "Attributes" = "3:0" "Setting" = "3:0" "Value" = "3:1" "DefaultValue" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_5F0D8C62FAA54FB68F2B251D0BEAFBB3" { "Name" = "8:#1902" "Sequence" = "3:2" "Attributes" = "3:3" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_98D7A78C70C244FA8AAA9B382734E006" { "Sequence" = "3:100" "DisplayName" = "8:Finished" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminFinishedDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_86C6586C0B5C4118AA748158D303B196" { "UseDynamicProperties" = "11:FALSE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdUserInterface.wim" } "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_ABCF9DF9706E440EA24701B416346A62" { "UseDynamicProperties" = "11:FALSE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdBasicDialogs.wim" } "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_F8C9C62BD0FC476293AEEB70BE4B8504" { "Name" = "8:#1900" "Sequence" = "3:2" "Attributes" = "3:1" "Dialogs" { "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_267F6E53A1BE4E32BD698358C396339C" { "Sequence" = "3:200" "DisplayName" = "8:Installation Folder" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminFolderDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_A0BBB8149B7F4BECA5DE6AC16A6A386C" { "Sequence" = "3:100" "DisplayName" = "8:Welcome" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } "CopyrightWarning" { "Name" = "8:CopyrightWarning" "DisplayName" = "8:#1002" "Description" = "8:#1102" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1202" "DefaultValue" = "8:#1202" "UsePlugInResources" = "11:TRUE" } "Welcome" { "Name" = "8:Welcome" "DisplayName" = "8:#1003" "Description" = "8:#1103" "Type" = "3:3" "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:1" "Value" = "8:#1203" "DefaultValue" = "8:#1203" "UsePlugInResources" = "11:TRUE" } } } "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E51A4B5361724CB287ECC69CD821C7B9" { "Sequence" = "3:300" "DisplayName" = "8:Confirm Installation" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:\\VsdAdminConfirmDlg.wid" "Properties" { "BannerBitmap" { "Name" = "8:BannerBitmap" "DisplayName" = "8:#1001" "Description" = "8:#1101" "Type" = "3:8" "ContextData" = "8:Bitmap" "Attributes" = "3:4" "Setting" = "3:1" "UsePlugInResources" = "11:TRUE" } } } } } } "MergeModule" { } "ProjectOutput" { "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_F27A358992344590BBC1C5CA77A38F30" { "SourcePath" = "8:..\\Wpf.Transform\\obj\\x86\\Debug\\Wpf.Transform.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_89C62D7C835442DCA303478A82CAD89B" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" "ReadOnly" = "11:FALSE" "Hidden" = "11:FALSE" "System" = "11:FALSE" "Permanent" = "11:FALSE" "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" "IsDependency" = "11:FALSE" "IsolateTo" = "8:" "ProjectOutputGroupRegister" = "3:1" "OutputConfiguration" = "8:" "OutputGroupCanonicalName" = "8:Built" "OutputProjectGuid" = "8:{F5E1A5EA-4544-49B2-AE4A-8590D96E6537}" "ShowKeyOutput" = "11:TRUE" "ExcludeFilters" { } } } } } ================================================ FILE: samples/WebDemo/Default.aspx ================================================ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebDemo.Default" %>

For web projects the transforms are only applied on package/publish. This project has a package example. You can right click and select Publish and the publish the package.

================================================ FILE: samples/WebDemo/Default.aspx.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace WebDemo { public partial class Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } } } ================================================ FILE: samples/WebDemo/Default.aspx.designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace WebDemo { public partial class Default { } } ================================================ FILE: samples/WebDemo/Properties/AssemblyInfo.cs ================================================ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("WebDemo")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("WebDemo")] [assembly: AssemblyCopyright("Copyright © 2012")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("31dab456-6ab1-402b-a9dd-57d6c54cfb9a")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] ================================================ FILE: samples/WebDemo/Web.Debug.config ================================================  ================================================ FILE: samples/WebDemo/Web.Release.config ================================================  ================================================ FILE: samples/WebDemo/Web.config ================================================  ================================================ FILE: samples/WebDemo/WebDemo.csproj ================================================  Debug AnyCPU 2.0 {B6F0849F-279E-4BDA-B7CF-8E83D4BF88AA} {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} Library Properties WebDemo WebDemo v4.0 false 4.0 true full false bin\ DEBUG;TRACE prompt 4 pdbonly true bin\ TRACE prompt 4 $(LOCALAPPDATA)\Microsoft\MSBuild\SlowCheetah\v1\SlowCheetah.Transforms.targets Web.config Web.config Default.aspx ASPXCodeBehind Default.aspx true connectionStrings.config True connectionStrings.config True Designer connectionStrings.config True Designer 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) False True 6332 / False False False ================================================ FILE: samples/WebDemo/connectionStrings.Debug.config ================================================ ================================================ FILE: samples/WebDemo/connectionStrings.Release.config ================================================ ================================================ FILE: samples/WebDemo/connectionStrings.ToPkg.config ================================================ ================================================ FILE: samples/WebDemo/connectionStrings.config ================================================  ================================================ FILE: samples/WindowsAzure1/ServiceConfiguration.Cloud.cscfg ================================================ ================================================ FILE: samples/WindowsAzure1/ServiceConfiguration.Local.cscfg ================================================ ================================================ FILE: samples/WindowsAzure1/ServiceDefinition.csdef ================================================  ================================================ FILE: samples/WindowsAzure1/WindowsAzure1.ccproj ================================================  Debug AnyCPU 1.8 0f00d743-dbae-48ce-aaa0-cb9b407551d9 Library Properties WindowsAzure1 WindowsAzure1 True WindowsAzure1 true full false bin\Debug\ DEBUG;TRACE prompt 4 pdbonly true bin\Release\ TRACE prompt 4 WorkerRole1 {dae9103d-c4af-48ae-8008-f0425e33f0eb} True Worker WorkerRole1 True 10.0 $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\1.8\ ================================================ FILE: samples/WorkerRole1/Properties/AssemblyInfo.cs ================================================ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("WorkerRole1")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("WorkerRole1")] [assembly: AssemblyCopyright("Copyright © 2012")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("d68bc4d9-d829-478c-921c-7bc2c500962c")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] ================================================ FILE: samples/WorkerRole1/WorkerRole.cs ================================================ using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Net; using System.Threading; using Microsoft.WindowsAzure; using Microsoft.WindowsAzure.Diagnostics; using Microsoft.WindowsAzure.ServiceRuntime; using Microsoft.WindowsAzure.StorageClient; using System.Configuration; namespace WorkerRole1 { public class WorkerRole : RoleEntryPoint { public override void Run() { // This is a sample worker implementation. Replace with your logic. Trace.WriteLine("WorkerRole1 entry point called", "Information"); foreach (var key in ConfigurationManager.AppSettings.AllKeys) { Trace.Write(string.Format("[key='{0}',value='{1}']",key,ConfigurationManager.AppSettings[key])); } while (true) { Thread.Sleep(10000); Trace.WriteLine("Working", "Information"); } } public override bool OnStart() { // Set the maximum number of concurrent connections ServicePointManager.DefaultConnectionLimit = 12; // For information on handling configuration changes // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357. return base.OnStart(); } } } ================================================ FILE: samples/WorkerRole1/WorkerRole1.csproj ================================================  Debug AnyCPU 8.0.30703 2.0 {DAE9103D-C4AF-48AE-8008-F0425E33F0EB} Library Properties WorkerRole1 WorkerRole1 v4.0 512 Worker true full false bin\Debug\ DEBUG;TRACE prompt 4 pdbonly true bin\Release\ TRACE prompt 4 $(LOCALAPPDATA)\Microsoft\MSBuild\SlowCheetah\v1\SlowCheetah.Transforms.targets ..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll True False ..\packages\WindowsAzure.Storage.1.7.0.0\lib\net35-full\Microsoft.WindowsAzure.StorageClient.dll true Designer app.config True Designer app.config True Designer ================================================ FILE: samples/WorkerRole1/XMLFile1.xml ================================================  ================================================ FILE: samples/WorkerRole1/app.Debug.config ================================================ ================================================ FILE: samples/WorkerRole1/app.Release.config ================================================ ================================================ FILE: samples/WorkerRole1/app.config ================================================  ================================================ FILE: samples/WorkerRole1/contacts.Debug.xml ================================================ ================================================ FILE: samples/WorkerRole1/contacts.Release.xml ================================================ ================================================ FILE: samples/WorkerRole1/contacts.xml ================================================  ================================================ FILE: samples/WorkerRole1/packages.config ================================================  ================================================ FILE: samples/Wpf.Transform/App.xaml ================================================  ================================================ FILE: samples/Wpf.Transform/App.xaml.cs ================================================ using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Linq; using System.Windows; namespace Wpf.Transform { /// /// Interaction logic for App.xaml /// public partial class App : Application { } } ================================================ FILE: samples/Wpf.Transform/Assets/BureauBlue.xaml ================================================  #FF000000 #FFFFFFFF ================================================ FILE: samples/Wpf.Transform/MainWindow.xaml ================================================