diff --git a/.azuredevops/dependabot.yml b/.azuredevops/dependabot.yml
deleted file mode 100644
index f18e60565a4..00000000000
--- a/.azuredevops/dependabot.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-version: 2
-
-# Disabling dependabot on Azure DevOps as this is a mirrored repo. Updates should go through github.
-enable-campaigned-updates: false
-enable-security-updates: false
diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index f132985f48d..235449d7f60 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"microsoft.dnceng.secretmanager": {
- "version": "1.1.0-beta.26176.1",
+ "version": "1.1.0-beta.25421.1",
"commands": [
"secret-manager"
]
diff --git a/.gitattributes b/.gitattributes
index bd40fc2cc51..7045cae3510 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -69,9 +69,3 @@ compat text eol=lf
# not treat as generated
###############################################################################
**/build/** linguist-generated=false
-
-###############################################################################
-# Set file behavior to:
-# treat as JSONC (JSON with Comments) for GitHub syntax highlighting
-###############################################################################
-*.json linguist-language=JSONC
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index 524c5c84490..72b06568374 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -104,7 +104,7 @@ timeout 6000 ./build.sh --restore --build --configuration Release --test
4. Validate packaging via: `./build.sh --pack --configuration Release`
### Helix Test Development
-1. Create test projects targeting `$(BundledNETCoreAppTargetFramework)` framework
+1. Create test projects targeting `$(NetToolCurrent)` framework
2. Configure in `tests/UnitTests.proj` for Helix execution
3. Use XUnit with `Microsoft.DotNet.XUnitExtensions` for enhanced capabilities
4. Test timeout default: 300 seconds (override with XUnitWorkitemTimeout)
diff --git a/.github/workflows/backport-base.yml b/.github/workflows/backport-base.yml
index 4a18fd0dfdf..22b1aaa1609 100644
--- a/.github/workflows/backport-base.yml
+++ b/.github/workflows/backport-base.yml
@@ -14,29 +14,11 @@ on:
Backport of #%source_pr_number% to %target_branch%
/cc %cc_users%
- pr_labels:
- description: 'A comma-separated list of labels to add when the backport pull request is created.'
- required: false
- type: string
- default: ''
repository_owners:
description: 'A comma-separated list of repository owners where the workflow will run. Defaults to "dotnet,microsoft".'
required: false
type: string
default: 'dotnet,microsoft'
- additional_git_am_switches:
- description: 'Additional switches to pass to git am command (e.g., "--exclude=docs/release-notes/* --whitespace=fix"). Useful for excluding files that differ between branches or fixing whitespace conflicts.'
- required: false
- type: string
- default: ''
- conflict_resolution_command:
- description: >-
- Optional shell command to attempt automatic conflict resolution after a failed git am.
- If the command eliminates merge conflicts, the backport proceeds automatically.
- Do not run git commands from this parameter as they might have unintended side effects.
- DO NOT PASS UNTRUSTED INPUT TO THIS PARAMETER.
- required: false
- type: string
jobs:
cleanup:
@@ -82,8 +64,7 @@ jobs:
with:
script: |
const target_branch = '${{ steps.target-branch-extractor.outputs.result }}';
- const workflow_run_url = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
- const backport_start_body = `Started backporting to \`${target_branch}\` ([link to workflow run](${workflow_run_url}))`;
+ const backport_start_body = `Started backporting to _${target_branch}_: https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
@@ -97,12 +78,8 @@ jobs:
- name: Run backport
uses: actions/github-script@v7
env:
- GH_TOKEN: ${{ github.token }}
BACKPORT_PR_TITLE_TEMPLATE: ${{ inputs.pr_title_template }}
BACKPORT_PR_DESCRIPTION_TEMPLATE: ${{ inputs.pr_description_template }}
- BACKPORT_PR_LABELS: ${{ inputs.pr_labels }}
- ADDITIONAL_GIT_AM_SWITCHES: ${{ inputs.additional_git_am_switches }}
- CONFLICT_RESOLUTION_COMMAND: ${{ inputs.conflict_resolution_command }}
with:
script: |
const target_branch = '${{ steps.target-branch-extractor.outputs.result }}';
@@ -110,40 +87,19 @@ jobs:
const repo_name = context.payload.repository.name;
const pr_number = context.payload.issue.number;
const comment_user = context.payload.comment.user.login;
- const workflow_run_url = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
-
- const wrap_in_code_block = (language, content) => `\`\`\`${language}\n${content}\n\`\`\``;
- const wrap_in_details_block = (summary, content) => `\n${summary}
\n\n${content}\n `;
-
- // Post a comment on the PR and return the comment URL
- async function postComment(body) {
- const { data: comment } = await github.rest.issues.createComment({
- owner: repo_owner,
- repo: repo_name,
- issue_number: pr_number,
- body
- });
- return comment.html_url;
- }
try {
- // verify the comment user has write access to the repo
+ // verify the comment user is a repo collaborator
try {
- const { data: permission } = await github.rest.repos.getCollaboratorPermissionLevel({
+ await github.rest.repos.checkCollaborator({
owner: repo_owner,
repo: repo_name,
username: comment_user
});
-
- const writePermissions = ['admin', 'write'];
- if (!writePermissions.includes(permission.permission)) {
- throw new Error(`Insufficient permissions: ${permission.permission}`);
- }
-
- console.log(`Verified ${comment_user} has ${permission.permission} access to the repo.`);
+ console.log(`Verified ${comment_user} is a repo collaborator.`);
} catch (error) {
console.log(error);
- throw new Error(`Error: @${comment_user} does not have write access to this repo, backporting is not allowed. Required permissions: write or admin.`);
+ throw new Error(`Error: @${comment_user} is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your ${repo_owner} team membership visibility is set to Public on https://github.com/orgs/${repo_owner}/people?query=${comment_user}`);
}
try { await exec.exec(`git ls-remote --exit-code --heads origin ${target_branch}`) } catch { throw new Error(`Error: The specified backport target branch "${target_branch}" wasn't found in the repo.`); }
@@ -171,14 +127,9 @@ jobs:
} catch { }
// download and apply patch
- const patch_file = 'changes.patch';
- await exec.exec(`bash -c "gh pr diff --patch ${pr_number} > ${patch_file}"`);
+ await exec.exec(`curl -sSL "${context.payload.issue.pull_request.patch_url}" --output changes.patch`);
- const additional_switches = process.env.ADDITIONAL_GIT_AM_SWITCHES?.trim() || '';
- const base_switches = '--3way --empty=keep --ignore-whitespace --keep-non-patch';
- const git_am_command = additional_switches
- ? `git am ${base_switches} ${additional_switches} ${patch_file}`
- : `git am ${base_switches} ${patch_file}`;
+ const git_am_command = "git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch";
let git_am_output = `$ ${git_am_command}\n\n`;
let git_am_failed = false;
try {
@@ -194,51 +145,20 @@ jobs:
}
if (git_am_failed) {
- const resolution_command = process.env.CONFLICT_RESOLUTION_COMMAND || '';
-
- // If no resolution command supplied, fail immediately
- if (resolution_command.trim().length === 0) {
- const details = `${wrap_in_code_block('console', git_am_output)}\n[Link to workflow output](${workflow_run_url})`;
- const git_am_failed_body = `@${comment_user} backporting to \`${target_branch}\` failed, the patch most likely resulted in conflicts. Please backport manually!\n${wrap_in_details_block('git am output', details)}`;
- postComment(git_am_failed_body);
- core.setFailed("git am failed, most likely due to a merge conflict.");
- return;
- }
-
- console.log(`git am failed; attempting in-session conflict resolution via provided command: ${resolution_command}`);
-
- // Run user-provided resolution command
- // Ignore return code to capture stdout/stderr
- const resolution_result = await exec.getExecOutput(`bash -c "${resolution_command}"`, [], { ignoreReturnCode: true });
- if (resolution_result.exitCode !== 0) {
- const details = `\`${resolution_command}\` stderr:\n${wrap_in_code_block('console', resolution_result.stderr)}\n[Link to workflow output](${workflow_run_url})`;
- const resolution_failed_body = `@${comment_user} backporting to \`${target_branch}\` failed during automated conflict resolution. Please backport manually!\n${wrap_in_details_block('Error details', details)}`;
- postComment(resolution_failed_body);
- core.setFailed(`Automated conflict resolution command exited with code ${resolution_result.exitCode}`);
- return;
- }
-
- // Stage changes (excluding patch file)
- await exec.exec(`git add -A`);
- await exec.exec(`git reset HEAD ${patch_file}`);
-
- // Check for remaining conflicts
- const diff_command = 'git diff --name-only --diff-filter=U';
- const diff_result = await exec.getExecOutput(diff_command);
- if (diff_result.stdout.trim().length !== 0) {
- const details = `${wrap_in_code_block('console', diff_result.stdout)}\n[Link to workflow output](${workflow_run_url})`;
- const conflicts_body = `@${comment_user} backporting to \`${target_branch}\` failed. Automated conflict resolution did not resolve all conflicts. Please backport manually!\n${wrap_in_details_block(`${diff_command} output`, details)}`;
- postComment(conflicts_body);
- core.setFailed(`Automated conflict resolution did not resolve all conflicts.`);
- return;
- }
-
- console.log('Automated conflict resolution resolved all merge conflicts. Continuing.');
- await exec.exec('git am --continue');
+ const git_am_failed_body = `@${context.payload.comment.user.login} backporting to "${target_branch}" failed, the patch most likely resulted in conflicts:\n\n\`\`\`shell\n${git_am_output}\n\`\`\`\n\nPlease backport manually!`;
+ await github.rest.issues.createComment({
+ owner: repo_owner,
+ repo: repo_name,
+ issue_number: pr_number,
+ body: git_am_failed_body
+ });
+ core.setFailed("Error: git am failed, most likely due to a merge conflict.");
+ return;
+ }
+ else {
+ // push the temp branch to the repository
+ await exec.exec(`git push --force --set-upstream origin HEAD:${temp_branch}`);
}
-
- // push the temp branch to the repository
- await exec.exec(`git push --force --set-upstream origin HEAD:${temp_branch}`);
if (!should_open_pull_request) {
console.log("Backport temp branch already exists, skipping opening a PR.");
@@ -268,13 +188,8 @@ jobs:
.replace(/%source_pr_author%/g, context.payload.issue.user.login)
.replace(/%cc_users%/g, cc_users);
- const backport_pr_labels = (process.env.BACKPORT_PR_LABELS || '')
- .split(',')
- .map(label => label.trim())
- .filter(label => label.length > 0);
-
// open the GitHub PR
- const { data: backportPullRequest } = await github.rest.pulls.create({
+ await github.rest.pulls.create({
owner: repo_owner,
repo: repo_name,
title: backport_pr_title,
@@ -283,23 +198,21 @@ jobs:
base: target_branch
});
- if (backport_pr_labels.length > 0) {
- await github.rest.issues.addLabels({
- owner: repo_owner,
- repo: repo_name,
- issue_number: backportPullRequest.number,
- labels: backport_pr_labels
- });
- }
-
console.log("Successfully opened the GitHub PR.");
} catch (error) {
- const body = `@${comment_user} an error occurred while backporting to \`${target_branch}\`. See the [workflow output](${workflow_run_url}) for details.`;
- const comment_url = await postComment(body);
- console.log(`Posted comment: ${comment_url}`);
+
core.setFailed(error);
- }
+ // post failure to GitHub comment
+ const unknown_error_body = `@${comment_user} an error occurred while backporting to "${target_branch}", please check the run log for details!\n\n${error.message}`;
+ await github.rest.issues.createComment({
+ owner: repo_owner,
+ repo: repo_name,
+ issue_number: pr_number,
+ body: unknown_error_body
+ });
+ }
+
- name: Re-lock PR comments
uses: actions/github-script@v7
if: ${{ github.event.issue.locked == true && (success() || failure()) }}
diff --git a/.github/workflows/inter-branch-merge-base.yml b/.github/workflows/inter-branch-merge-base.yml
index dee843a51b8..19ada5b4888 100644
--- a/.github/workflows/inter-branch-merge-base.yml
+++ b/.github/workflows/inter-branch-merge-base.yml
@@ -71,7 +71,7 @@ jobs:
if: steps.extract-configuration-values.outputs.configurationFound != 'true'
name: Read configuration status
- - run: ${{ github.workspace }}\arcade-repository\.github\workflows\scripts\inter-branch-merge.ps1 -RepoName ${{ steps.fetch-repo-name.outputs.repository_name }} -RepoOwner ${{ github.repository_owner }} -MergeFromBranch $env:GITHUB_REF_NAME -MergeToBranch ${{ steps.extract-configuration-values.outputs.mergeToBranch }} -ResetToTargetPaths "${{ steps.extract-configuration-values.outputs.resetToTargetPaths }}" ${{ steps.extract-configuration-values.outputs.mergeSwitchArguments }}
+ - run: ${{ github.workspace }}\arcade-repository\.github\workflows\scripts\inter-branch-merge.ps1 -RepoName ${{ steps.fetch-repo-name.outputs.repository_name }} -RepoOwner ${{ github.repository_owner }} -MergeFromBranch $env:GITHUB_REF_NAME -MergeToBranch ${{ steps.extract-configuration-values.outputs.mergeToBranch }} ${{ steps.extract-configuration-values.outputs.mergeSwitchArguments }}
if: steps.extract-configuration-values.outputs.configurationFound == 'true'
name: Merge branches
working-directory: ${{ github.workspace }}/repository
diff --git a/.github/workflows/scripts/inter-branch-merge.ps1 b/.github/workflows/scripts/inter-branch-merge.ps1
index c05c2c87895..d1e251e09d6 100644
--- a/.github/workflows/scripts/inter-branch-merge.ps1
+++ b/.github/workflows/scripts/inter-branch-merge.ps1
@@ -15,10 +15,6 @@ The current branch
Create a PR even if the only commits are from dotnet-maestro[bot]
.PARAMETER QuietComments
Do not tag commiters, do not comment on PR updates. Reduces GitHub notifications
-.PARAMETER ResetToTargetPaths
-Semicolon-separated list of glob patterns for files to reset to the target branch version.
-After the merge branch is created, files matching these patterns will be checked out from
-the target branch and committed, resolving potential merge conflicts for these files.
#>
[CmdletBinding(SupportsShouldProcess = $true)]
param(
@@ -40,10 +36,7 @@ param(
[switch]$AllowAutomatedCommits,
- [switch]$QuietComments,
-
- [Alias('r')]
- [string]$ResetToTargetPaths = ""
+ [switch]$QuietComments
)
$ErrorActionPreference = 'stop'
@@ -112,70 +105,6 @@ function GetCommitterGitHubName($sha) {
return $null
}
-function ResetFilesToTargetBranch($patterns, $targetBranch) {
- if (-not $patterns -or $patterns.Count -eq 0) {
- return
- }
-
- Write-Host "Resetting files to $targetBranch for patterns: $($patterns -join ', ')"
-
- # Verify the target branch exists
- $branchExists = & git rev-parse --verify "origin/$targetBranch" 2>&1
- if ($LASTEXITCODE -ne 0) {
- Write-Warning "Target branch 'origin/$targetBranch' does not exist. Skipping file reset."
- return
- }
-
- # Configure git user for the commit
- # Use GitHub Actions bot identity
- Invoke-Block { & git config user.name "github-actions[bot]" }
- Invoke-Block { & git config user.email "41898282+github-actions[bot]@users.noreply.github.com" }
-
- # Track which patterns had changes
- $processedPatterns = @()
-
- foreach ($pattern in $patterns) {
- $pattern = $pattern.Trim()
- if (-not $pattern) {
- continue
- }
-
- Write-Host "Processing pattern: $pattern"
-
- # Use git checkout to reset files matching the pattern to the target branch
- # The -- is needed to separate the revision from the pathspec
- # Just attempt to checkout the pattern directly - git will handle whether files exist
- try {
- & git checkout "origin/$targetBranch" -- $pattern 2>&1 | Write-Host
- if ($LASTEXITCODE -eq 0) {
- Write-Host -f Green "Checked out pattern '$pattern' from $targetBranch"
- $processedPatterns += $pattern
- } else {
- Write-Host -f Yellow "Pattern '$pattern' did not match any files in $targetBranch"
- }
- }
- catch {
- Write-Warning "Failed to checkout pattern '$pattern' from $targetBranch. Error: $_"
- }
- }
-
- # Check if there are any changes to commit after processing all patterns
- $status = & git status --porcelain
- if ($status -and $processedPatterns.Count -gt 0) {
- # Add all changes (the checkout already modified the specific files)
- Invoke-Block { & git add -A }
-
- # Create a commit message listing all patterns that were reset
- $patternsList = $processedPatterns -join "`n- "
- $commitMessage = "Reset files to $targetBranch`n`nReset patterns:`n- $patternsList"
-
- Invoke-Block { & git commit -m $commitMessage }
- Write-Host -f Green "Successfully reset files to $targetBranch for patterns: $patternsList"
- } else {
- Write-Host "No changes to commit after processing all patterns"
- }
-}
-
# see https://git-scm.com/docs/pretty-formats
$formatString = '%h %cn <%ce>: %s (%cr)'
@@ -222,12 +151,6 @@ try {
$mergeBranchName = "merge/$MergeFromBranch-to-$MergeToBranch"
Invoke-Block { & git checkout -B $mergeBranchName }
- # Reset specified files to target branch if ResetToTargetPaths is configured
- if ($ResetToTargetPaths) {
- $patterns = $ResetToTargetPaths -split ";"
- ResetFilesToTargetBranch $patterns $MergeToBranch
- }
-
$remoteName = 'origin'
$prOwnerName = $RepoOwner
$prRepoName = $RepoName
diff --git a/.github/workflows/scripts/read-configuration.ps1 b/.github/workflows/scripts/read-configuration.ps1
index 73e72d7c37b..8fd99968fda 100644
--- a/.github/workflows/scripts/read-configuration.ps1
+++ b/.github/workflows/scripts/read-configuration.ps1
@@ -98,15 +98,8 @@ if ($configuration -ne $null) {
$ExtraSwitches = $configuration['ExtraSwitches']
}
- $ResetToTargetPaths = "";
- if($configuration.ContainsKey('ResetToTargetPaths')){
- # Convert array to semicolon-separated string for output
- $ResetToTargetPaths = $configuration['ResetToTargetPaths'] -join ";"
- }
-
"mergeSwitchArguments=$ExtraSwitches" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
"mergeToBranch=$MergeToBranch" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- "resetToTargetPaths=$ResetToTargetPaths" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
"configurationFound=$true" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
}
diff --git a/.vault-config/dnceng-partners-kv.yaml b/.vault-config/dnceng-partners-kv.yaml
index a89cd41c4a5..43c6e9d730d 100644
--- a/.vault-config/dnceng-partners-kv.yaml
+++ b/.vault-config/dnceng-partners-kv.yaml
@@ -71,15 +71,6 @@ secrets:
location: EngKeyVault
gitHubBotAccountName: dotnet-bot
- # repo, workflow scopes (classic token)
- BotAccount-dotnet-renovate-bot-PAT:
- type: github-access-token
- parameters:
- gitHubBotAccountSecret:
- name: BotAccount-dotnet-renovate-bot
- location: EngKeyVault
- gitHubBotAccountName: dotnet-renovate-bot
-
roslyn-dn-bot-devdiv-build-r-release-r-code-r:
type: azure-devops-access-token
parameters:
diff --git a/.vault-config/product-builds-engkeyvault.yaml b/.vault-config/product-builds-engkeyvault.yaml
index 1f1ae7ce455..def0f0ff91b 100644
--- a/.vault-config/product-builds-engkeyvault.yaml
+++ b/.vault-config/product-builds-engkeyvault.yaml
@@ -22,11 +22,6 @@ secrets:
parameters:
Name: dotnet-bot
- BotAccount-dotnet-renovate-bot:
- type: github-account
- parameters:
- Name: dotnet-renovate-bot
-
#Publish-Build-Assets
BotAccount-dotnet-maestro-bot-PAT:
type: github-access-token
@@ -56,6 +51,17 @@ secrets:
parameters:
description: Client id for akams app
+ dn-bot-dotnet-build-rw-code-rw:
+ type: azure-devops-access-token
+ parameters:
+ domainAccountName: dn-bot
+ domainAccountSecret:
+ location: helixkv
+ name: dn-bot-account-redmond
+ name: dn-bot-dotnet-build
+ organizations: dnceng
+ scopes: build_execute code_write
+
dn-bot-all-orgs-build-rw-code-rw:
type: azure-devops-access-token
parameters:
diff --git a/Arcade.slnx b/Arcade.slnx
index 1e9aa9aae67..337ee9c2279 100644
--- a/Arcade.slnx
+++ b/Arcade.slnx
@@ -35,7 +35,6 @@
-
@@ -61,6 +60,7 @@
+
@@ -72,6 +72,7 @@
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 99449926093..1b8d3519ede 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -4,4 +4,9 @@
+
+
+ true
+
+
diff --git a/Directory.Packages.props b/Directory.Packages.props
index dc3da890ce4..9e2d6effc94 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -10,16 +10,15 @@
4.0.0-rc3-24214-00
5.8.4
- 3.14.1-11027.2914512
+ 3.14.1-9323.2545153
5.0.2-dotnet.2811440
-
2.9.3
- 3.2.2
+ 3.0.0
1.22.0
$(XUnitVersion)
- 3.1.5
- 1.9.1
+ 3.1.3
@@ -28,10 +27,16 @@
+
+
+
+
+
+
@@ -50,6 +55,7 @@
+
@@ -57,39 +63,44 @@
+
+
+
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
-
+
+
diff --git a/Documentation/ArcadeSdk.md b/Documentation/ArcadeSdk.md
index b926bbed1fb..a5df38e66b2 100644
--- a/Documentation/ArcadeSdk.md
+++ b/Documentation/ArcadeSdk.md
@@ -382,6 +382,35 @@ Optionally, a list of Visual Studio [workload component ids](https://docs.micros
}
```
+If the build runs on a Windows machine that does not have the required Visual Studio version installed the `build.ps1` script attempts to use xcopy-deployable MSBuild package [`RoslynTools.MSBuild`](https://dotnet.myget.org/feed/roslyn-tools/package/nuget/RoslynTools.MSBuild). This package will allow the build to run on desktop msbuild but it may not provide all tools that the repository needs to build all projects and/or run all tests.
+
+The version of `RoslynTools.MSBuild` package can be specified in `global.json` file under `tools` like so:
+
+```json
+{
+ "tools": {
+ "vs": {
+ "version": "16.0"
+ },
+ "xcopy-msbuild": "16.0.0-rc1-alpha"
+ }
+}
+```
+
+If it is not specified the build script attempts to find `RoslynTools.MSBuild` version `{VSMajor}.{VSMinor}.0-alpha` where `VSMajor.VSMinor` is the value of `tools.vs.version`.
+
+If the fallback behavior to use xcopy-deployable MSBuild package is not desirable, then a version of `none` should be indicated in `global.json`, like this:
+
+```json
+{
+ "tools": {
+ "vs": {
+ "version": "16.4"
+ },
+ "xcopy-msbuild": "none"
+ }
+}
+```
#### Example: Restoring multiple .NET Core Runtimes for running tests
@@ -567,7 +596,6 @@ Set `VSSDKTargetPlatformRegRootSuffix` property to specify the root suffix of th
If `source.extension.vsixmanifest` is present next to a project file the project is by default considered to be a VSIX producing project (`IsVsixProject` property is set to true).
A package reference to `Microsoft.VSSDK.BuildTools` is automatically added to such project.
-Set `IncludeMicrosoftVSSDKBuildToolsPackageReference` to `false` to opt out of the automatic package reference (e.g. if you need to manage the version yourself).
Arcade SDK include build target for generating VS Template VSIXes. Adding `VSTemplate` items to project will trigger the target.
@@ -1069,6 +1097,9 @@ If set to `true` calls to GetResourceString receive a default resource string va
#### `GenerateResxSourceOmitGetResourceString` (bool)
If set to `true` the GetResourceString method is not included in the generated class and must be specified in a separate source file.
+#### `FlagNetStandard1XDependencies` (bool)
+If set to `true` the `FlagNetStandard1xDependencies` target validates that the dependency graph doesn't contain any netstandard1.x packages.
+
Was this helpful? [](https://helix.dot.net/f/p/5?p=Documentation%5CArcadeSdk.md) [](https://helix.dot.net/f/n/5?p=Documentation%5CArcadeSdk.md)
diff --git a/Documentation/AzureDevOps/SendingJobsToHelix.md b/Documentation/AzureDevOps/SendingJobsToHelix.md
index 1a91b3ae0c4..6b93e46321a 100644
--- a/Documentation/AzureDevOps/SendingJobsToHelix.md
+++ b/Documentation/AzureDevOps/SendingJobsToHelix.md
@@ -80,8 +80,6 @@ steps:
The simplest Helix use-case is zipping up a single folder containing your project's tests and a batch file which runs those tests. To accomplish this, reference Arcade's `send-to-helix` template in `eng/common/templates/steps/send-to-helix.yml` from your `azure-pipelines.yml` file.
-### XUnit v2
-
Simply specify the xUnit project(s) you wish to run (semicolon delimited) with the `XUnitProjects` parameter. Then, specify:
* the `XUnitPublishTargetFramework` – this is the framework your **test projects are targeting**, e.g. `netcoreapp3.1`.
* the `XUnitRuntimeTargetFramework` – this is the framework version of xUnit you want to use from the xUnit NuGet package, e.g. `netcoreapp2.0`. Notably, the xUnit console runner only supports up to netcoreapp2.0 as of 14 March 2018, so this is the target that should be specified for running against any higher version test projects.
@@ -119,10 +117,6 @@ The list of available Helix queues can be found on the [Helix homepage](https://
# condition: succeeded() - defaults to succeeded()
```
-### XUnit v3
-
-XUnit v3 test projects are self-hosting executables and do not need an external console runner. Instead of `XUnitProjects`, use `XUnitV3Project` items directly in your Helix MSBuild project file (see [the SDK's readme](/src/Microsoft.DotNet.Helix/Sdk/Readme.md) for details). The `XUnitPublishTargetFramework`, `XUnitRuntimeTargetFramework`, and `XUnitRunnerVersion` parameters are not needed for v3 projects.
-
## The More Complex Case
For anything more complex than the above example, you'll want to create your own MSBuild proj file to specify the work items and correlation payloads you want to send up to Helix. Full documentation on how to do this can be found [in the SDK's readme](https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.Helix/Sdk/Readme.md).
diff --git a/Documentation/CodeQLGuidance.md b/Documentation/CodeQLGuidance.md
index fa5a7aa5503..d9e7967f9d8 100644
--- a/Documentation/CodeQLGuidance.md
+++ b/Documentation/CodeQLGuidance.md
@@ -4,7 +4,7 @@
CodeQL is a code analysis platform owned by Semmle, now a subsidary of GitHub. It provides value by using extractors to construct a database representing the codebase, then providing a query language to perform sematic analysis. CodeQL instruments the build of compiled languages, and directly analyzes source code for interpreted languages.
-CodeQL is required as part of Microsoft's Security Development Lifecycle (SDL) requirements. .NET Engineering Services supports CodeQL via CodeQL 3000, with scan results published to Trust Services Automation (TSA). SDL tooling is now handled entirely by 1ES Pipeline Templates.
+CodeQL is required as part of Microsoft's Security Developent Lifecycle (SDL) requirements. .NET Engineering Services supports CodeQL via the Guardian toolset with scan results published to Trust Services Automation (TSA).
CodeQL adds a significant time to builds. We therefore recommend creating a new, seperate pipeline instead of incorporating CodeQL scans into existing PR or testing pipelines.
@@ -47,6 +47,8 @@ variables:
## Use with Arcade
+**NOTE**: Arcade previously provided a Guardian-based job and step template that executed CodeQL using the Guardian toolset. This does not meet the requirements for CodeQL reporting and should not be used, as while it may produce scans it does not satisfy organizational requirements for CodeQL execution.
+
Much of https://github.dev/dotnet/arcade/blob/main/azure-pipelines-codeql.yml can be copied and used as-is for most repositories. With CodeQL3000, as long as the build completes and exercises the codebase to be scanned, all languages should be reported by the same tasks at the same time.
diff --git a/Documentation/CorePackages/Publishing.md b/Documentation/CorePackages/Publishing.md
index b9db6778a3c..67da815b6f5 100644
--- a/Documentation/CorePackages/Publishing.md
+++ b/Documentation/CorePackages/Publishing.md
@@ -117,6 +117,7 @@ These steps are needed for Arcade versions before `10.0.0`. After that, V3 is th
| artifactsPublishingAdditionalParameters | string | Additional arguments for the PublishArtifactsInManifest sdk task. | '' |
| signingValidationAdditionalParameters | string | Additional arguments for the SigningValidation sdk task. | '' |
| publishInstallersAndChecksums | bool | Publish installers packages and checksums from the build artifacts to the dotnetcli storage account. Documentation for opting in to automatic checksum generation can be found in the [Checksum section](https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md#checksum-generation) of this document. | true |
+ | SDLValidationParameters | object | Parameters for the SDL job template, as documented in the [SDL template documentation](https://github.com/dotnet/arcade/blob/66175ebd3756697a3ca515e16cd5ffddc30582cd/Documentation/HowToAddSDLRunToPipeline.md) | -- |
| validateDependsOn | [array] | Which stage(s) should the validation stage depend on. | build |
| publishDependsOn | [array] | Which stage(s) should the publishing stage(s) depend on. | Validate |
@@ -287,7 +288,7 @@ Each stable build (i.e., [Release Official Builds](https://github.com/dotnet/arc
### What benefits do I get from the new infrastructure?
-There are a few benefits, but the bottom line is: you can rely on Arcade SDK and Maestro++ to determine the correct place to publish the build assets. This is specially important for servicing and/or private builds where assets must not go to public locations before further validations. The new infrastructure also performs Signing validation, SDL validation (via 1ES Pipeline Templates) and NuGet packages metadata validation.
+There are a few benefits, but the bottom line is: you can rely on Arcade SDK and Maestro++ to determine the correct place to publish the build assets. This is specially important for servicing and/or private builds where assets must not go to public locations before further validations. The new infrastructure also performs Signing validation, SDL validation and NuGet packages metadata validation.
### What's this "Setup Maestro Vars" job?
diff --git a/Documentation/HowToAddSDLRunToPipeline.md b/Documentation/HowToAddSDLRunToPipeline.md
new file mode 100644
index 00000000000..3b9f8c1a5c1
--- /dev/null
+++ b/Documentation/HowToAddSDLRunToPipeline.md
@@ -0,0 +1,83 @@
+# Automate SDL tools run in AzDO Pipelines
+
+## SDL Scripts
+
+SDL scripts are a set of powershell scripts that provide the ability to run SDL tools. The scripts are located [here](../eng/common/sdl/)
+
+## How to add the SDL scripts to pipeline
+
+The pre-reqs needed to run the SDL scripts are defined with default values in a template - [execute-sdl.yml](../eng/common/templates/job/execute-sdl.yml). The template is added part of [post-build.yml](../eng/common/templates/post-build/post-build.yml) and is turned-off by default and can be enabled by setting the parameter [SDLValidationParameters.enable](../eng/common/templates/post-build/post-build.yml#L6).
+
+## Arguments
+
+All arguments that are not repo specific have default values specified to them, so only provide values for them if there is a need to override.
+
+| Name | Type | Description |
+| ----------------------- | -------- | ------------------------------------------------------------ |
+| GuardianPackageName | string | the name of guardian CLI package. Default is provided in post-build.yml. |
+| NugetPackageDirectory | Dir Path | directory where NuGet packages are installed . The default is provided in post-build.yml. |
+| Repository | string | the name of the repository (e.g. dotnet/arcade). The default is populated from the current build. |
+| BranchName | string | name of branch or version of gdn settings; The default is populated from the current build. |
+| SourceDirectory | Dir Path | the directory where source files are located. The default is populated from the current build.|
+| ArtifactsDirectory | Dir Path | the directory where build artifacts are located. The default is populated from the current build. |
+| AzureDevOpsAccessToken | string | access token to access internal AzDO repo which maintains the baseline data |
+| **SourceToolsList** | Array | list of SDL tools to run on source code |
+| **ArtifactToolsList** | Array | list of SDL tools to run on build artifacts |
+| TsaPublish | bool | true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs.|
+| TsaBranchName | string | TSA Parameter; The default is populated from the current build |
+| TsaRepositoryName | string | TSA Parameter; The default is populated from the current build |
+| BuildNumber | string | TSA Parameter; The default is populated from the current build |
+| UpdateBaseline | bool | default value is false; if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed |
+| TsaOnboard | bool | TSA Parameter; default value is false; if true, will onboard the repository to TSA; should only be run once |
+| **TsaInstanceUrl** | string | TSA Parameter; the instance-url registered with TSA; |
+| **TsaCodebaseName** | string | TSA Parameter; the name of the codebase registered with TSA; |
+| **TsaProjectName** | string | TSA Parameter; the name of the project registered with TSA; |
+| **TsaNotificationEmail**| string | TSA Parameter; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); |
+| **TsaCodebaseAdmin** | string | TSA Parameter; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); |
+| **TsaIterationPath** | string | TSA Parameter; the area path where TSA will file bugs in AzDO; |
+| GuardianLoggerLevel | string | TSA Parameter; the iteration path where TSA will file bugs in AzDO; |
+
+**Note:**
+
+- Items in bold are repo specific and do not carry a default.
+- All TSA parameters are needed only if `TsaPublish` and / or `TsaOnBoard` is set to true.
+
+## Usage Examples
+
+### Arcade
+Arcade has enabled SDL runs in official-ci builds.
+- [azure-pipeline.yml](https://github.com/dotnet/arcade/blob/master/azure-pipelines.yml#L192)
+- [Build](https://dev.azure.com/dnceng/internal/_build/results?buildId=236348&view=logs&s=3df7d716-4c9c-5c26-9f45-11f62216640d&j=7d9eef18-6720-5c1f-4d30-89d7b76728e9)
+
+```yml
+ SDLValidationParameters:
+ enable: true
+ params: ' -SourceToolsList @("xyz","abc")
+ -ArtifactToolsList @("def")
+ -TsaInstanceURL "https://devdiv.visualstudio.com/"
+ -TsaProjectName "DEVDIV"
+ -TsaNotificationEmail "xxx@microsoft.com"
+ -TsaCodebaseAdmin "aa\bb"
+ -TsaBugAreaPath "DevDiv\NET Core "
+ -TsaIterationPath "DevDiv"
+ -TsaRepositoryName "Arcade"
+ -TsaCodebaseName "Arcade"
+ -TsaPublish $True'
+```
+
+## SDL run failures filed as bugs
+
+If `TsaPublish` is set to true, the output of the SDL tool runs for every build will be published to the account specified under `TsaInstanceURL` and `TsaProjectName`.
+
+If `TsaNotificationEmail` is set, a notification email will be sent out with a link to the bugs filed for each tool run.
+
+[Here](https://devdiv.visualstudio.com/DevDiv/_queries/query/?wiql=%20%20%20%20SELECT%20ID%2CSeverity%2CState%2C%5BAssigned%20To%5D%2CTitle%20FROM%20WorkItem%20WHERE%20Tags%20Contains%27TSA%23178337-Arcade-PoliCheck-12345.6%27%20%20%20%20) is the link to bugs filed after a test run for Arcade.
+
+## See Also
+- [SDL Control Flow Document](https://dev.azure.com/dnceng/internal/_wiki/wikis/DNCEng%20Services%20Wiki/442/ArcadeSecurityControlFlowDocumentation)
+- [Introduction to Guardian and TSA](https://dev.azure.com/dnceng/internal/_wiki/wikis/DNCEng%20Services%20Wiki/443/IntroToGuardianAndTSA)
+
+
+
+Was this helpful? [](https://helix.dot.net/f/p/5?p=Documentation%5CHowToAddSDLRunToPipeline.md) [](https://helix.dot.net/f/n/5?p=Documentation%5CHowToAddSDLRunToPipeline.md)
+
diff --git a/Documentation/HowToCreatePackages.md b/Documentation/HowToCreatePackages.md
index 4b80cc52122..3f9d96abce0 100644
--- a/Documentation/HowToCreatePackages.md
+++ b/Documentation/HowToCreatePackages.md
@@ -32,9 +32,9 @@ One of the goals of Arcade is to be a vehicle to provide code sharing. One of th
- If your package produces binaries that need to be signed, make sure to mark it as true or check the SignTool [documentation](../src/Microsoft.DotNet.SignTool/README.md) to see how to sign specific files.
-- If the package needs to target a version of .NET Framework we recommend you to use the Arcade defined version, which is stored in the $(NetFrameworkMinimum), $(NetFrameworkCurrent) or $(NetFrameworkToolCurrent) properties. For instance:
+- If the package needs to target a version of .NET Framework we recommend you to use the Arcade defined version, which is stored in the $(NetFxTfm) property. For instance:
- `$(NetFrameworkMinimum);netcoreapp2.0`
+ `$(NetFxTfm);netcoreapp2.0`
- There is no requirement to create a separate `.nuspec` file for the package. The package information will be automatically extracted from the `.csproj` file.
diff --git a/Documentation/Policy/ArcadeContributorGuidance.md b/Documentation/Policy/ArcadeContributorGuidance.md
index 59736585b7d..f48357ac251 100644
--- a/Documentation/Policy/ArcadeContributorGuidance.md
+++ b/Documentation/Policy/ArcadeContributorGuidance.md
@@ -21,6 +21,7 @@ For the most part, contributions to Arcade are straightforward and relatively sm
### Ownership
The current owner for dotnet/arcade is Mark Wilkie . The current point persons are:
- Michael Stuckey @garath /
+- Ricardo Arenas @riarenas /
## Getting Things Fixed
### Submit a PR
diff --git a/Documentation/Projects/Build Analysis/KnownIssues.md b/Documentation/Projects/Build Analysis/KnownIssues.md
index 2a757d16a00..861e6f9b2c5 100644
--- a/Documentation/Projects/Build Analysis/KnownIssues.md
+++ b/Documentation/Projects/Build Analysis/KnownIssues.md
@@ -149,7 +149,6 @@ The matching process and its limitations depend on the type of error:
## How to fill out a Known Issue error section
For the error matching to work, you need to provide an error message or an error pattern.
-Both `ErrorMessage` and `ErrorPattern` accept either a single string or an [array of strings](#fill-out-known-issues-with-a-list-of-errors) for multi-line matching.
```json
{
@@ -164,7 +163,6 @@ The `ErrorMessage` value needs to be updated with an error message that meets th
1. Match at least one of the error messages of the reported build. For more details see: [How matching process works](#how-the-matching-process-works-between-an-issue-and-a-build-or-test-error)
1. It shouldn't include any unique identifier of the message e.g., machine, path, file name, etc.
-1. For more specific matching, use an [array of strings](#fill-out-known-issues-with-a-list-of-errors) to match multiple lines in order.
For example, for the following error:
@@ -194,18 +192,10 @@ In the following example, the regular expression `The command .+ failed` would m
}
```
-Like `ErrorMessage`, `ErrorPattern` also accepts an [array of strings](#fill-out-known-issues-with-a-list-of-errors) for matching multiple lines in order. For example:
-
-```json
-{
- "ErrorPattern": ["\\[FAIL\\] System\\.Reflection\\.Context\\.Tests\\..+", "Assert\\.NotNull\\(\\) Failure"]
-}
-```
-
We recommend you test your regular expression, to do it you can use [regex101 tester](https://regex101.com/) (choose `.NET (C#)` flavor) with the following regex options:
- Single line
-- Insensitive
+- Insentitive
- No backtracking
## What happens after creating or updating a Known Issue
diff --git a/Documentation/Renovate.md b/Documentation/Renovate.md
deleted file mode 100644
index 35a3dfff5b1..00000000000
--- a/Documentation/Renovate.md
+++ /dev/null
@@ -1,451 +0,0 @@
-# Renovate Dependency Update Tool
-
-## Table of Contents
-
-- [Introduction](#introduction)
-- [Design](#design)
-- [Security](#security)
-- [Setting Up Renovate](#setting-up-renovate-for-your-repository)
-- [Renovate Configuration Patterns](#renovate-configuration-patterns)
-- [Troubleshooting](#troubleshooting)
-
-## Introduction
-
-This document outlines the integration of [Renovate](https://github.com/renovatebot/renovate) into Arcade to automate dependency updates.
-Renovate is an automated dependency update tool that generates PRs for updating dependencies from a wide variety of sources.
-
-Renovate is similar to Dependabot in its purpose.
-Dependabot should be used when possible.
-However, Renovate supports a much broader range of [dependency types](https://docs.renovatebot.com/modules/datasource/), most notably Docker and GitHub releases.
-For example, Renovate can automatically generate a PR to update a referenced Docker image when a newer version is available.
-
-### Example Scenarios
-
-Here are some scenarios demonstrating the usefulness of Renovate automatically making dependency updates:
-
-#### Container Tags
-
-Repos that reference container tags from the [dotnet/dotnet-buildtools-prereqs-docker](https://github.com/dotnet/dotnet-buildtools-prereqs-docker) repo need to maintain those tags to ensure they are supported.
-
-This can be as simple as automatically updating to a new major version of Linux distro:
-
-```diff
--mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64
-+mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64
-```
-
-Or automatically pinning to the latest version of a tag by its digest value:
-
-```diff
--mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64@sha256:b99da50c4cb425e72ee69c2b8c1fdf99e0f71059aee19798e2f9310141ea48fb
-+mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64@sha256:6bb6fef390e6f09a018f385e346b0fe5999d7662acd84ca2655e9a3c3e622b71
-```
-
-Renovate can detect when these new container images are available and submit PRs to update sources accordingly.
-
-Related issue: [Automatically update image references in consuming repos (#1321)](https://github.com/dotnet/dotnet-buildtools-prereqs-docker/issues/1321)
-
-#### GitHub Release
-
-There are many cases where a version of OSS published via GitHub releases is being referenced by a .NET repository.
-Those versions can be kept updated automatically as new releases occur.
-
-For example, there are Dockerfiles in the [dotnet/dotnet-buildtools-prereqs-docker](https://github.com/dotnet/dotnet-buildtools-prereqs-docker) repo which reference the LLVM version that can be maintained by having Renovate automatically check for new [LLVM releases](https://github.com/llvm/llvm-project/releases).
-
-```diff
--LLVM_VERSION=19.1.7
-+LLVM_VERSION=20.1.0
-```
-
-#### Others
-
-- GitHub Actions: Workflow files that reference GitHub Actions can be kept up to date as new action versions are released.
-- Custom Version References: Any file containing version strings can be tracked, allowing Renovate to update versions in scripts, config files, or other custom formats.
-
-## Design
-
-### Fork Mode
-
-Protecting GitHub repositories in the dotnet organization from direct access by the Renovate tool is crucial.
-Renovate will be used in fork mode, limiting its permissions to forked repositories.
-This avoids giving write permissions to Renovate on any dotnet repository.
-This means that Renovate acts as though it's any other outside contributor, not requiring any special permissions in the dotnet organization or repositories.
-
-A GitHub bot account, `dotnet-renovate-bot`, is used to manage the Renovate operations.
-This account has the ability to create forks from dotnet repositories, which will be the source of the head branch for PRs that are created.
-The PRs generated by Renovate will be done using this bot account.
-Renovate also handles synchronization from the upstream branch automatically.
-GitHub scopes required by this account: `repo`, `workflow`.
-
-```mermaid
-sequenceDiagram
- box AzDO
- participant Pipeline as Renovate Pipeline
- end
- box GitHub
- participant Fork as dotnet-renovate-bot fork
- participant Upstream as dotnet repo
- end
-
- Pipeline->>Fork: 1. Create/update fork
- Pipeline->>Fork: 2. Push branch with dependency updates
- Fork->>Upstream: 3. Create PR from fork
- Note over Upstream: PR reviewed and merged by maintainers
-```
-
-### Repo Usage
-
-Arcade provides an [Azure DevOps pipeline YAML job template](../eng/common/core-templates/job/renovate.yml) that repositories should utilize when making use of Renovate.
-This template handles the execution of Renovate, ensuring a standardized approach across all repositories.
-Repositories wishing to make use of Renovate can define a pipeline by following the [onboarding instructions](#setting-up-renovate-for-your-repository).
-Consuming repositories are responsible for providing their own [Renovate configuration file](https://docs.renovatebot.com/configuration-options/) that describes which dependencies should be updated.
-
-## Security
-
-### Bot Account Permissions
-
-The `dotnet-renovate-bot` account has minimal permissions by design:
-
-| Permission | Scope | Purpose |
-|------------|-------|---------|
-| `repo` | Bot's own forks only | Create branches and commits in forked repos |
-| `workflow` | Bot's own forks only | Update workflow files if needed |
-
-**The bot has NO write access to any dotnet organization repositories.** All changes come through PRs from the fork.
-
-### What Renovate Can and Cannot Do
-
-**✅ Can Do:**
-- Create PRs from its fork
-- Update dependency versions
-- Run on a schedule you control
-
-**❌ Cannot Do:**
-- Push directly to your repo
-- Access secrets or credentials
-- Merge its own PRs
-- Access private repos
-
-### PR Review Best Practices
-
-Since Renovate PRs come from an external fork, treat them like any external contribution:
-
-1. **Review the diff carefully** - Verify the version change is expected
-2. **Check CI results** - Ensure all tests pass before merging
-3. **Verify the upstream source** - Confirm the new version exists in the expected registry/repository
-
-## Setting Up Renovate for Your Repository
-
-This section provides step-by-step instructions for repo owners who want to enable automated dependency updates using Renovate.
-
-### Prerequisites
-
-Before setting up Renovate, verify the following requirements:
-
-- Your repository has Arcade's `eng/common` folder synchronized (via darc)
-
-### Create the Renovate Configuration File
-
-Create a Renovate configuration file at `eng/renovate.json` in your repository. This file defines which dependencies Renovate should monitor and update.
-
-Start with this base configuration:
-
-```json
-{
- "$schema": "https://docs.renovatebot.com/renovate-schema.json",
- "enabledManagers": [
- "custom.regex"
- ],
- "vulnerabilityAlerts": {
- "enabled": false
- }
-}
-```
-
-This configuration enables only the [custom regex manager](https://docs.renovatebot.com/modules/manager/regex/), disabling all built-in [managers](https://docs.renovatebot.com/modules/manager/) (e.g., dockerfile, nuget, github-actions) to prevent unwanted PRs. Without making any other changes to this configuration, it will result in no dependency updates. Add [presets](https://docs.renovatebot.com/config-presets/) to enable specific dependency types (see [Renovate Configuration Patterns](#renovate-configuration-patterns)).
-
-For more configuration options, see the [Renovate configuration documentation](https://docs.renovatebot.com/configuration-options/).
-
-### Create the Pipeline YAML
-
-Create a new pipeline YAML file in your repository (e.g., `eng/pipelines/renovate.yml`) that references the [Arcade Renovate job template](../eng/common/core-templates/job/renovate.yml). Set the `gitHubRepo` variable according to your repo name.
-
-```yaml
-# Renovate Dependency Update Pipeline
-# This pipeline runs Renovate to automatically create PRs for dependency updates.
-
-trigger: none # Manual trigger only; use schedules for automation
-
-schedules:
-- cron: '0 8 * * 1' # Runs every Monday at 8:00 AM UTC
- displayName: Weekly Renovate Run
- branches:
- include:
- - main
- always: true # Run even if there are no code changes
-
-parameters:
-- name: dryRun
- displayName: Dry Run (preview without creating PRs)
- type: boolean
- default: false
-- name: forceRecreatePR
- displayName: Force Recreate PR (recreate even if closed)
- type: boolean
- default: false
-
-variables:
-- name: gitHubRepo
- # TODO: Replace with your GitHub repo
- value: 'dotnet/your-repo-name'
-
-extends:
- template: /eng/common/core-templates/stages/renovate.yml@self
- parameters:
- dryRun: ${{ parameters.dryRun }}
- forceRecreatePR: ${{ parameters.forceRecreatePR }}
- gitHubRepo: ${{ variables.gitHubRepo }}
-```
-
-> **Note:** After creating the YAML file, you'll need to create the pipeline in Azure DevOps. Create the pipeline in **dnceng/internal** (not public) since the Renovate job requires access to internal resources and the `dotnet-renovate-bot` GitHub token stored in the `dotnet-renovate-bot-pat` variable group.
-
-### Test with Dry Run
-
-Before enabling automatic PR creation, test your configuration using [dry run mode](https://docs.renovatebot.com/self-hosted-configuration/#dryrun).
-Any existing dependencies that Renovate detects that should be updated will appear in the `Run Renovate`
-step's log as `Would create PR...` or `Would commit files to branch...`.
-Examine the log to determine whether it meets your expectation.
-See [Troubleshooting](#troubleshooting) for more information on investigating the Renovate log.
-Examine any warnings that are output as well.
-One example of a warning is a "Config migration necessary" message which means that Renovate automatically migrated your Renovate configuration file to the latest format.
-In its output it includes the migrated version of your config file; update your config file to use that format instead.
-
-## Renovate Configuration Patterns
-
-This section provides common configuration patterns for typical dependency update scenarios.
-
-### Dockerfile Version Variables
-
-Use the [`customManagers:dockerfileVersions`](https://docs.renovatebot.com/presets-customManagers/#custommanagersdockerfileversions) preset to automatically detect and update version variables used within Dockerfiles.
-This preset matches common patterns like `ARG VERSION=x.y.z` or `ENV VERSION=x.y.z` and can update them from various [datasources](https://docs.renovatebot.com/modules/datasource/) like GitHub releases.
-
-```json
-{
- "$schema": "https://docs.renovatebot.com/renovate-schema.json",
- "extends": [
- "customManagers:dockerfileVersions"
- ]
-}
-```
-
-This preset automatically matches variables in Dockerfiles that follow the pattern:
-
-```dockerfile
-# renovate: datasource=github-releases depName=owner/repo
-ARG SOME_VERSION=1.2.3
-```
-
-The comment annotation tells Renovate where to look for updates. For example, to track LLVM releases:
-
-```dockerfile
-# renovate: datasource=github-releases depName=llvm/llvm-project
-ARG LLVM_VERSION=19.1.7
-```
-
-Renovate will automatically create PRs when new versions are released on GitHub.
-
-#### Supported Annotations
-
-The [`dockerfileVersions` preset](https://docs.renovatebot.com/presets-customManagers/#custommanagersdockerfileversions) recognizes these annotations in the comment as defined by the `matchStrings` field of the preset:
-
-| Annotation | Description | Example |
-|------------|-------------|---------|
-| `datasource` | Where to look for updates | `github-releases`, `docker`, `npm` |
-| `depName` | The dependency name/path | `llvm/llvm-project`, `node` |
-| `versioning` | Version scheme to use | `semver`, `loose`, `regex:...` |
-| `extractVersion` | Regex to extract version from release tag | `^llvmorg-(?.+)$` |
-
-#### Example: LLVM with Custom Version Extraction
-
-LLVM uses release tags like `llvmorg-19.1.7`, so you need to extract the version:
-
-```dockerfile
-# renovate: datasource=github-releases depName=llvm/llvm-project extractVersion=^llvmorg-(?.+)$
-ARG LLVM_VERSION=19.1.7
-```
-
-#### Example: CMake from GitHub Releases
-
-```dockerfile
-# renovate: datasource=github-releases depName=Kitware/CMake
-ARG CMAKE_VERSION=3.28.1
-```
-
-For more information, see the [Renovate dockerfileVersions preset documentation](https://docs.renovatebot.com/presets-customManagers/#custommanagersdockerfileversions).
-
-### Common packageRules Examples
-
-The [`packageRules`](https://docs.renovatebot.com/configuration-options/#packagerules) configuration allows fine-grained control over how Renovate handles specific dependencies.
-
-#### Group Related Updates Together
-
-Combine related dependency updates into a single PR:
-
-```json
-{
- "packageRules": [
- {
- "groupName": "LLVM toolchain",
- "matchDepNames": ["llvm/llvm-project", "llvm/clang"]
- }
- ]
-}
-```
-
-#### Pin to Major Version
-
-Prevent major version updates for stability:
-
-```json
-{
- "packageRules": [
- {
- "matchDepNames": ["node"],
- "allowedVersions": ">=18.0.0 <19.0.0"
- }
- ]
-}
-```
-
-#### Exclude Specific Dependencies
-
-Skip updates for dependencies you want to manage manually:
-
-```json
-{
- "packageRules": [
- {
- "matchDepNames": ["some-internal-tool"],
- "enabled": false
- }
- ]
-}
-```
-
-### Multiple Schedules or Configurations
-
-If you need different update schedules for different dependencies:
-
-1. Create separate Renovate config files (e.g., `eng/renovate-docker.json`, `eng/renovate-tests.json`)
-2. Create separate pipeline YAML files, each referencing a different config via `renovateConfigPath`
-
- ```yaml
- extends:
- template: /eng/common/core-templates/stages/renovate.yml@self
- parameters:
- dryRun: ${{ parameters.dryRun }}
- forceRecreatePR: ${{ parameters.forceRecreatePR }}
- gitHubRepo: ${{ variables.gitHubRepo }}
- renovateConfigPath: 'eng/renovate-docker.json'
- ```
-
-3. Configure different schedules for each pipeline
-
-## Troubleshooting
-
-This section helps diagnose issues when Renovate isn't behaving as expected.
-
-### Finding the Log File
-
-The Renovate pipeline publishes detailed debug logs as pipeline artifacts after each run. To access them:
-
-Find the two log files in the pipeline artifacts:
-- **`renovate.json`** - The main Renovate execution log with debug-level details
-- **`renovate-config-validator.json`** - Log from the Renovate configuration file validation step
-
-The log files are in JSON Lines format (one JSON object per line), which can be viewed in any text editor or processed with tools like `jq`.
-
-### Understanding the Log File
-
-The `renovate.json` file contains detailed information about what Renovate did during execution. Each line is a JSON object with a `msg` field describing the action and additional context fields.
-
-#### Finding Which Files Are Being Scanned
-
-To see which files Renovate is checking for dependencies, search for entries related to file discovery and package extraction.
-
-Using `jq` to filter file matching information:
-
-```bash
-# Find all files being matched by managers
-cat renovate.json | jq -s 'map(select(.packageFile)) | .[] | {packageFile,msg}'
-```
-
-#### Finding Dependencies That Need Updating
-
-To identify which dependencies Renovate found that need updates, search for:
-
-```bash
-# Find all dependency updates detected
-cat renovate.json | jq -s 'map(select(.msg == "packageFiles with updates")) | .[0].config'
-
-# Find PRs that would be created (dry run mode)
-cat renovate.json | jq -s 'map(select(.msg | contains("DRY-RUN"))) | .[].msg'
-
-# Find PRs that were actually created
-cat renovate.json | jq -s 'map(select(.msg == "PR created")) | .[] | {pr, prTitle}'
-```
-
-#### Finding Errors in the Log
-
-Renovate logs errors as JSON objects with an `err` field containing structured error details. These entries indicate failures during execution, such as post-upgrade command failures or network errors.
-
-To extract all error entries from the log:
-
-```bash
-# Find all log entries that contain errors
-cat renovate.json | jq -s 'map(select(.err)) | .[] | {msg, repository, branch, err: {cmd: .err.cmd, stderr: .err.stderr, exitCode: .err.exitCode, message: .err.message}}'
-```
-
-### Common Issues
-
-#### No Files Being Matched
-
-If Renovate isn't finding your dependency files:
-
-1. Check your [`managerFilePatterns`](https://docs.renovatebot.com/configuration-options/#managerfilepatterns) patterns in your Renovate configuration file (e.g. `eng/renovate.json`)
-2. Verify the file paths are relative to the repository root
-3. Use dry run mode and check the logs for `"packageFile"` entries
-4. Ensure regex patterns use proper escaping (double-escape in JSON: `\\.` for a literal dot)
-
-#### Dependencies Found But No PRs Created
-
-If Renovate finds dependencies but doesn't create PRs:
-
-1. Check if PRs already exist for those updates
-2. Look for `"msg": "Skipping"` entries in the log explaining why
-3. Verify the update isn't being filtered by your configuration (e.g., [`ignoreDeps`](https://docs.renovatebot.com/configuration-options/#ignoredeps), [`packageRules`](https://docs.renovatebot.com/configuration-options/#packagerules))
-4. Check if the dependency version is already at the latest
-
-#### Regex Manager Not Matching
-
-For custom regex patterns:
-
-1. Test your regex at [regex101.com](https://regex101.com/) (use ECMAScript/JavaScript flavor)
-2. Ensure named capture groups are correct: `(?...)`, `(?...)`, etc.
-3. Check the log for `"manager": "regex"` entries to see what's being matched
-4. Verify `matchStrings` patterns don't have JSON escaping issues
-
-#### Post-Upgrade Task Failures
-
-If you have configured [post-upgrade tasks](https://docs.renovatebot.com/configuration-options/#postupgradetasks) (e.g., running a script after a dependency is updated) and the results are not what you expect, check the log for errors. Renovate treats post-upgrade task failures as non-fatal, meaning the pipeline will still complete successfully even if a post-upgrade command fails. This can make failures easy to miss.
-
-Look for errors in the log using the steps in [Finding Errors in the Log](#finding-errors-in-the-log).
-
-#### Changes Not Taking Effect
-
-Renovate operates on the contents of the target GitHub branch, not the AzDO pipeline branch. If you've made changes in your AzDO dev branch but Renovate doesn't seem to pick them up, it's likely because those changes don't exist in the GitHub branch that Renovate is scanning. This applies to:
-
-- Files containing versions you expect Renovate to update
-- Scripts or files referenced by [post-upgrade tasks](https://docs.renovatebot.com/configuration-options/#postupgradetasks)
-
-To test without pushing to a production branch, push a dev branch to the target GitHub repo and pass the `baseBranches` parameter in your Renovate pipeline run to target it.
diff --git a/Documentation/Validation.md b/Documentation/Validation.md
index 9120fb111c5..ac739ac0ada 100644
--- a/Documentation/Validation.md
+++ b/Documentation/Validation.md
@@ -41,8 +41,9 @@ As a part of .NET 5, we had a goal of two hour build turn-around. In order to cl
[Validate-DotNet](https://dev.azure.com/dnceng/internal/_build?definitionId=827) is a pipeline that automatically runs nightly validation for all repositories that have been onboarded. Onboarding to Validate-DotNet is quite simple:
1. Update the [list of repositories](https://dev.azure.com/dnceng/internal/_git/dotnet-release?path=%2Feng%2Fpipeline%2Ftools%2Frepos-to-validate.txt) in [dotnet-release](https://dev.azure.com/dnceng/internal/_git/dotnet-release) with your repository's URL. Please reach out to dnceng for PR approval.
+2. To enable nightly SDL runs, add the [sdl-tsa-vars.config](https://github.com/dotnet/runtime/blob/main/eng/sdl-tsa-vars.config) file to your repository. This file should include all of the necessary information specific to your repository for creating SDL issues.
-Once this step is complete, your repository will start validating on a nightly basis. SDL validation is now handled automatically by 1ES Pipeline Templates.
+Once the first step is complete, your repository will start validating on a nightly basis. Once the second step is complete, you will also get SDL validation.
## How do I know if there are failures in my validation runs?
@@ -116,7 +117,7 @@ Errors we commonly see in validation jobs include:
* Signing Validation
* Files that are not intended to be signed are not listed in the `eng/SignCheckExclusionsFile.txt` for that repository, so validation complains that the files are not signed. Mitigation: add that file type to the `eng/SignCheckExclusionsFile.txt` in your repository.
-* SDL Validation (now handled by 1ES Pipeline Templates, which will open TSA issues for any failures found)
+* SDL Validation (which will open TSA issues for any failures found)
* Any pipeline failures in these legs should be reported to [DNCEng First Responders](https://dev.azure.com/dnceng/internal/_wiki/wikis/DNCEng%20Services%20Wiki/107/How-to-get-a-hold-of-Engineering-Servicing), as it suggests an infrastructure failure. SDL failures should automatically create TSA issues, which you should address as appropriate.
* Localization Validation
* Localization is done closer to release time. Localization failures suggest that either the localization team hasn't finished translations, or the translation PR hasn't been checked into your repository and should be. The closer to release we get, the more important fixing these failures becomes.
diff --git a/Documentation/update-xunit.md b/Documentation/update-xunit.md
index 270eaa1f6ed..9547416c55c 100644
--- a/Documentation/update-xunit.md
+++ b/Documentation/update-xunit.md
@@ -1,7 +1,7 @@
This document aims to establish the necessary actions to update the xunit version in Arcade which then gets propagated into consuming repositories.
1. For security reasons, nuget packages need to be manually mirrored from nuget.org to the dotnet-public AzDO feed. [See the instructions](/Documentation/MirroringPackages.md). Mirror the following xunit packages: `xunit,xunit.console,xunit.runner.reporters,xunit.runner.utility,xunit.runner.console,xunit.runner.visualstudio` with version `latest`.
-2. Update `XUnitVersion`, `XUnitAnalyzersVersion`, `XUnitRunnerVisualStudioVersion`, `XUnitV3Version` and `MicrosoftTestingPlatformVersion` properties in [Arcade SDK's DefaultVersions.props](/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props) to the desired values. Make sure to use a coherent version of `xunit.analyzers`. Note that `MicrosoftTestingPlatformVersion` must be compatible with the `XUnitV3Version` (xunit.v3.mtp-v1 depends on a specific minimum version of Microsoft.Testing.Platform).
+2. Update `XUnitVersion`, `XUnitAnalyzersVersion` and `XUnitRunnerVisualStudioVersion` properties in [Arcade SDK's DefaultVersions.props](/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props) to the desired values. Make sure to use a coherent version of `xunit.analyzers`.
3. Update other hardcoded values of `XUnitVersion` inside the Arcade repository (i.e. in [SendingJobsToHelix.md](/Documentation/AzureDevOps/SendingJobsToHelix.md), [Directory.Packages.props](/Directory.Packages.props) and others).
4. Update Microsoft.DotNet.XUnitAssert which is an AOT compatible fork of the xunit.assert library by following [the instructions](/src/Microsoft.DotNet.XUnitAssert/README.md). It's likely that new XUnit versions introduce AOT incompatibilities which will cause the compiler (AOT analyzer) to fail. If you aren't sure how to resolve the errors, consult with @agocke's team who owns this library.
5. Submit a Pull request with these changes to [dotnet/arcade](https://github.com/dotnet/arcade) and tag @ViktorHofer as a reviewer.
diff --git a/NuGet.config b/NuGet.config
index f0da823560c..20c5dc3fe74 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -14,8 +14,6 @@
-
-
@@ -52,13 +50,6 @@
-
-
-
-
-
-
-
diff --git a/README.md b/README.md
index 5f2ceb1b07b..ec0e5de86b3 100644
--- a/README.md
+++ b/README.md
@@ -4,35 +4,59 @@
Arcade is intended to provide well-understood and consistent mechanisms for consuming, updating, and sharing infrastructure across the .NET Core team. For more details about Arcade, please see the [Overview](./Documentation/Overview.md) documentation.
+## Build & Test Status
+
+Status of Arcade public CI builds: [](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=13&branchName=main)
+
## Validation & Dependency Flow Status
**[Arcade validation policy and process](Documentation/Validation/Overview.md)**
-|Flow|BarViz Link|
-|---|---|
-|Current Version of Arcade in `.NET Eng - Latest`|[Link](https://maestro.dot.net/2/https:%2F%2Fdev.azure.com%2Fdnceng%2Finternal%2F_git%2Fdotnet-arcade/latest/graph)|
-|Latest Version of Arcade Being Validated|[Link](https://maestro.dot.net/9/https:%2F%2Fdev.azure.com%2Fdnceng%2Finternal%2F_git%2Fdotnet-arcade/latest/graph)|
+### Current Version of Arcade in `.NET Eng - Latest`
+
+[Link](https://maestro.dot.net/2/https:%2F%2Fdev.azure.com%2Fdnceng%2Finternal%2F_git%2Fdotnet-arcade/latest/graph) to BARViz
-## Build Statuses
+### Latest Version of Arcade Being Validated
+
+[Link](https://maestro.dot.net/9/https:%2F%2Fdev.azure.com%2Fdnceng%2Finternal%2F_git%2Fdotnet-arcade/latest/graph) to BARViz.
+
+### Build Statuses
|Repo Name|Current Build Status|
|---|---|
-|Arcade Public CI|[](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=283&branchName=main)|
|Arcade Official Build|[](https://dnceng.visualstudio.com/internal/_build/latest?definitionId=6&branchName=main)|
|Arcade Validation|[](https://dnceng.visualstudio.com/internal/_build/latest?definitionId=282&branchName=main)|
+### Status of Latest Version of Arcade Being Validated
+
+- Please see the [Arcade channel on Teams](https://teams.microsoft.com/l/channel/19%3a1dad2081c8634f34915d88dce6220265%40thread.skype/Arcade?groupId=4d73664c-9f2f-450d-82a5-c2f02756606d&tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47) for the latest status regarding Arcade promotions.
+
## Getting Started
-Documentation, tutorials, and guides how to use Arcade may be found in the [Start Here](Documentation/StartHere.md) index.
+Packages are published daily to our tools feed:
-Packages are published daily to our tools feed: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json
+> `https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json`
-This feed is browsable from here: https://dev.azure.com/dnceng/public/_packaging?_a=feed&feed=dotnet-eng
+This feed is browsable from here:
-## How to contribute
+> https://dev.azure.com/dnceng/public/_packaging?_a=feed&feed=dotnet-eng
+
+### Source Code
+
+`git clone https://github.com/dotnet/arcade.git`
+
+### How to use Arcade
+
+Documentation, tutorials, and guides may be found in the [Start Here](Documentation/StartHere.md) index.
+
+### How to contribute
- [How to contribute to Arcade guide](Documentation/Policy/ArcadeContributorGuidance.md)
-## License
+- [Pull requests](https://github.com/dotnet/arcade/pulls): [Open](https://github.com/dotnet/arcade/pulls?q=is%3Aopen+is%3Apr)/[Closed](https://github.com/dotnet/arcade/pulls?q=is%3Apr+is%3Aclosed)
+
+- [Issues](https://github.com/dotnet/arcade/issues)
+
+### License
-.NET (including the Arcade repo) is licensed under the [MIT license](LICENSE.TXT).
+.NET Core (including the Arcade repo) is licensed under the [MIT license](LICENSE.TXT).
diff --git a/azure-pipelines-daily.yaml b/azure-pipelines-daily.yaml
index cbbb1713e0e..9bb7e6fb9b1 100644
--- a/azure-pipelines-daily.yaml
+++ b/azure-pipelines-daily.yaml
@@ -29,7 +29,7 @@ stages:
version: 8.x
installationPath: $(System.DefaultWorkingDirectory)/.dotnet
- - script: dotnet tool restore
+ - script: $(System.DefaultWorkingDirectory)/.dotnet/dotnet.exe tool restore
displayName: Restore dotnet tools
- task: AzureCLI@2
diff --git a/azure-pipelines-pr.yml b/azure-pipelines-pr.yml
index 7ca86bef5c4..6c5a6c28ec5 100644
--- a/azure-pipelines-pr.yml
+++ b/azure-pipelines-pr.yml
@@ -18,7 +18,7 @@ pr:
branches:
include:
- main
- - release/*.0
+ - release/*.0
- templates
paths:
include:
@@ -135,6 +135,7 @@ stages:
publish:
logs:
name: Logs_Test_$(Agent.OS)_$(_BuildConfig)_$(_Testing)
+ download: true
workspace:
clean: all
jobs:
@@ -153,13 +154,6 @@ stages:
- checkout: self
clean: true
steps:
- - script: eng\common\cibuild.cmd
- -configuration $(_BuildConfig)
- -prepareMachine
- $(_InternalBuildArgs)
- /p:Test=false
- displayName: Windows Build / Publish
-
- task: PowerShell@2
displayName: sdk-task verification
inputs:
@@ -172,7 +166,6 @@ stages:
/p:SymbolPublishingExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt'
/p:Configuration=Release
/p:PublishToMSDL=false
-
- powershell: eng\common\build.ps1
-configuration $(_BuildConfig)
-prepareMachine
@@ -204,12 +197,6 @@ stages:
- checkout: self
clean: true
steps:
- - script: eng/common/cibuild.sh
- --configuration $(_BuildConfig)
- --prepareMachine
- /p:Test=false
- displayName: Unix Build / Publish
-
- script: eng/common/build.sh
--configuration $(_BuildConfig)
--prepareMachine
diff --git a/azure-pipelines-renovate.yml b/azure-pipelines-renovate.yml
deleted file mode 100644
index 9a38c212cf8..00000000000
--- a/azure-pipelines-renovate.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-# Renovate Dependency Update Pipeline
-# This pipeline runs Renovate to automatically create PRs for dependency updates.
-
-trigger: none
-
-schedules:
-- cron: '0 8 * * 1'
- displayName: Weekly Renovate Run
- branches:
- include:
- - main
- always: true
-
-parameters:
-- name: dryRun
- displayName: Dry Run (preview without creating PRs)
- type: boolean
- default: false
-- name: forceRecreatePR
- displayName: Force Recreate PR (recreate even if closed)
- type: boolean
- default: false
-
-extends:
- template: /eng/common/core-templates/stages/renovate.yml@self
- parameters:
- gitHubRepo: 'dotnet/arcade'
- dryRun: ${{ parameters.dryRun }}
- forceRecreatePR: ${{ parameters.forceRecreatePR }}
diff --git a/eng/BuildTask.Packages.props b/eng/BuildTask.Packages.props
new file mode 100644
index 00000000000..fd82c1e0941
--- /dev/null
+++ b/eng/BuildTask.Packages.props
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eng/BuildTask.targets b/eng/BuildTask.targets
index c3fc4636f2b..68346ee899f 100644
--- a/eng/BuildTask.targets
+++ b/eng/BuildTask.targets
@@ -1,17 +1,17 @@
+
+
false
true
true
-
+
true
tools
- net
- $(TargetsForTfmSpecificContentInPackage);_AddBuildOutputToPackage
-
- $(BeforePack);Publish
+ true
+ $(TargetsForTfmSpecificContentInPackage);_AddBuildOutputToPackageCore;_AddBuildOutputToPackageDesktop
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ runtime
+
+
+
+
+
+
+
+
+
+ net
+
+
+
+
+ netframework
+
+
+
+
+
+
diff --git a/eng/Microsoft.DotNet.SwaggerGenerator.MSBuild.InTree.targets b/eng/Microsoft.DotNet.SwaggerGenerator.MSBuild.InTree.targets
index 815402b0374..7772d6a8c88 100644
--- a/eng/Microsoft.DotNet.SwaggerGenerator.MSBuild.InTree.targets
+++ b/eng/Microsoft.DotNet.SwaggerGenerator.MSBuild.InTree.targets
@@ -2,7 +2,12 @@
$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'Microsoft.DotNet.SwaggerGenerator', 'Microsoft.DotNet.SwaggerGenerator.MSBuild'))
- $(ArtifactsBinDir)Microsoft.DotNet.SwaggerGenerator.MSBuild\$(Configuration)\
+ $(ArtifactsBinDir)Microsoft.DotNet.SwaggerGenerator.MSBuild\$(Configuration)\
+
+ $(MicrosoftDotNetSwaggerGeneratorMSBuildBaseOutputDirectory)$(NetToolCurrent)\
+ $(MicrosoftDotNetSwaggerGeneratorMSBuildBaseOutputDirectory)$(NetFrameworkToolCurrent)\
+
+ TaskHostFactory
ResolveProjectReferences
@@ -19,7 +24,11 @@
+ Private="false">
+
+ TargetFramework=$(NetToolCurrent)
+ TargetFramework=$(NetFrameworkToolCurrent)
+
diff --git a/eng/Signing.props b/eng/Signing.props
index afd81da3439..78a3204d090 100644
--- a/eng/Signing.props
+++ b/eng/Signing.props
@@ -4,28 +4,22 @@
are already signed. However, they must be signed with a 3rd party certificate.
-->
-
-
-
-
+
+
+
-
-
-
-
-
+
-
-
-
-
+
+
+
diff --git a/eng/Version.Details.props b/eng/Version.Details.props
index 145460f34b6..dc2a4e1e273 100644
--- a/eng/Version.Details.props
+++ b/eng/Version.Details.props
@@ -6,19 +6,19 @@ This file should be imported by eng/Versions.props
- 11.0.0-beta.26203.4
- 11.0.0-beta.26203.4
+ 10.0.0-beta.26177.7
+ 10.0.0-beta.26177.7
- 1.1.0-beta.26176.1
- 1.1.0-beta.26176.1
+ 1.1.0-beta.25424.1
+ 1.1.0-beta.25424.1
- 2.0.3
+ 2.0.0-beta5.25210.1
2.0.0-preview.1.24305.1
8.0.0-preview.24461.2
- 1.1.0-beta.26176.1
+ 1.1.0-beta.25421.1
17.12.50
17.12.50
@@ -28,28 +28,38 @@ This file should be imported by eng/Versions.props
4.8.0
4.8.0
- 10.0.3
- 10.0.3
- 10.0.3
- 10.0.3
- 10.0.3
- 10.0.3
- 10.0.3
- 10.0.3
- 10.0.3
- 10.0.3
- 10.0.3
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
+ 9.0.0-rc.2.24473.5
9.0.100-preview.6.24328.19
1.1.0-beta2-19575-01
1.1.0-beta2-19575-01
+ 2.0.0-preview.1.23470.14
2.0.0-preview.1.23470.14
10.0.100-preview.4.25220.1
- 11.0.0-prerelease.26181.1
+ 11.0.0-prerelease.26169.1
+
+ 13.0.3
+
+ 2.23.0
@@ -76,6 +86,7 @@ This file should be imported by eng/Versions.props
$(MicrosoftCodeAnalysisCSharpPackageVersion)
$(MicrosoftNetCompilersToolsetPackageVersion)
+ $(MicrosoftBclAsyncInterfacesPackageVersion)
$(MicrosoftExtensionsDependencyInjectionPackageVersion)
$(MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion)
$(MicrosoftExtensionsDependencyModelPackageVersion)
@@ -83,20 +94,29 @@ This file should be imported by eng/Versions.props
$(MicrosoftExtensionsFileSystemGlobbingPackageVersion)
$(MicrosoftExtensionsHttpPackageVersion)
$(MicrosoftExtensionsLoggingConsolePackageVersion)
- $(SystemCompositionPackageVersion)
+ $(SystemCollectionsImmutablePackageVersion)
+ $(SystemFormatsAsn1PackageVersion)
$(SystemIOPackagingPackageVersion)
+ $(SystemReflectionMetadataPackageVersion)
$(SystemSecurityCryptographyPkcsPackageVersion)
$(SystemSecurityCryptographyXmlPackageVersion)
+ $(SystemTextEncodingsWebPackageVersion)
+ $(SystemTextJsonPackageVersion)
$(MicrosoftNETSdkWorkloadManifestReaderPackageVersion)
$(MicrosoftDiaSymReaderConverterPackageVersion)
$(MicrosoftDiaSymReaderPdb2PdbPackageVersion)
+ $(MicrosoftSymbolUploaderPackageVersion)
$(MicrosoftSymbolUploaderBuildTaskPackageVersion)
$(MicrosoftTemplateEngineAuthoringTasksPackageVersion)
$(MicrosoftDotNetXHarnessCLIPackageVersion)
+
+ $(NewtonsoftJsonPackageVersion)
+
+ $(MicrosoftApplicationInsightsPackageVersion)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index ff41ad6b686..319ef2ef662 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,9 +1,16 @@
-
+
+
+
+ https://github.com/microsoft/ApplicationInsights-dotnet
+ 2faa7e8b157a431daa2e71785d68abd5fa817b53
+
https://github.com/dotnet/roslyn
e091728607ca0fc9efca55ccfb3e59259c6b5a0a
@@ -12,29 +19,33 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-symuploader
d617bc8ed2787c235a57cf0dcdfd087b86ff9521
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-symuploader
+ d617bc8ed2787c235a57cf0dcdfd087b86ff9521
+
https://github.com/dotnet/templating
43b5827697e501c442eb75ffff832cd4df2514fe
-
+
https://github.com/dotnet/arcade
- a27cb13c8355fd3711a66e8c0d4f71e76dafaa18
+ 62dc2defffeadabf6761a9ed7e142692107330c0
-
+
https://github.com/dotnet/arcade
- a27cb13c8355fd3711a66e8c0d4f71e76dafaa18
+ 62dc2defffeadabf6761a9ed7e142692107330c0
-
+
https://github.com/dotnet/arcade-services
- a9d498ae6ab98685d6d8376c6f47604d4638651e
+ e6a28a549cc932140719fd63ba0387254db0ac51
-
+
https://github.com/dotnet/arcade-services
- a9d498ae6ab98685d6d8376c6f47604d4638651e
+ e6a28a549cc932140719fd63ba0387254db0ac51
-
+
https://github.com/dotnet/xharness
- 3d43498414571f4f63c4dd14241c46404e8c60f9
+ b0c8bf6dba87c70e284cff06819f0cd714c8f2e4
https://github.com/dotnet/roslyn
@@ -54,47 +65,66 @@
-
- https://github.com/dotnet/runtime
- dc5fd7a8dce8309e4add8fd4bd5d8718f221b15a
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
+
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
-
- https://github.com/dotnet/runtime
- dc5fd7a8dce8309e4add8fd4bd5d8718f221b15a
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
-
- https://github.com/dotnet/runtime
- dc5fd7a8dce8309e4add8fd4bd5d8718f221b15a
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
-
- https://github.com/dotnet/runtime
- dc5fd7a8dce8309e4add8fd4bd5d8718f221b15a
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
-
- https://github.com/dotnet/runtime
- dc5fd7a8dce8309e4add8fd4bd5d8718f221b15a
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
-
- https://github.com/dotnet/runtime
- dc5fd7a8dce8309e4add8fd4bd5d8718f221b15a
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
-
- https://github.com/dotnet/runtime
- dc5fd7a8dce8309e4add8fd4bd5d8718f221b15a
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
-
- https://github.com/dotnet/runtime
- dc5fd7a8dce8309e4add8fd4bd5d8718f221b15a
-
-
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
+
+
+
+ https://github.com/JamesNK/Newtonsoft.Json
+ 0a2e291c0d9c0c7675d445703e51750363a549ef
+
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
+
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
+
+
https://github.com/dotnet/deployment-tools
d882ae4af9fb09a89e36487a9c8cb7dfde713927
@@ -103,26 +133,34 @@
ef4c24166691977558e5312758df4313ab310dc0
-
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
+
+
https://github.com/dotnet/command-line-api
- c7b5e07cfed85e88c162dc1c916efaff03742e6e
+ e9b0511d7f1128e2bc3be7a658a2a4ea977e602d
-
- https://github.com/dotnet/runtime
- dc5fd7a8dce8309e4add8fd4bd5d8718f221b15a
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
+
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
-
- https://github.com/dotnet/runtime
- dc5fd7a8dce8309e4add8fd4bd5d8718f221b15a
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
-
- https://github.com/dotnet/runtime
- dc5fd7a8dce8309e4add8fd4bd5d8718f221b15a
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 990ebf52fc408ca45929fd176d2740675a67fab8
-
+
https://github.com/dotnet/dnceng
- ccb98f08f700e29ad1dca55697c1e1472cb6cb17
+ 949759ff23ff663a2c3e105cf504b281fe667d01
diff --git a/eng/Versions.props b/eng/Versions.props
index 00e71372322..50fe1932967 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -1,26 +1,40 @@
-
-
-
+
- 11.0.0
+
+ 10.0.0
beta
-
-
+
false
+
+ true
+
+
+
+ 6.0.0
+ 4.6.3
+ 6.1.3
+
+
+ 1.1.1
+ 4.5.5
+ 6.0.1
-
+
+ 9.0.0-beta.24223.1
4.3.0
+
+ 2.0.3
- 7.0.1
- 7.0.1
- 7.0.1
- 7.0.1
- 7.0.1
+ 6.13.2
+ 6.13.2
+ 6.13.2
+ 6.13.2
+ 6.13.2
5.0.0
6.0.4
@@ -35,6 +49,8 @@
6.0.22
15.2.302-preview.14.122
16.0.527
+ 9.0.0-preview.6.24327.7
+
+ 17.5.0
-
diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1
index fc8d618014e..65ed3a8adef 100644
--- a/eng/common/SetupNugetSources.ps1
+++ b/eng/common/SetupNugetSources.ps1
@@ -1,6 +1,7 @@
# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
-# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
-# disabled internal Maestro (darc-int*) feeds.
+# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. Similarly,
+# dotnet-eng-internal and dotnet-tools-internal are added if dotnet-eng and dotnet-tools are present.
+# In addition, this script also enables disabled internal Maestro (darc-int*) feeds.
#
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.
#
@@ -173,4 +174,16 @@ foreach ($dotnetVersion in $dotnetVersions) {
}
}
+# Check for dotnet-eng and add dotnet-eng-internal if present
+$dotnetEngSource = $sources.SelectSingleNode("add[@key='dotnet-eng']")
+if ($dotnetEngSource -ne $null) {
+ AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "dotnet-eng-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-eng-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password
+}
+
+# Check for dotnet-tools and add dotnet-tools-internal if present
+$dotnetToolsSource = $sources.SelectSingleNode("add[@key='dotnet-tools']")
+if ($dotnetToolsSource -ne $null) {
+ AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "dotnet-tools-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password
+}
+
$doc.Save($filename)
diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh
index b97cc536379..b2163abbe71 100755
--- a/eng/common/SetupNugetSources.sh
+++ b/eng/common/SetupNugetSources.sh
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
# This script adds internal feeds required to build commits that depend on internal package sources. For instance,
-# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables
-# disabled internal Maestro (darc-int*) feeds.
+# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. Similarly,
+# dotnet-eng-internal and dotnet-tools-internal are added if dotnet-eng and dotnet-tools are present.
+# In addition, this script also enables disabled internal Maestro (darc-int*) feeds.
#
# Optionally, this script also adds a credential entry for each of the internal feeds if supplied.
#
@@ -173,6 +174,18 @@ for DotNetVersion in ${DotNetVersions[@]} ; do
fi
done
+# Check for dotnet-eng and add dotnet-eng-internal if present
+grep -i " /dev/null
+if [ "$?" == "0" ]; then
+ AddOrEnablePackageSource "dotnet-eng-internal" "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-eng-internal/nuget/$FeedSuffix"
+fi
+
+# Check for dotnet-tools and add dotnet-tools-internal if present
+grep -i " /dev/null
+if [ "$?" == "0" ]; then
+ AddOrEnablePackageSource "dotnet-tools-internal" "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/$FeedSuffix"
+fi
+
# I want things split line by line
PrevIFS=$IFS
IFS=$'\n'
diff --git a/eng/common/build.ps1 b/eng/common/build.ps1
index 18397a60eb8..8cfee107e7a 100644
--- a/eng/common/build.ps1
+++ b/eng/common/build.ps1
@@ -6,7 +6,6 @@ Param(
[string][Alias('v')]$verbosity = "minimal",
[string] $msbuildEngine = $null,
[bool] $warnAsError = $true,
- [string] $warnNotAsError = '',
[bool] $nodeReuse = $true,
[switch] $buildCheck = $false,
[switch][Alias('r')]$restore,
@@ -71,7 +70,6 @@ function Print-Usage() {
Write-Host " -excludeCIBinarylog Don't output binary log (short: -nobl)"
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')"
- Write-Host " -warnNotAsError Sets a semi-colon delimited list of warning codes that should not be treated as errors"
Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
diff --git a/eng/common/build.sh b/eng/common/build.sh
index 5883e53bcfb..9767bb411a4 100755
--- a/eng/common/build.sh
+++ b/eng/common/build.sh
@@ -42,7 +42,6 @@ usage()
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
echo " --nodeReuse Sets nodereuse msbuild parameter ('true' or 'false')"
echo " --warnAsError Sets warnaserror msbuild parameter ('true' or 'false')"
- echo " --warnNotAsError Sets a semi-colon delimited list of warning codes that should not be treated as errors"
echo " --buildCheck Sets /check msbuild parameter"
echo " --fromVMR Set when building from within the VMR"
echo ""
@@ -79,7 +78,6 @@ ci=false
clean=false
warn_as_error=true
-warn_not_as_error=''
node_reuse=true
build_check=false
binary_log=false
@@ -94,7 +92,7 @@ runtime_source_feed=''
runtime_source_feed_key=''
properties=()
-while [[ $# -gt 0 ]]; do
+while [[ $# > 0 ]]; do
opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
-help|-h)
@@ -178,10 +176,6 @@ while [[ $# -gt 0 ]]; do
warn_as_error=$2
shift
;;
- -warnnotaserror)
- warn_not_as_error=$2
- shift
- ;;
-nodereuse)
node_reuse=$2
shift
diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml
index 66c7988f222..eaed6d87e65 100644
--- a/eng/common/core-templates/job/job.yml
+++ b/eng/common/core-templates/job/job.yml
@@ -19,8 +19,6 @@ parameters:
# publishing defaults
artifacts: ''
enableMicrobuild: false
- enablePreviewMicrobuild: false
- microbuildPluginVersion: 'latest'
enableMicrobuildForMacAndLinux: false
microbuildUseESRP: true
enablePublishBuildArtifacts: false
@@ -73,8 +71,6 @@ jobs:
templateContext: ${{ parameters.templateContext }}
variables:
- - name: AllowPtrToDetectTestRunRetryFiles
- value: true
- ${{ if ne(parameters.enableTelemetry, 'false') }}:
- name: DOTNET_CLI_TELEMETRY_PROFILE
value: '$(Build.Repository.Uri)'
@@ -132,8 +128,6 @@ jobs:
- template: /eng/common/core-templates/steps/install-microbuild.yml
parameters:
enableMicrobuild: ${{ parameters.enableMicrobuild }}
- enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}
- microbuildPluginVersion: ${{ parameters.microbuildPluginVersion }}
enableMicrobuildForMacAndLinux: ${{ parameters.enableMicrobuildForMacAndLinux }}
microbuildUseESRP: ${{ parameters.microbuildUseESRP }}
continueOnError: ${{ parameters.continueOnError }}
@@ -156,8 +150,6 @@ jobs:
- template: /eng/common/core-templates/steps/cleanup-microbuild.yml
parameters:
enableMicrobuild: ${{ parameters.enableMicrobuild }}
- enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}
- microbuildPluginVersion: ${{ parameters.microbuildPluginVersion }}
enableMicrobuildForMacAndLinux: ${{ parameters.enableMicrobuildForMacAndLinux }}
continueOnError: ${{ parameters.continueOnError }}
diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml
index 700f7711465..06f2eed0323 100644
--- a/eng/common/core-templates/job/publish-build-assets.yml
+++ b/eng/common/core-templates/job/publish-build-assets.yml
@@ -91,8 +91,8 @@ jobs:
fetchDepth: 3
clean: true
- - ${{ if eq(parameters.isAssetlessBuild, 'false') }}:
- - ${{ if eq(parameters.publishingVersion, 3) }}:
+ - ${{ if eq(parameters.isAssetlessBuild, 'false') }}:
+ - ${{ if eq(parameters.publishingVersion, 3) }}:
- task: DownloadPipelineArtifact@2
displayName: Download Asset Manifests
inputs:
@@ -117,7 +117,7 @@ jobs:
flattenFolders: true
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
-
+
- task: NuGetAuthenticate@1
# Populate internal runtime variables.
@@ -125,7 +125,7 @@ jobs:
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
parameters:
legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw)
-
+
- template: /eng/common/templates/steps/enable-internal-runtimes.yml
- task: AzureCLI@2
@@ -145,7 +145,7 @@ jobs:
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
-
+
- task: powershell@2
displayName: Create ReleaseConfigs Artifact
inputs:
@@ -191,7 +191,7 @@ jobs:
BARBuildId: ${{ parameters.BARBuildId }}
PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
is1ESPipeline: ${{ parameters.is1ESPipeline }}
-
+
# Darc is targeting 8.0, so make sure it's installed
- task: UseDotNet@2
inputs:
diff --git a/eng/common/core-templates/job/renovate.yml b/eng/common/core-templates/job/renovate.yml
deleted file mode 100644
index ff86c80b468..00000000000
--- a/eng/common/core-templates/job/renovate.yml
+++ /dev/null
@@ -1,196 +0,0 @@
-# --------------------------------------------------------------------------------------
-# Renovate Bot Job Template
-# --------------------------------------------------------------------------------------
-# This Azure DevOps pipeline job template runs Renovate (https://docs.renovatebot.com/)
-# to automatically update dependencies in a GitHub repository.
-#
-# Renovate scans the repository for dependency files and creates pull requests to update
-# outdated dependencies based on the configuration specified in the renovateConfigPath
-# parameter.
-#
-# Usage:
-# For each product repo wanting to make use of Renovate, this template is called from
-# an internal Azure DevOps pipeline, typically with a schedule trigger, to check for
-# and propose dependency updates.
-#
-# For more info, see https://github.com/dotnet/arcade/blob/main/Documentation/Renovate.md
-# --------------------------------------------------------------------------------------
-
-parameters:
-
-# Path to the Renovate configuration file within the repository.
-- name: renovateConfigPath
- type: string
- default: 'eng/renovate.json'
-
-# GitHub repository to run Renovate against, in the format 'owner/repo'.
-# This could technically be any repo but convention is to target the same
-# repo that contains the calling pipeline. The Renovate config file would
-# be co-located with the pipeline's repo and, in most cases, the config
-# file is specific to the repo being targeted.
-- name: gitHubRepo
- type: string
-
-# List of base branches to target for Renovate PRs.
-# NOTE: The Renovate configuration file is always read from the branch where the
-# pipeline is run, NOT from the target branches specified here. If you need different
-# configurations for different branches, run the pipeline from each branch separately.
-- name: baseBranches
- type: object
- default:
- - main
-
-# When true, Renovate will run in dry run mode, which previews changes without creating PRs.
-# See the 'Run Renovate' step log output for details of what would have been changed.
-- name: dryRun
- type: boolean
- default: false
-
-# By default, Renovate will not recreate a PR for a given dependency/version pair that was
-# previously closed. This allows opting in to always recreating PRs even if they were
-# previously closed.
-- name: forceRecreatePR
- type: boolean
- default: false
-
-# Name of the arcade repository resource in the pipeline.
-# This allows repos which haven't been onboarded to Arcade to still use this
-# template by checking out the repo as a resource with a custom name and pointing
-# this parameter to it.
-- name: arcadeRepoResource
- type: string
- default: self
-
-# Directory name for the self repo under $(Build.SourcesDirectory) in multi-checkout.
-# In multi-checkout (when arcadeRepoResource != 'self'), Azure DevOps checks out the
-# self repo to $(Build.SourcesDirectory)/. Set this to match the auto-generated
-# directory name. Using the auto-generated name is necessary rather than explicitly
-# defining a checkout path because container jobs expect repos to live under the agent's
-# workspace ($(Pipeline.Workspace)). On some self-hosted setups the host path
-# (e.g., /mnt/vss/_work) differs from the container path (e.g., /__w), and a custom checkout
-# path can fail validation. Using the default checkout location keeps the paths consistent
-# and avoids this issue.
-- name: selfRepoName
- type: string
- default: ''
-- name: arcadeRepoName
- type: string
- default: ''
-
-# Pool configuration for the job.
-- name: pool
- type: object
- default:
- name: NetCore1ESPool-Internal
- image: build.azurelinux.3.amd64
- os: linux
-
-jobs:
-- job: Renovate
- displayName: Run Renovate
- container: RenovateContainer
- variables:
- - group: dotnet-renovate-bot
- # The Renovate version is automatically updated by https://github.com/dotnet/arcade/blob/main/azure-pipelines-renovate.yml.
- # Changing the variable name here would require updating the name in https://github.com/dotnet/arcade/blob/main/eng/renovate.json as well.
- - name: renovateVersion
- value: '42'
- readonly: true
- - name: renovateLogFilePath
- value: '$(Build.ArtifactStagingDirectory)/renovate.json'
- readonly: true
- - name: dryRunArg
- readonly: true
- ${{ if eq(parameters.dryRun, true) }}:
- value: 'full'
- ${{ else }}:
- value: ''
- - name: recreateWhenArg
- readonly: true
- ${{ if eq(parameters.forceRecreatePR, true) }}:
- value: 'always'
- ${{ else }}:
- value: ''
- # In multi-checkout (without custom paths), Azure DevOps places each repo under
- # $(Build.SourcesDirectory)/. selfRepoName must be provided in that case.
- - name: selfRepoPath
- readonly: true
- ${{ if eq(parameters.arcadeRepoResource, 'self') }}:
- value: '$(Build.SourcesDirectory)'
- ${{ else }}:
- value: '$(Build.SourcesDirectory)/${{ parameters.selfRepoName }}'
- - name: arcadeRepoPath
- readonly: true
- ${{ if eq(parameters.arcadeRepoResource, 'self') }}:
- value: '$(Build.SourcesDirectory)'
- ${{ else }}:
- value: '$(Build.SourcesDirectory)/${{ parameters.arcadeRepoName }}'
- pool: ${{ parameters.pool }}
-
- templateContext:
- outputParentDirectory: $(Build.ArtifactStagingDirectory)
- outputs:
- - output: pipelineArtifact
- displayName: Publish Renovate Log
- condition: succeededOrFailed()
- targetPath: $(Build.ArtifactStagingDirectory)
- artifactName: $(Agent.JobName)_Logs_Attempt$(System.JobAttempt)
- isProduction: false # logs are non-production artifacts
-
- steps:
- - checkout: self
- fetchDepth: 1
-
- - ${{ if ne(parameters.arcadeRepoResource, 'self') }}:
- - checkout: ${{ parameters.arcadeRepoResource }}
- fetchDepth: 1
-
- - script: |
- renovate-config-validator $(selfRepoPath)/${{parameters.renovateConfigPath}} 2>&1 | tee /tmp/renovate-config-validator.out
- validatorExit=${PIPESTATUS[0]}
- if grep -q '^ WARN:' /tmp/renovate-config-validator.out; then
- echo "##vso[task.logissue type=warning]Renovate config validator produced warnings."
- echo "##vso[task.complete result=SucceededWithIssues]"
- fi
- exit $validatorExit
- displayName: Validate Renovate config
- env:
- LOG_LEVEL: info
- LOG_FILE_LEVEL: debug
- LOG_FILE: $(Build.ArtifactStagingDirectory)/renovate-config-validator.json
-
- - script: |
- . $(arcadeRepoPath)/eng/common/renovate.env
- renovate 2>&1 | tee /tmp/renovate.out
- renovateExit=${PIPESTATUS[0]}
- if grep -q '^ WARN:' /tmp/renovate.out; then
- echo "##vso[task.logissue type=warning]Renovate produced warnings."
- echo "##vso[task.complete result=SucceededWithIssues]"
- fi
- exit $renovateExit
- displayName: Run Renovate
- env:
- RENOVATE_FORK_TOKEN: $(BotAccount-dotnet-renovate-bot-PAT)
- RENOVATE_TOKEN: $(BotAccount-dotnet-renovate-bot-PAT)
- RENOVATE_REPOSITORIES: ${{parameters.gitHubRepo}}
- RENOVATE_BASE_BRANCHES: ${{ convertToJson(parameters.baseBranches) }}
- RENOVATE_DRY_RUN: $(dryRunArg)
- RENOVATE_RECREATE_WHEN: $(recreateWhenArg)
- LOG_LEVEL: info
- LOG_FILE_LEVEL: debug
- LOG_FILE: $(renovateLogFilePath)
- RENOVATE_CONFIG_FILE: $(selfRepoPath)/${{parameters.renovateConfigPath}}
-
- - script: |
- echo "PRs created by Renovate:"
- if [ -s "$(renovateLogFilePath)" ]; then
- if ! jq -r 'select(.msg == "PR created" and .pr != null) | "https://github.com/\(.repository)/pull/\(.pr)"' "$(renovateLogFilePath)" | sort -u; then
- echo "##vso[task.logissue type=warning]Failed to parse Renovate log file with jq."
- echo "##vso[task.complete result=SucceededWithIssues]"
- fi
- else
- echo "##vso[task.logissue type=warning]No Renovate log file found or file is empty."
- echo "##vso[task.complete result=SucceededWithIssues]"
- fi
- displayName: List created PRs
- condition: and(succeededOrFailed(), eq('${{ parameters.dryRun }}', false))
diff --git a/eng/common/core-templates/job/source-index-stage1.yml b/eng/common/core-templates/job/source-index-stage1.yml
index bac6ac5faac..76baf5c2725 100644
--- a/eng/common/core-templates/job/source-index-stage1.yml
+++ b/eng/common/core-templates/job/source-index-stage1.yml
@@ -15,8 +15,6 @@ jobs:
variables:
- name: BinlogPath
value: ${{ parameters.binlogPath }}
- - name: skipComponentGovernanceDetection
- value: true
- template: /eng/common/core-templates/variables/pool-providers.yml
parameters:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
@@ -27,10 +25,10 @@ jobs:
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: $(DncEngPublicBuildPool)
- image: windows.vs2026.amd64.open
+ image: windows.vs2026preview.scout.amd64.open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $(DncEngInternalBuildPool)
- image: windows.vs2026.amd64
+ image: windows.vs2026preview.scout.amd64
steps:
- ${{ if eq(parameters.is1ESPipeline, '') }}:
diff --git a/eng/common/core-templates/jobs/codeql-build.yml b/eng/common/core-templates/jobs/codeql-build.yml
new file mode 100644
index 00000000000..dbc14ac580a
--- /dev/null
+++ b/eng/common/core-templates/jobs/codeql-build.yml
@@ -0,0 +1,32 @@
+parameters:
+ # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md
+ continueOnError: false
+ # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
+ jobs: []
+ # Optional: if specified, restore and use this version of Guardian instead of the default.
+ overrideGuardianVersion: ''
+ is1ESPipeline: ''
+
+jobs:
+- template: /eng/common/core-templates/jobs/jobs.yml
+ parameters:
+ is1ESPipeline: ${{ parameters.is1ESPipeline }}
+ enableMicrobuild: false
+ enablePublishBuildArtifacts: false
+ enablePublishTestResults: false
+ enablePublishBuildAssets: false
+ enableTelemetry: true
+
+ variables:
+ - group: Publish-Build-Assets
+ # The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in
+ # sync with the packages.config file.
+ - name: DefaultGuardianVersion
+ value: 0.109.0
+ - name: GuardianPackagesConfigFile
+ value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config
+ - name: GuardianVersion
+ value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }}
+
+ jobs: ${{ parameters.jobs }}
+
diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml
index fcf40d1d2e6..b54db518826 100644
--- a/eng/common/core-templates/post-build/post-build.yml
+++ b/eng/common/core-templates/post-build/post-build.yml
@@ -1,108 +1,118 @@
parameters:
-# Which publishing infra should be used. THIS SHOULD MATCH THE VERSION ON THE BUILD MANIFEST.
-# Publishing V1 is no longer supported
-# Publishing V2 is no longer supported
-# Publishing V3 is the default
-- name: publishingInfraVersion
- displayName: Which version of publishing should be used to promote the build definition?
- type: number
- default: 3
- values:
- - 3
- - 4
-
-- name: BARBuildId
- displayName: BAR Build Id
- type: number
- default: 0
-
-- name: PromoteToChannelIds
- displayName: Channel to promote BARBuildId to
- type: string
- default: ''
-
-- name: enableSourceLinkValidation
- displayName: Enable SourceLink validation
- type: boolean
- default: false
-
-- name: enableSigningValidation
- displayName: Enable signing validation
- type: boolean
- default: true
-
-- name: enableSymbolValidation
- displayName: Enable symbol validation
- type: boolean
- default: false
-
-- name: enableNugetValidation
- displayName: Enable NuGet validation
- type: boolean
- default: true
-
-- name: publishInstallersAndChecksums
- displayName: Publish installers and checksums
- type: boolean
- default: true
-
-- name: requireDefaultChannels
- displayName: Fail the build if there are no default channel(s) registrations for the current build
- type: boolean
- default: false
-
-- name: isAssetlessBuild
- type: boolean
- displayName: Is Assetless Build
- default: false
-
-# These parameters let the user customize the call to sdk-task.ps1 for publishing
-# symbols & general artifacts as well as for signing validation
-- name: symbolPublishingAdditionalParameters
- displayName: Symbol publishing additional parameters
- type: string
- default: ''
-
-- name: artifactsPublishingAdditionalParameters
- displayName: Artifact publishing additional parameters
- type: string
- default: ''
-
-- name: signingValidationAdditionalParameters
- displayName: Signing validation additional parameters
- type: string
- default: ''
-
-# Which stages should finish execution before post-build stages start
-- name: validateDependsOn
- type: object
- default:
- - build
-
-- name: publishDependsOn
- type: object
- default:
- - Validate
-
-# Optional: Call asset publishing rather than running in a separate stage
-- name: publishAssetsImmediately
- type: boolean
- default: false
-
-- name: is1ESPipeline
- type: boolean
- default: false
+ # Which publishing infra should be used. THIS SHOULD MATCH THE VERSION ON THE BUILD MANIFEST.
+ # Publishing V1 is no longer supported
+ # Publishing V2 is no longer supported
+ # Publishing V3 is the default
+ - name: publishingInfraVersion
+ displayName: Which version of publishing should be used to promote the build definition?
+ type: number
+ default: 3
+ values:
+ - 3
+ - 4
+
+ - name: BARBuildId
+ displayName: BAR Build Id
+ type: number
+ default: 0
+
+ - name: PromoteToChannelIds
+ displayName: Channel to promote BARBuildId to
+ type: string
+ default: ''
+
+ - name: enableSourceLinkValidation
+ displayName: Enable SourceLink validation
+ type: boolean
+ default: false
+
+ - name: enableSigningValidation
+ displayName: Enable signing validation
+ type: boolean
+ default: true
+
+ - name: enableSymbolValidation
+ displayName: Enable symbol validation
+ type: boolean
+ default: false
+
+ - name: enableNugetValidation
+ displayName: Enable NuGet validation
+ type: boolean
+ default: true
+
+ - name: publishInstallersAndChecksums
+ displayName: Publish installers and checksums
+ type: boolean
+ default: true
+
+ - name: requireDefaultChannels
+ displayName: Fail the build if there are no default channel(s) registrations for the current build
+ type: boolean
+ default: false
+
+ - name: SDLValidationParameters
+ type: object
+ default:
+ enable: false
+ publishGdn: false
+ continueOnError: false
+ params: ''
+ artifactNames: ''
+ downloadArtifacts: true
+
+ - name: isAssetlessBuild
+ type: boolean
+ displayName: Is Assetless Build
+ default: false
+
+ # These parameters let the user customize the call to sdk-task.ps1 for publishing
+ # symbols & general artifacts as well as for signing validation
+ - name: symbolPublishingAdditionalParameters
+ displayName: Symbol publishing additional parameters
+ type: string
+ default: ''
+
+ - name: artifactsPublishingAdditionalParameters
+ displayName: Artifact publishing additional parameters
+ type: string
+ default: ''
+
+ - name: signingValidationAdditionalParameters
+ displayName: Signing validation additional parameters
+ type: string
+ default: ''
+
+ # Which stages should finish execution before post-build stages start
+ - name: validateDependsOn
+ type: object
+ default:
+ - build
+
+ - name: publishDependsOn
+ type: object
+ default:
+ - Validate
+
+ # Optional: Call asset publishing rather than running in a separate stage
+ - name: publishAssetsImmediately
+ type: boolean
+ default: false
+
+ - name: is1ESPipeline
+ type: boolean
+ default: false
stages:
-- ${{ if or(eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true')) }}:
+- ${{ if or(eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}:
- stage: Validate
dependsOn: ${{ parameters.validateDependsOn }}
displayName: Validate Build Assets
variables:
- - template: /eng/common/core-templates/post-build/common-variables.yml
- - template: /eng/common/core-templates/variables/pool-providers.yml
- parameters:
- is1ESPipeline: ${{ parameters.is1ESPipeline }}
+ - template: /eng/common/core-templates/post-build/common-variables.yml
+ - template: /eng/common/core-templates/variables/pool-providers.yml
+ parameters:
+ is1ESPipeline: ${{ parameters.is1ESPipeline }}
jobs:
- job:
displayName: NuGet Validation
@@ -118,49 +128,49 @@ stages:
${{ else }}:
${{ if eq(parameters.is1ESPipeline, true) }}:
name: $(DncEngInternalBuildPool)
- image: windows.vs2026.amd64
+ image: windows.vs2026preview.scout.amd64
os: windows
${{ else }}:
name: $(DncEngInternalBuildPool)
- demands: ImageOverride -equals windows.vs2026.amd64
+ demands: ImageOverride -equals windows.vs2026preview.scout.amd64
steps:
- - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml
- parameters:
- BARBuildId: ${{ parameters.BARBuildId }}
- PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
- is1ESPipeline: ${{ parameters.is1ESPipeline }}
-
- - ${{ if ne(parameters.publishingInfraVersion, 4) }}:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
+ - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml
+ parameters:
+ BARBuildId: ${{ parameters.BARBuildId }}
+ PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
+ is1ESPipeline: ${{ parameters.is1ESPipeline }}
+
+ - ${{ if ne(parameters.publishingInfraVersion, 4) }}:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download Package Artifacts
+ inputs:
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ artifactName: PackageArtifacts
+ checkDownloadedFiles: true
+ - ${{ if eq(parameters.publishingInfraVersion, 4) }}:
+ - task: DownloadPipelineArtifact@2
+ displayName: Download Pipeline Artifacts (V4)
+ inputs:
+ itemPattern: '*/packages/**/*.nupkg'
+ targetPath: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload'
+ - task: CopyFiles@2
+ displayName: Flatten packages to PackageArtifacts
+ inputs:
+ SourceFolder: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload'
+ Contents: '**/*.nupkg'
+ TargetFolder: '$(Build.ArtifactStagingDirectory)/PackageArtifacts'
+ flattenFolders: true
+
+ - task: PowerShell@2
+ displayName: Validate
inputs:
- buildType: specific
- buildVersionToDownload: specific
- project: $(AzDOProjectName)
- pipeline: $(AzDOPipelineId)
- buildId: $(AzDOBuildId)
- artifactName: PackageArtifacts
- checkDownloadedFiles: true
- - ${{ if eq(parameters.publishingInfraVersion, 4) }}:
- - task: DownloadPipelineArtifact@2
- displayName: Download Pipeline Artifacts (V4)
- inputs:
- itemPattern: '*/packages/**/*.nupkg'
- targetPath: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload'
- - task: CopyFiles@2
- displayName: Flatten packages to PackageArtifacts
- inputs:
- SourceFolder: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload'
- Contents: '**/*.nupkg'
- TargetFolder: '$(Build.ArtifactStagingDirectory)/PackageArtifacts'
- flattenFolders: true
-
- - task: PowerShell@2
- displayName: Validate
- inputs:
- filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1
- arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
+ filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1
+ arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
- job:
displayName: Signing Validation
@@ -174,68 +184,68 @@ stages:
os: windows
# If it's not devdiv, it's dnceng
${{ else }}:
- ${{ if eq(parameters.is1ESPipeline, true) }}:
+ ${{ if eq(parameters.is1ESPipeline, true) }}:
name: $(DncEngInternalBuildPool)
image: windows.vs2026.amd64
os: windows
${{ else }}:
name: $(DncEngInternalBuildPool)
- demands: ImageOverride -equals windows.vs2026.amd64
+ demands: ImageOverride -equals windows.vs2026preview.scout.amd64
steps:
- - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml
- parameters:
- BARBuildId: ${{ parameters.BARBuildId }}
- PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
- is1ESPipeline: ${{ parameters.is1ESPipeline }}
-
- - ${{ if ne(parameters.publishingInfraVersion, 4) }}:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: specific
- buildVersionToDownload: specific
- project: $(AzDOProjectName)
- pipeline: $(AzDOPipelineId)
- buildId: $(AzDOBuildId)
- artifactName: PackageArtifacts
- checkDownloadedFiles: true
- - ${{ if eq(parameters.publishingInfraVersion, 4) }}:
- - task: DownloadPipelineArtifact@2
- displayName: Download Pipeline Artifacts (V4)
+ - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml
+ parameters:
+ BARBuildId: ${{ parameters.BARBuildId }}
+ PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
+ is1ESPipeline: ${{ parameters.is1ESPipeline }}
+
+ - ${{ if ne(parameters.publishingInfraVersion, 4) }}:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download Package Artifacts
+ inputs:
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ artifactName: PackageArtifacts
+ checkDownloadedFiles: true
+ - ${{ if eq(parameters.publishingInfraVersion, 4) }}:
+ - task: DownloadPipelineArtifact@2
+ displayName: Download Pipeline Artifacts (V4)
+ inputs:
+ itemPattern: '*/packages/**/*.nupkg'
+ targetPath: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload'
+ - task: CopyFiles@2
+ displayName: Flatten packages to PackageArtifacts
+ inputs:
+ SourceFolder: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload'
+ Contents: '**/*.nupkg'
+ TargetFolder: '$(Build.ArtifactStagingDirectory)/PackageArtifacts'
+ flattenFolders: true
+
+ # This is necessary whenever we want to publish/restore to an AzDO private feed
+ # Since sdk-task.ps1 tries to restore packages we need to do this authentication here
+ # otherwise it'll complain about accessing a private feed.
+ - task: NuGetAuthenticate@1
+ displayName: 'Authenticate to AzDO Feeds'
+
+ # Signing validation will optionally work with the buildmanifest file which is downloaded from
+ # Azure DevOps above.
+ - task: PowerShell@2
+ displayName: Validate
inputs:
- itemPattern: '*/packages/**/*.nupkg'
- targetPath: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload'
- - task: CopyFiles@2
- displayName: Flatten packages to PackageArtifacts
- inputs:
- SourceFolder: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload'
- Contents: '**/*.nupkg'
- TargetFolder: '$(Build.ArtifactStagingDirectory)/PackageArtifacts'
- flattenFolders: true
-
- # This is necessary whenever we want to publish/restore to an AzDO private feed
- # Since sdk-task.ps1 tries to restore packages we need to do this authentication here
- # otherwise it'll complain about accessing a private feed.
- - task: NuGetAuthenticate@1
- displayName: 'Authenticate to AzDO Feeds'
-
- # Signing validation will optionally work with the buildmanifest file which is downloaded from
- # Azure DevOps above.
- - task: PowerShell@2
- displayName: Validate
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task SigningValidation -restore
- /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
- /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt'
- ${{ parameters.signingValidationAdditionalParameters }}
-
- - template: /eng/common/core-templates/steps/publish-logs.yml
- parameters:
- is1ESPipeline: ${{ parameters.is1ESPipeline }}
- StageLabel: 'Validation'
- JobLabel: 'Signing'
- BinlogToolVersion: $(BinlogToolVersion)
+ filePath: eng\common\sdk-task.ps1
+ arguments: -task SigningValidation -restore -msbuildEngine vs
+ /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
+ /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt'
+ ${{ parameters.signingValidationAdditionalParameters }}
+
+ - template: /eng/common/core-templates/steps/publish-logs.yml
+ parameters:
+ is1ESPipeline: ${{ parameters.is1ESPipeline }}
+ StageLabel: 'Validation'
+ JobLabel: 'Signing'
+ BinlogToolVersion: $(BinlogToolVersion)
# SourceLink validation has been removed — the underlying CLI tool
# (targeting netcoreapp2.1) has not functioned for years.
@@ -250,20 +260,20 @@ stages:
- task: Delay@1
displayName: 'Warning: SourceLink validation removed (see https://github.com/dotnet/arcade/issues/16647)'
inputs:
- delayForMinutes: '0'
+ delayForMinutes: '0'
- ${{ if ne(parameters.publishAssetsImmediately, 'true') }}:
- stage: publish_using_darc
- ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true')) }}:
+ ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}:
dependsOn: ${{ parameters.publishDependsOn }}
${{ else }}:
dependsOn: ${{ parameters.validateDependsOn }}
displayName: Publish using Darc
variables:
- - template: /eng/common/core-templates/post-build/common-variables.yml
- - template: /eng/common/core-templates/variables/pool-providers.yml
- parameters:
- is1ESPipeline: ${{ parameters.is1ESPipeline }}
+ - template: /eng/common/core-templates/post-build/common-variables.yml
+ - template: /eng/common/core-templates/variables/pool-providers.yml
+ parameters:
+ is1ESPipeline: ${{ parameters.is1ESPipeline }}
jobs:
- job:
displayName: Publish Using Darc
@@ -277,7 +287,7 @@ stages:
os: windows
# If it's not devdiv, it's dnceng
${{ else }}:
- ${{ if eq(parameters.is1ESPipeline, true) }}:
+ ${{ if eq(parameters.is1ESPipeline, true) }}:
name: NetCore1ESPool-Publishing-Internal
image: windows.vs2026.amd64
os: windows
@@ -285,33 +295,34 @@ stages:
name: NetCore1ESPool-Publishing-Internal
demands: ImageOverride -equals windows.vs2026.amd64
steps:
- - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml
- parameters:
- BARBuildId: ${{ parameters.BARBuildId }}
- PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
- is1ESPipeline: ${{ parameters.is1ESPipeline }}
+ - template: /eng/common/core-templates/post-build/setup-maestro-vars.yml
+ parameters:
+ BARBuildId: ${{ parameters.BARBuildId }}
+ PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }}
+ is1ESPipeline: ${{ parameters.is1ESPipeline }}
- - task: NuGetAuthenticate@1
+ - task: NuGetAuthenticate@1
- # Populate internal runtime variables.
- - template: /eng/common/templates/steps/enable-internal-sources.yml
- parameters:
- legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw)
+ # Populate internal runtime variables.
+ - template: /eng/common/templates/steps/enable-internal-sources.yml
+ parameters:
+ legacyCredential: $(dn-bot-dnceng-artifact-feeds-rw)
- - template: /eng/common/templates/steps/enable-internal-runtimes.yml
+ - template: /eng/common/templates/steps/enable-internal-runtimes.yml
- - task: UseDotNet@2
- inputs:
- version: 8.0.x
+ # Darc is targeting 8.0, so make sure it's installed
+ - task: UseDotNet@2
+ inputs:
+ version: 8.0.x
- - task: AzureCLI@2
- displayName: Publish Using Darc
- inputs:
- azureSubscription: "Darc: Maestro Production"
- scriptType: ps
- scriptLocation: scriptPath
- scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1
- arguments: >
+ - task: AzureCLI@2
+ displayName: Publish Using Darc
+ inputs:
+ azureSubscription: "Darc: Maestro Production"
+ scriptType: ps
+ scriptLocation: scriptPath
+ scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1
+ arguments: >
-BuildId $(BARBuildId)
-PublishingInfraVersion 3
-AzdoToken '$(System.AccessToken)'
diff --git a/eng/common/core-templates/stages/renovate.yml b/eng/common/core-templates/stages/renovate.yml
deleted file mode 100644
index edab2818258..00000000000
--- a/eng/common/core-templates/stages/renovate.yml
+++ /dev/null
@@ -1,111 +0,0 @@
-# --------------------------------------------------------------------------------------
-# Renovate Pipeline Template
-# --------------------------------------------------------------------------------------
-# This template provides a complete reusable pipeline definition for running Renovate
-# in a 1ES Official pipeline. Pipelines can extend from this template and only need
-# to pass the Renovate job parameters.
-#
-# For more info, see https://github.com/dotnet/arcade/blob/main/Documentation/Renovate.md
-# --------------------------------------------------------------------------------------
-
-parameters:
-
-# Path to the Renovate configuration file within the repository.
-- name: renovateConfigPath
- type: string
- default: 'eng/renovate.json'
-
-# GitHub repository to run Renovate against, in the format 'owner/repo'.
-- name: gitHubRepo
- type: string
-
-# List of base branches to target for Renovate PRs.
-- name: baseBranches
- type: object
- default:
- - main
-
-# When true, Renovate will run in dry run mode.
-- name: dryRun
- type: boolean
- default: false
-
-# When true, Renovate will recreate PRs even if they were previously closed.
-- name: forceRecreatePR
- type: boolean
- default: false
-
-# Name of the arcade repository resource in the pipeline.
-# This allows repos which haven't been onboarded to Arcade to still use this
-# template by checking out the repo as a resource with a custom name and pointing
-# this parameter to it.
-- name: arcadeRepoResource
- type: string
- default: 'self'
-
-- name: selfRepoName
- type: string
- default: ''
-- name: arcadeRepoName
- type: string
- default: ''
-
-# Pool configuration for the pipeline.
-- name: pool
- type: object
- default:
- name: NetCore1ESPool-Internal
- image: build.azurelinux.3.amd64
- os: linux
-
-# Renovate version used in the container image tag.
-- name: renovateVersion
- default: 43
- type: number
-
-# Pool configuration for SDL analysis.
-- name: sdlPool
- type: object
- default:
- name: NetCore1ESPool-Internal
- image: windows.vs2026.amd64
- os: windows
-
-resources:
- repositories:
- - repository: 1ESPipelineTemplates
- type: git
- name: 1ESPipelineTemplates/1ESPipelineTemplates
- ref: refs/tags/release
-
-extends:
- template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
- parameters:
- pool: ${{ parameters.pool }}
- sdl:
- sourceAnalysisPool: ${{ parameters.sdlPool }}
- # When repos that aren't onboarded to Arcade use this template, they set the
- # arcadeRepoResource parameter to point to their Arcade repo resource. In that case,
- # Aracde will be excluded from SDL analysis.
- ${{ if ne(parameters.arcadeRepoResource, 'self') }}:
- sourceRepositoriesToScan:
- exclude:
- - repository: ${{ parameters.arcadeRepoResource }}
- containers:
- RenovateContainer:
- image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-renovate-${{ parameters.renovateVersion }}-amd64
- stages:
- - stage: Renovate
- displayName: Run Renovate
- jobs:
- - template: /eng/common/core-templates/job/renovate.yml@${{ parameters.arcadeRepoResource }}
- parameters:
- renovateConfigPath: ${{ parameters.renovateConfigPath }}
- gitHubRepo: ${{ parameters.gitHubRepo }}
- baseBranches: ${{ parameters.baseBranches }}
- dryRun: ${{ parameters.dryRun }}
- forceRecreatePR: ${{ parameters.forceRecreatePR }}
- pool: ${{ parameters.pool }}
- arcadeRepoResource: ${{ parameters.arcadeRepoResource }}
- selfRepoName: ${{ parameters.selfRepoName }}
- arcadeRepoName: ${{ parameters.arcadeRepoName }}
diff --git a/eng/common/core-templates/steps/install-microbuild-impl.yml b/eng/common/core-templates/steps/install-microbuild-impl.yml
deleted file mode 100644
index da22beb3f60..00000000000
--- a/eng/common/core-templates/steps/install-microbuild-impl.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-parameters:
- - name: microbuildTaskInputs
- type: object
- default: {}
-
- - name: microbuildEnv
- type: object
- default: {}
-
- - name: enablePreviewMicrobuild
- type: boolean
- default: false
-
- - name: condition
- type: string
-
- - name: continueOnError
- type: boolean
-
-steps:
-- ${{ if eq(parameters.enablePreviewMicrobuild, true) }}:
- - task: MicroBuildSigningPluginPreview@4
- displayName: Install Preview MicroBuild plugin
- inputs: ${{ parameters.microbuildTaskInputs }}
- env: ${{ parameters.microbuildEnv }}
- continueOnError: ${{ parameters.continueOnError }}
- condition: ${{ parameters.condition }}
-- ${{ else }}:
- - task: MicroBuildSigningPlugin@4
- displayName: Install MicroBuild plugin
- inputs: ${{ parameters.microbuildTaskInputs }}
- env: ${{ parameters.microbuildEnv }}
- continueOnError: ${{ parameters.continueOnError }}
- condition: ${{ parameters.condition }}
diff --git a/eng/common/core-templates/steps/install-microbuild.yml b/eng/common/core-templates/steps/install-microbuild.yml
index 76a54e157fd..553fce66b94 100644
--- a/eng/common/core-templates/steps/install-microbuild.yml
+++ b/eng/common/core-templates/steps/install-microbuild.yml
@@ -4,8 +4,6 @@ parameters:
# Enable install tasks for MicroBuild on Mac and Linux
# Will be ignored if 'enableMicrobuild' is false or 'Agent.Os' is 'Windows_NT'
enableMicrobuildForMacAndLinux: false
- # Enable preview version of MB signing plugin
- enablePreviewMicrobuild: false
# Determines whether the ESRP service connection information should be passed to the signing plugin.
# This overlaps with _SignType to some degree. We only need the service connection for real signing.
# It's important that the service connection not be passed to the MicroBuildSigningPlugin task in this place.
@@ -15,8 +13,6 @@ parameters:
microbuildUseESRP: true
# Microbuild installation directory
microBuildOutputFolder: $(Agent.TempDirectory)/MicroBuild
- # Microbuild version
- microbuildPluginVersion: 'latest'
continueOnError: false
@@ -73,46 +69,42 @@ steps:
# YAML expansion, and Windows vs. Linux/Mac uses different service connections. However,
# we can avoid including the MB install step if not enabled at all. This avoids a bunch of
# extra pipeline authorizations, since most pipelines do not sign on non-Windows.
- - template: /eng/common/core-templates/steps/install-microbuild-impl.yml
- parameters:
- enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}
- microbuildTaskInputs:
+ - task: MicroBuildSigningPlugin@4
+ displayName: Install MicroBuild plugin (Windows)
+ inputs:
+ signType: $(_SignType)
+ zipSources: false
+ feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
+ ${{ if eq(parameters.microbuildUseESRP, true) }}:
+ ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)'
+ ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
+ ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea
+ ${{ else }}:
+ ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
+ env:
+ TeamName: $(_TeamName)
+ MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken)
+ continueOnError: ${{ parameters.continueOnError }}
+ condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test'))
+
+ - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, true) }}:
+ - task: MicroBuildSigningPlugin@4
+ displayName: Install MicroBuild plugin (non-Windows)
+ inputs:
signType: $(_SignType)
zipSources: false
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
- version: ${{ parameters.microbuildPluginVersion }}
+ workingDirectory: ${{ parameters.microBuildOutputFolder }}
${{ if eq(parameters.microbuildUseESRP, true) }}:
ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)'
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
- ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea
+ ConnectedPMEServiceName: beb8cb23-b303-4c95-ab26-9e44bc958d39
${{ else }}:
- ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
- microbuildEnv:
+ ConnectedPMEServiceName: c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc
+ env:
TeamName: $(_TeamName)
MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
continueOnError: ${{ parameters.continueOnError }}
- condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test'))
-
- - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, true) }}:
- - template: /eng/common/core-templates/steps/install-microbuild-impl.yml
- parameters:
- enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}
- microbuildTaskInputs:
- signType: $(_SignType)
- zipSources: false
- feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
- version: ${{ parameters.microbuildPluginVersion }}
- workingDirectory: ${{ parameters.microBuildOutputFolder }}
- ${{ if eq(parameters.microbuildUseESRP, true) }}:
- ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)'
- ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
- ConnectedPMEServiceName: beb8cb23-b303-4c95-ab26-9e44bc958d39
- ${{ else }}:
- ConnectedPMEServiceName: c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc
- microbuildEnv:
- TeamName: $(_TeamName)
- MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }}
- SYSTEM_ACCESSTOKEN: $(System.AccessToken)
- continueOnError: ${{ parameters.continueOnError }}
- condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'), eq(variables['_SignType'], 'real'))
+ condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'), eq(variables['_SignType'], 'real'))
diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml
index b75f59c428d..09ae5cd73ae 100644
--- a/eng/common/core-templates/steps/source-build.yml
+++ b/eng/common/core-templates/steps/source-build.yml
@@ -24,7 +24,7 @@ steps:
# in the default public locations.
internalRuntimeDownloadArgs=
if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then
- internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://ci.dot.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)'
+ internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://ci.dot.net/internal --runtimesourcefeedkey '$(dotnetbuilds-internal-container-read-token-base64)''
fi
buildConfig=Release
diff --git a/eng/common/core-templates/steps/source-index-stage1-publish.yml b/eng/common/core-templates/steps/source-index-stage1-publish.yml
index 3ad83b8c307..e9a694afa58 100644
--- a/eng/common/core-templates/steps/source-index-stage1-publish.yml
+++ b/eng/common/core-templates/steps/source-index-stage1-publish.yml
@@ -1,6 +1,6 @@
parameters:
- sourceIndexUploadPackageVersion: 2.0.0-20250906.1
- sourceIndexProcessBinlogPackageVersion: 1.0.1-20250906.1
+ sourceIndexUploadPackageVersion: 2.0.0-20250818.1
+ sourceIndexProcessBinlogPackageVersion: 1.0.1-20250818.1
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
binlogPath: artifacts/log/Debug/Build.binlog
@@ -14,8 +14,8 @@ steps:
workingDirectory: $(Agent.TempDirectory)
- script: |
- $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --source ${{parameters.sourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
- $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --source ${{parameters.sourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
+ $(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version ${{parameters.sourceIndexProcessBinlogPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
+ $(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version ${{parameters.sourceIndexUploadPackageVersion}} --add-source ${{parameters.SourceIndexPackageSource}} --tool-path $(Agent.TempDirectory)/.source-index/tools
displayName: "Source Index: Download netsourceindex Tools"
# Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
workingDirectory: $(Agent.TempDirectory)
diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh
index 314c93c5759..8abfb71f727 100755
--- a/eng/common/cross/build-rootfs.sh
+++ b/eng/common/cross/build-rootfs.sh
@@ -9,7 +9,6 @@ usage()
echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine"
echo " for alpine can be specified with version: alpineX.YY or alpineedge"
echo " for FreeBSD can be: freebsd13, freebsd14"
- echo " for OpenBSD can be: openbsd"
echo " for illumos can be: illumos"
echo " for Haiku can be: haiku."
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD"
@@ -28,8 +27,6 @@ __BuildArch=arm
__AlpineArch=armv7
__FreeBSDArch=arm
__FreeBSDMachineArch=armv7
-__OpenBSDArch=arm
-__OpenBSDMachineArch=armv7
__IllumosArch=arm7
__HaikuArch=arm
__QEMUArch=arm
@@ -75,7 +72,7 @@ __AlpinePackages+=" krb5-dev"
__AlpinePackages+=" openssl-dev"
__AlpinePackages+=" zlib-dev"
-__FreeBSDBase="13.5-RELEASE"
+__FreeBSDBase="13.4-RELEASE"
__FreeBSDPkg="1.21.3"
__FreeBSDABI="13"
__FreeBSDPackages="libunwind"
@@ -85,12 +82,6 @@ __FreeBSDPackages+=" openssl"
__FreeBSDPackages+=" krb5"
__FreeBSDPackages+=" terminfo-db"
-__OpenBSDVersion="7.8"
-__OpenBSDPackages="heimdal-libs"
-__OpenBSDPackages+=" icu4c"
-__OpenBSDPackages+=" inotify-tools"
-__OpenBSDPackages+=" openssl"
-
__IllumosPackages="icu"
__IllumosPackages+=" mit-krb5"
__IllumosPackages+=" openssl"
@@ -169,8 +160,6 @@ while :; do
__QEMUArch=aarch64
__FreeBSDArch=arm64
__FreeBSDMachineArch=aarch64
- __OpenBSDArch=arm64
- __OpenBSDMachineArch=aarch64
;;
armel)
__BuildArch=armel
@@ -246,8 +235,6 @@ while :; do
__UbuntuArch=amd64
__FreeBSDArch=amd64
__FreeBSDMachineArch=amd64
- __OpenBSDArch=amd64
- __OpenBSDMachineArch=amd64
__illumosArch=x86_64
__HaikuArch=x86_64
__UbuntuRepo="http://archive.ubuntu.com/ubuntu/"
@@ -308,7 +295,9 @@ while :; do
;;
noble) # Ubuntu 24.04
__CodeName=noble
- __LLDB_Package="liblldb-19-dev"
+ if [[ -z "$__LLDB_Package" ]]; then
+ __LLDB_Package="liblldb-19-dev"
+ fi
;;
stretch) # Debian 9
__CodeName=stretch
@@ -394,14 +383,10 @@ while :; do
;;
freebsd14)
__CodeName=freebsd
- __FreeBSDBase="14.3-RELEASE"
+ __FreeBSDBase="14.2-RELEASE"
__FreeBSDABI="14"
__SkipUnmount=1
;;
- openbsd)
- __CodeName=openbsd
- __SkipUnmount=1
- ;;
illumos)
__CodeName=illumos
__SkipUnmount=1
@@ -610,62 +595,6 @@ elif [[ "$__CodeName" == "freebsd" ]]; then
INSTALL_AS_USER=$(whoami) "$__RootfsDir"/host/sbin/pkg -r "$__RootfsDir" -C "$__RootfsDir"/usr/local/etc/pkg.conf update
# shellcheck disable=SC2086
INSTALL_AS_USER=$(whoami) "$__RootfsDir"/host/sbin/pkg -r "$__RootfsDir" -C "$__RootfsDir"/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages
-elif [[ "$__CodeName" == "openbsd" ]]; then
- # determine mirrors
- OPENBSD_MIRROR="https://cdn.openbsd.org/pub/OpenBSD/$__OpenBSDVersion/$__OpenBSDMachineArch"
-
- # download base system sets
- ensureDownloadTool
-
- BASE_SETS=(base comp)
- for set in "${BASE_SETS[@]}"; do
- FILE="${set}${__OpenBSDVersion//./}.tgz"
- echo "Downloading $FILE..."
- if [[ "$__hasWget" == 1 ]]; then
- wget -O- "$OPENBSD_MIRROR/$FILE" | tar -C "$__RootfsDir" -xzpf -
- else
- curl -SL "$OPENBSD_MIRROR/$FILE" | tar -C "$__RootfsDir" -xzpf -
- fi
- done
-
- PKG_MIRROR="https://cdn.openbsd.org/pub/OpenBSD/${__OpenBSDVersion}/packages/${__OpenBSDMachineArch}"
-
- echo "Installing packages into sysroot..."
-
- # Fetch package index once
- if [[ "$__hasWget" == 1 ]]; then
- PKG_INDEX=$(wget -qO- "$PKG_MIRROR/")
- else
- PKG_INDEX=$(curl -s "$PKG_MIRROR/")
- fi
-
- for pkg in $__OpenBSDPackages; do
- PKG_FILE=$(echo "$PKG_INDEX" | grep -Po ">\K${pkg}-[0-9][^\" ]*\.tgz" \
- | sort -V | tail -n1)
-
- echo "Resolved package filename for $pkg: $PKG_FILE"
-
- [[ -z "$PKG_FILE" ]] && { echo "ERROR: Package $pkg not found"; exit 1; }
-
- if [[ "$__hasWget" == 1 ]]; then
- wget -O- "$PKG_MIRROR/$PKG_FILE" | tar -C "$__RootfsDir" -xzpf -
- else
- curl -SL "$PKG_MIRROR/$PKG_FILE" | tar -C "$__RootfsDir" -xzpf -
- fi
- done
-
- echo "Creating versionless symlinks for shared libraries..."
- # Find all versioned .so files and create the base .so symlink
- for lib in "$__RootfsDir/usr/lib/libc++.so."* "$__RootfsDir/usr/lib/libc++abi.so."* "$__RootfsDir/usr/lib/libpthread.so."*; do
- if [ -f "$lib" ]; then
- # Extract the filename (e.g., libc++.so.12.0)
- VERSIONED_NAME=$(basename "$lib")
- # Remove the trailing version numbers (e.g., libc++.so)
- BASE_NAME=${VERSIONED_NAME%.so.*}.so
- # Create the symlink in the same directory
- ln -sf "$VERSIONED_NAME" "$__RootfsDir/usr/lib/$BASE_NAME"
- fi
- done
elif [[ "$__CodeName" == "illumos" ]]; then
mkdir "$__RootfsDir/tmp"
pushd "$__RootfsDir/tmp"
diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake
index ff2dfdb4a5b..0ff85cf0367 100644
--- a/eng/common/cross/toolchain.cmake
+++ b/eng/common/cross/toolchain.cmake
@@ -3,22 +3,15 @@ set(CROSS_ROOTFS $ENV{ROOTFS_DIR})
# reset platform variables (e.g. cmake 3.25 sets LINUX=1)
unset(LINUX)
unset(FREEBSD)
-unset(OPENBSD)
unset(ILLUMOS)
unset(ANDROID)
unset(TIZEN)
unset(HAIKU)
set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH})
-
-file(GLOB OPENBSD_PROBE "${CROSS_ROOTFS}/etc/signify/openbsd-*.pub")
-
if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version)
set(CMAKE_SYSTEM_NAME FreeBSD)
set(FREEBSD 1)
-elseif(OPENBSD_PROBE)
- set(CMAKE_SYSTEM_NAME OpenBSD)
- set(OPENBSD 1)
elseif(EXISTS ${CROSS_ROOTFS}/usr/platform/i86pc)
set(CMAKE_SYSTEM_NAME SunOS)
set(ILLUMOS 1)
@@ -60,8 +53,6 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64")
endif()
elseif(FREEBSD)
set(triple "aarch64-unknown-freebsd12")
- elseif(OPENBSD)
- set(triple "aarch64-unknown-openbsd")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "armel")
set(CMAKE_SYSTEM_PROCESSOR armv7l)
@@ -118,8 +109,6 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64")
endif()
elseif(FREEBSD)
set(triple "x86_64-unknown-freebsd12")
- elseif(OPENBSD)
- set(triple "x86_64-unknown-openbsd")
elseif(ILLUMOS)
set(TOOLCHAIN "x86_64-illumos")
elseif(HAIKU)
@@ -204,7 +193,7 @@ if(ANDROID)
# include official NDK toolchain script
include(${CROSS_ROOTFS}/../build/cmake/android.toolchain.cmake)
-elseif(FREEBSD OR OPENBSD)
+elseif(FREEBSD)
# we cross-compile by instructing clang
set(CMAKE_C_COMPILER_TARGET ${triple})
set(CMAKE_CXX_COMPILER_TARGET ${triple})
@@ -302,7 +291,7 @@ endif()
# Specify compile options
-if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|loongarch64|ppc64le|riscv64|s390x|x64|x86)$" AND NOT ANDROID AND NOT FREEBSD AND NOT OPENBSD) OR ILLUMOS OR HAIKU)
+if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|loongarch64|ppc64le|riscv64|s390x|x64|x86)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU)
set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})
set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN})
set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN})
diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1
index a5be41db690..e3374310563 100644
--- a/eng/common/darc-init.ps1
+++ b/eng/common/darc-init.ps1
@@ -29,11 +29,11 @@ function InstallDarcCli ($darcVersion, $toolpath) {
Write-Host "Installing Darc CLI version $darcVersion..."
Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
if (-not $toolpath) {
- Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --source '$arcadeServicesSource' -v $verbosity -g"
- & "$dotnet" tool install $darcCliPackageName --version $darcVersion --source "$arcadeServicesSource" -v $verbosity -g
+ Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g"
+ & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g
}else {
- Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --source '$arcadeServicesSource' -v $verbosity --tool-path '$toolpath'"
- & "$dotnet" tool install $darcCliPackageName --version $darcVersion --source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
+ Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity --tool-path '$toolpath'"
+ & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
}
}
diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh
index b56d40e5706..e889f439b8d 100755
--- a/eng/common/darc-init.sh
+++ b/eng/common/darc-init.sh
@@ -5,7 +5,7 @@ darcVersion=''
versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20'
verbosity='minimal'
-while [[ $# -gt 0 ]]; do
+while [[ $# > 0 ]]; do
opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
--darcversion)
@@ -73,9 +73,9 @@ function InstallDarcCli {
echo "Installing Darc CLI version $darcVersion..."
echo "You may need to restart your command shell if this is the first dotnet tool you have installed."
if [ -z "$toolpath" ]; then
- echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --source "$arcadeServicesSource" -v $verbosity -g)
+ echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g)
else
- echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath")
+ echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath")
fi
}
diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh
index 61f302bb677..7b9d97e3bd4 100755
--- a/eng/common/dotnet-install.sh
+++ b/eng/common/dotnet-install.sh
@@ -18,7 +18,7 @@ architecture=''
runtime='dotnet'
runtimeSourceFeed=''
runtimeSourceFeedKey=''
-while [[ $# -gt 0 ]]; do
+while [[ $# > 0 ]]; do
opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
-version|-v)
diff --git a/eng/common/dotnet.sh b/eng/common/dotnet.sh
index f6d24871c1d..2ef68235675 100755
--- a/eng/common/dotnet.sh
+++ b/eng/common/dotnet.sh
@@ -19,7 +19,7 @@ source $scriptroot/tools.sh
InitializeDotNetCli true # install
# Invoke acquired SDK with args if they are provided
-if [[ $# -gt 0 ]]; then
+if [[ $# > 0 ]]; then
__dotnetDir=${_InitializeDotNetCli}
dotnetPath=${__dotnetDir}/dotnet
${dotnetPath} "$@"
diff --git a/eng/common/internal-feed-operations.sh b/eng/common/internal-feed-operations.sh
index 6299e7effd4..9378223ba09 100755
--- a/eng/common/internal-feed-operations.sh
+++ b/eng/common/internal-feed-operations.sh
@@ -100,7 +100,7 @@ operation=''
authToken=''
repoName=''
-while [[ $# -gt 0 ]]; do
+while [[ $# > 0 ]]; do
opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
--operation)
diff --git a/eng/common/native/init-distro-rid.sh b/eng/common/native/init-distro-rid.sh
index 8fc6d2fec78..83ea7aab0e0 100644
--- a/eng/common/native/init-distro-rid.sh
+++ b/eng/common/native/init-distro-rid.sh
@@ -39,8 +39,6 @@ getNonPortableDistroRid()
# $rootfsDir can be empty. freebsd-version is a shell script and should always work.
__freebsd_major_version=$("$rootfsDir"/bin/freebsd-version | cut -d'.' -f1)
nonPortableRid="freebsd.$__freebsd_major_version-${targetArch}"
- elif [ "$targetOs" = "openbsd" ]; then
- nonPortableRid="openbsd.$(uname -r)-${targetArch}"
elif command -v getprop >/dev/null && getprop ro.product.system.model | grep -qi android; then
__android_sdk_version=$(getprop ro.build.version.sdk)
nonPortableRid="android.$__android_sdk_version-${targetArch}"
diff --git a/eng/common/native/install-dependencies.sh b/eng/common/native/install-dependencies.sh
index 4742177a768..477a44f335b 100755
--- a/eng/common/native/install-dependencies.sh
+++ b/eng/common/native/install-dependencies.sh
@@ -24,16 +24,14 @@ case "$os" in
apt update
apt install -y build-essential gettext locales cmake llvm clang lld lldb liblldb-dev libunwind8-dev libicu-dev liblttng-ust-dev \
- libssl-dev libkrb5-dev pigz cpio ninja-build
+ libssl-dev libkrb5-dev pigz cpio
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
- elif [ "$ID" = "fedora" ] || [ "$ID" = "rhel" ] || [ "$ID" = "azurelinux" ] || [ "$ID" = "centos" ]; then
+ elif [ "$ID" = "fedora" ] || [ "$ID" = "rhel" ] || [ "$ID" = "azurelinux" ]; then
pkg_mgr="$(command -v tdnf 2>/dev/null || command -v dnf)"
- $pkg_mgr install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio ninja-build
- elif [ "$ID" = "amzn" ]; then
- dnf install -y cmake llvm lld lldb clang python libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio ninja-build
+ $pkg_mgr install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel pigz cpio
elif [ "$ID" = "alpine" ]; then
- apk add build-base cmake bash curl clang llvm llvm-dev lld lldb-dev krb5-dev lttng-ust-dev icu-dev openssl-dev pigz cpio ninja
+ apk add build-base cmake bash curl clang llvm-dev lld lldb krb5-dev lttng-ust-dev icu-dev openssl-dev pigz cpio
else
echo "Unsupported distro. distro: $ID"
exit 1
@@ -54,7 +52,6 @@ brew "openssl@3"
brew "pkgconf"
brew "python3"
brew "pigz"
-brew "ninja"
EOF
;;
diff --git a/eng/common/post-build/redact-logs.ps1 b/eng/common/post-build/redact-logs.ps1
index 672f4e2652e..472d5bb562c 100644
--- a/eng/common/post-build/redact-logs.ps1
+++ b/eng/common/post-build/redact-logs.ps1
@@ -9,8 +9,7 @@ param(
[Parameter(Mandatory=$false)][string] $TokensFilePath,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$TokensToRedact,
[Parameter(Mandatory=$false)][string] $runtimeSourceFeed,
- [Parameter(Mandatory=$false)][string] $runtimeSourceFeedKey
-)
+ [Parameter(Mandatory=$false)][string] $runtimeSourceFeedKey)
try {
$ErrorActionPreference = 'Stop'
@@ -49,8 +48,8 @@ try {
Write-Host "Installing Binlog redactor CLI..."
Write-Host "'$dotnet' new tool-manifest"
& "$dotnet" new tool-manifest
- Write-Host "'$dotnet' tool install $packageName --local --source '$PackageFeed' -v $verbosity --version $BinlogToolVersion"
- & "$dotnet" tool install $packageName --local --source "$PackageFeed" -v $verbosity --version $BinlogToolVersion
+ Write-Host "'$dotnet' tool install $packageName --local --add-source '$PackageFeed' -v $verbosity --version $BinlogToolVersion"
+ & "$dotnet" tool install $packageName --local --add-source "$PackageFeed" -v $verbosity --version $BinlogToolVersion
if (Test-Path $TokensFilePath) {
Write-Host "Adding additional sensitive data for redaction from file: " $TokensFilePath
diff --git a/eng/common/renovate.env b/eng/common/renovate.env
deleted file mode 100644
index 17ecc05d9b1..00000000000
--- a/eng/common/renovate.env
+++ /dev/null
@@ -1,42 +0,0 @@
-# Renovate Global Configuration
-# https://docs.renovatebot.com/self-hosted-configuration/
-#
-# NOTE: This file uses bash/shell format and is sourced via `. renovate.env`.
-# Values containing spaces or special characters must be quoted.
-
-# Author to use for git commits made by Renovate
-# https://docs.renovatebot.com/configuration-options/#gitauthor
-export RENOVATE_GIT_AUTHOR='.NET Renovate '
-
-# Disable rate limiting for PR creation (0 = unlimited)
-# https://docs.renovatebot.com/presets-default/#prhourlylimitnone
-# https://docs.renovatebot.com/presets-default/#prconcurrentlimitnone
-export RENOVATE_PR_HOURLY_LIMIT=0
-export RENOVATE_PR_CONCURRENT_LIMIT=0
-
-# Skip the onboarding PR that Renovate normally creates for new repos
-# https://docs.renovatebot.com/config-overview/#onboarding
-export RENOVATE_ONBOARDING=false
-
-# Any Renovate config file in the cloned repository is ignored. Only
-# the Renovate config file from the repo where the pipeline is running
-# is used (yes, those are the same repo but the sources may be different).
-# https://docs.renovatebot.com/self-hosted-configuration/#requireconfig
-export RENOVATE_REQUIRE_CONFIG=ignored
-
-# Customize the PR body content. This removes some of the default
-# sections that aren't relevant in a self-hosted config.
-# https://docs.renovatebot.com/configuration-options/#prheader
-# https://docs.renovatebot.com/configuration-options/#prbodynotes
-# https://docs.renovatebot.com/configuration-options/#prbodytemplate
-export RENOVATE_PR_HEADER='## Automated Dependency Update'
-export RENOVATE_PR_BODY_NOTES='["This PR has been created automatically by the [.NET Renovate Bot](https://github.com/dotnet/arcade/blob/main/Documentation/Renovate.md) to update one or more dependencies in your repo. Please review the changes and merge the PR if everything looks good."]'
-export RENOVATE_PR_BODY_TEMPLATE='{{{header}}}{{{table}}}{{{warnings}}}{{{notes}}}{{{changelogs}}}'
-
-# Extend the global config with additional presets
-# https://docs.renovatebot.com/self-hosted-configuration/#globalextends
-# Disable the Dependency Dashboard issue that tracks all updates
-export RENOVATE_GLOBAL_EXTENDS='[":disableDependencyDashboard"]'
-
-# Allow all commands for post-upgrade commands.
-export RENOVATE_ALLOWED_COMMANDS='[".*"]'
diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1
index 64fd2f8abec..b64b66a6275 100644
--- a/eng/common/sdk-task.ps1
+++ b/eng/common/sdk-task.ps1
@@ -66,7 +66,20 @@ try {
if( $msbuildEngine -eq "vs") {
# Ensure desktop MSBuild is available for sdk tasks.
- $global:_MSBuildExe = InitializeVisualStudioMSBuild
+ if( -not ($GlobalJson.tools.PSObject.Properties.Name -contains "vs" )) {
+ $GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty
+ }
+ if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) {
+ $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "18.0.0" -MemberType NoteProperty
+ }
+ if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") {
+ $xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true
+ }
+ if ($xcopyMSBuildToolsFolder -eq $null) {
+ throw 'Unable to get xcopy downloadable version of msbuild'
+ }
+
+ $global:_MSBuildExe = "$($xcopyMSBuildToolsFolder)\MSBuild\Current\Bin\MSBuild.exe"
}
$taskProject = GetSdkTaskProject $task
diff --git a/eng/common/sdl/NuGet.config b/eng/common/sdl/NuGet.config
new file mode 100644
index 00000000000..3849bdb3cf5
--- /dev/null
+++ b/eng/common/sdl/NuGet.config
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eng/common/sdl/configure-sdl-tool.ps1 b/eng/common/sdl/configure-sdl-tool.ps1
new file mode 100644
index 00000000000..27f5a4115fc
--- /dev/null
+++ b/eng/common/sdl/configure-sdl-tool.ps1
@@ -0,0 +1,130 @@
+Param(
+ [string] $GuardianCliLocation,
+ [string] $WorkingDirectory,
+ [string] $TargetDirectory,
+ [string] $GdnFolder,
+ # The list of Guardian tools to configure. For each object in the array:
+ # - If the item is a [hashtable], it must contain these entries:
+ # - Name = The tool name as Guardian knows it.
+ # - Scenario = (Optional) Scenario-specific name for this configuration entry. It must be unique
+ # among all tool entries with the same Name.
+ # - Args = (Optional) Array of Guardian tool configuration args, like '@("Target > C:\temp")'
+ # - If the item is a [string] $v, it is treated as '@{ Name="$v" }'
+ [object[]] $ToolsList,
+ [string] $GuardianLoggerLevel='Standard',
+ # Optional: Additional params to add to any tool using CredScan.
+ [string[]] $CrScanAdditionalRunConfigParams,
+ # Optional: Additional params to add to any tool using PoliCheck.
+ [string[]] $PoliCheckAdditionalRunConfigParams,
+ # Optional: Additional params to add to any tool using CodeQL/Semmle.
+ [string[]] $CodeQLAdditionalRunConfigParams,
+ # Optional: Additional params to add to any tool using Binskim.
+ [string[]] $BinskimAdditionalRunConfigParams
+)
+
+$ErrorActionPreference = 'Stop'
+Set-StrictMode -Version 2.0
+$disableConfigureToolsetImport = $true
+$global:LASTEXITCODE = 0
+
+try {
+ # `tools.ps1` checks $ci to perform some actions. Since the SDL
+ # scripts don't necessarily execute in the same agent that run the
+ # build.ps1/sh script this variable isn't automatically set.
+ $ci = $true
+ . $PSScriptRoot\..\tools.ps1
+
+ # Normalize tools list: all in [hashtable] form with defined values for each key.
+ $ToolsList = $ToolsList |
+ ForEach-Object {
+ if ($_ -is [string]) {
+ $_ = @{ Name = $_ }
+ }
+
+ if (-not ($_['Scenario'])) { $_.Scenario = "" }
+ if (-not ($_['Args'])) { $_.Args = @() }
+ $_
+ }
+
+ Write-Host "List of tools to configure:"
+ $ToolsList | ForEach-Object { $_ | Out-String | Write-Host }
+
+ # We store config files in the r directory of .gdn
+ $gdnConfigPath = Join-Path $GdnFolder 'r'
+ $ValidPath = Test-Path $GuardianCliLocation
+
+ if ($ValidPath -eq $False)
+ {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location."
+ ExitWithExitCode 1
+ }
+
+ foreach ($tool in $ToolsList) {
+ # Put together the name and scenario to make a unique key.
+ $toolConfigName = $tool.Name
+ if ($tool.Scenario) {
+ $toolConfigName += "_" + $tool.Scenario
+ }
+
+ Write-Host "=== Configuring $toolConfigName..."
+
+ $gdnConfigFile = Join-Path $gdnConfigPath "$toolConfigName-configure.gdnconfig"
+
+ # For some tools, add default and automatic args.
+ switch -Exact ($tool.Name) {
+ 'credscan' {
+ if ($targetDirectory) {
+ $tool.Args += "`"TargetDirectory < $TargetDirectory`""
+ }
+ $tool.Args += "`"OutputType < pre`""
+ $tool.Args += $CrScanAdditionalRunConfigParams
+ }
+ 'policheck' {
+ if ($targetDirectory) {
+ $tool.Args += "`"Target < $TargetDirectory`""
+ }
+ $tool.Args += $PoliCheckAdditionalRunConfigParams
+ }
+ {$_ -in 'semmle', 'codeql'} {
+ if ($targetDirectory) {
+ $tool.Args += "`"SourceCodeDirectory < $TargetDirectory`""
+ }
+ $tool.Args += $CodeQLAdditionalRunConfigParams
+ }
+ 'binskim' {
+ if ($targetDirectory) {
+ # Binskim crashes due to specific PDBs. GitHub issue: https://github.com/microsoft/binskim/issues/924.
+ # We are excluding all `_.pdb` files from the scan.
+ $tool.Args += "`"Target < $TargetDirectory\**;-:file|$TargetDirectory\**\_.pdb`""
+ }
+ $tool.Args += $BinskimAdditionalRunConfigParams
+ }
+ }
+
+ # Create variable pointing to the args array directly so we can use splat syntax later.
+ $toolArgs = $tool.Args
+
+ # Configure the tool. If args array is provided or the current tool has some default arguments
+ # defined, add "--args" and splat each element on the end. Arg format is "{Arg id} < {Value}",
+ # one per parameter. Doc page for "guardian configure":
+ # https://dev.azure.com/securitytools/SecurityIntegration/_wiki/wikis/Guardian/1395/configure
+ Exec-BlockVerbosely {
+ & $GuardianCliLocation configure `
+ --working-directory $WorkingDirectory `
+ --tool $tool.Name `
+ --output-path $gdnConfigFile `
+ --logger-level $GuardianLoggerLevel `
+ --noninteractive `
+ --force `
+ $(if ($toolArgs) { "--args" }) @toolArgs
+ Exit-IfNZEC "Sdl"
+ }
+
+ Write-Host "Created '$toolConfigName' configuration file: $gdnConfigFile"
+ }
+}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+}
diff --git a/eng/common/sdl/execute-all-sdl-tools.ps1 b/eng/common/sdl/execute-all-sdl-tools.ps1
new file mode 100644
index 00000000000..4715d75e974
--- /dev/null
+++ b/eng/common/sdl/execute-all-sdl-tools.ps1
@@ -0,0 +1,167 @@
+Param(
+ [string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified)
+ [string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified)
+ [string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified
+ [string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade)
+ [string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master
+ [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located
+ [string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located
+ [string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault
+
+ # Optional: list of SDL tools to run on source code. See 'configure-sdl-tool.ps1' for tools list
+ # format.
+ [object[]] $SourceToolsList,
+ # Optional: list of SDL tools to run on built artifacts. See 'configure-sdl-tool.ps1' for tools
+ # list format.
+ [object[]] $ArtifactToolsList,
+ # Optional: list of SDL tools to run without automatically specifying a target directory. See
+ # 'configure-sdl-tool.ps1' for tools list format.
+ [object[]] $CustomToolsList,
+
+ [bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs.
+ [string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber)
+ [bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed
+ [bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
+ [string] $GuardianLoggerLevel='Standard', # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error
+ [string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1")
+ [string[]] $PoliCheckAdditionalRunConfigParams, # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1")
+ [string[]] $CodeQLAdditionalRunConfigParams, # Optional: Additional Params to custom build a Semmle/CodeQL run config in the format @("xyz < abc","sdf < 1")
+ [string[]] $BinskimAdditionalRunConfigParams, # Optional: Additional Params to custom build a Binskim run config in the format @("xyz < abc","sdf < 1")
+ [bool] $BreakOnFailure=$False # Optional: Fail the build if there were errors during the run
+)
+
+try {
+ $ErrorActionPreference = 'Stop'
+ Set-StrictMode -Version 2.0
+ $disableConfigureToolsetImport = $true
+ $global:LASTEXITCODE = 0
+
+ # `tools.ps1` checks $ci to perform some actions. Since the SDL
+ # scripts don't necessarily execute in the same agent that run the
+ # build.ps1/sh script this variable isn't automatically set.
+ $ci = $true
+ . $PSScriptRoot\..\tools.ps1
+
+ #Replace repo names to the format of org/repo
+ if (!($Repository.contains('/'))) {
+ $RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2';
+ }
+ else{
+ $RepoName = $Repository;
+ }
+
+ if ($GuardianPackageName) {
+ $guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path 'tools' 'guardian.cmd'))
+ } else {
+ $guardianCliLocation = $GuardianCliLocation
+ }
+
+ $workingDirectory = (Split-Path $SourceDirectory -Parent)
+ $ValidPath = Test-Path $guardianCliLocation
+
+ if ($ValidPath -eq $False)
+ {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Invalid Guardian CLI Location.'
+ ExitWithExitCode 1
+ }
+
+ Exec-BlockVerbosely {
+ & $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
+ }
+ $gdnFolder = Join-Path $workingDirectory '.gdn'
+
+ if ($TsaOnboard) {
+ if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) {
+ Exec-BlockVerbosely {
+ & $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
+ }
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ } else {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not onboard to TSA -- not all required values ($TsaCodebaseName, $TsaNotificationEmail, $TsaCodebaseAdmin, $TsaBugAreaPath) were specified.'
+ ExitWithExitCode 1
+ }
+ }
+
+ # Configure a list of tools with a default target directory. Populates the ".gdn/r" directory.
+ function Configure-ToolsList([object[]] $tools, [string] $targetDirectory) {
+ if ($tools -and $tools.Count -gt 0) {
+ Exec-BlockVerbosely {
+ & $(Join-Path $PSScriptRoot 'configure-sdl-tool.ps1') `
+ -GuardianCliLocation $guardianCliLocation `
+ -WorkingDirectory $workingDirectory `
+ -TargetDirectory $targetDirectory `
+ -GdnFolder $gdnFolder `
+ -ToolsList $tools `
+ -AzureDevOpsAccessToken $AzureDevOpsAccessToken `
+ -GuardianLoggerLevel $GuardianLoggerLevel `
+ -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams `
+ -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams `
+ -CodeQLAdditionalRunConfigParams $CodeQLAdditionalRunConfigParams `
+ -BinskimAdditionalRunConfigParams $BinskimAdditionalRunConfigParams
+ if ($BreakOnFailure) {
+ Exit-IfNZEC "Sdl"
+ }
+ }
+ }
+ }
+
+ # Configure Artifact and Source tools with default Target directories.
+ Configure-ToolsList $ArtifactToolsList $ArtifactsDirectory
+ Configure-ToolsList $SourceToolsList $SourceDirectory
+ # Configure custom tools with no default Target directory.
+ Configure-ToolsList $CustomToolsList $null
+
+ # At this point, all tools are configured in the ".gdn" directory. Run them all in a single call.
+ # (If we used "run" multiple times, each run would overwrite data from earlier runs.)
+ Exec-BlockVerbosely {
+ & $(Join-Path $PSScriptRoot 'run-sdl.ps1') `
+ -GuardianCliLocation $guardianCliLocation `
+ -WorkingDirectory $SourceDirectory `
+ -UpdateBaseline $UpdateBaseline `
+ -GdnFolder $gdnFolder
+ }
+
+ if ($TsaPublish) {
+ if ($TsaBranchName -and $BuildNumber) {
+ if (-not $TsaRepositoryName) {
+ $TsaRepositoryName = "$($Repository)-$($BranchName)"
+ }
+ Exec-BlockVerbosely {
+ & $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
+ }
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ } else {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not publish to TSA -- not all required values ($TsaBranchName, $BuildNumber) were specified.'
+ ExitWithExitCode 1
+ }
+ }
+
+ if ($BreakOnFailure) {
+ Write-Host "Failing the build in case of breaking results..."
+ Exec-BlockVerbosely {
+ & $guardianCliLocation break --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
+ }
+ } else {
+ Write-Host "Letting the build pass even if there were breaking results..."
+ }
+}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
+ exit 1
+}
diff --git a/eng/common/sdl/extract-artifact-archives.ps1 b/eng/common/sdl/extract-artifact-archives.ps1
new file mode 100644
index 00000000000..68da4fbf257
--- /dev/null
+++ b/eng/common/sdl/extract-artifact-archives.ps1
@@ -0,0 +1,63 @@
+# This script looks for each archive file in a directory and extracts it into the target directory.
+# For example, the file "$InputPath/bin.tar.gz" extracts to "$ExtractPath/bin.tar.gz.extracted/**".
+# Uses the "tar" utility added to Windows 10 / Windows 2019 that supports tar.gz and zip.
+param(
+ # Full path to directory where archives are stored.
+ [Parameter(Mandatory=$true)][string] $InputPath,
+ # Full path to directory to extract archives into. May be the same as $InputPath.
+ [Parameter(Mandatory=$true)][string] $ExtractPath
+)
+
+$ErrorActionPreference = 'Stop'
+Set-StrictMode -Version 2.0
+
+$disableConfigureToolsetImport = $true
+
+try {
+ # `tools.ps1` checks $ci to perform some actions. Since the SDL
+ # scripts don't necessarily execute in the same agent that run the
+ # build.ps1/sh script this variable isn't automatically set.
+ $ci = $true
+ . $PSScriptRoot\..\tools.ps1
+
+ Measure-Command {
+ $jobs = @()
+
+ # Find archive files for non-Windows and Windows builds.
+ $archiveFiles = @(
+ Get-ChildItem (Join-Path $InputPath "*.tar.gz")
+ Get-ChildItem (Join-Path $InputPath "*.zip")
+ )
+
+ foreach ($targzFile in $archiveFiles) {
+ $jobs += Start-Job -ScriptBlock {
+ $file = $using:targzFile
+ $fileName = [System.IO.Path]::GetFileName($file)
+ $extractDir = Join-Path $using:ExtractPath "$fileName.extracted"
+
+ New-Item $extractDir -ItemType Directory -Force | Out-Null
+
+ Write-Host "Extracting '$file' to '$extractDir'..."
+
+ # Pipe errors to stdout to prevent PowerShell detecting them and quitting the job early.
+ # This type of quit skips the catch, so we wouldn't be able to tell which file triggered the
+ # error. Save output so it can be stored in the exception string along with context.
+ $output = tar -xf $file -C $extractDir 2>&1
+ # Handle NZEC manually rather than using Exit-IfNZEC: we are in a background job, so we
+ # don't have access to the outer scope.
+ if ($LASTEXITCODE -ne 0) {
+ throw "Error extracting '$file': non-zero exit code ($LASTEXITCODE). Output: '$output'"
+ }
+
+ Write-Host "Extracted to $extractDir"
+ }
+ }
+
+ Receive-Job $jobs -Wait
+ }
+}
+catch {
+ Write-Host $_
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+}
diff --git a/eng/common/sdl/extract-artifact-packages.ps1 b/eng/common/sdl/extract-artifact-packages.ps1
new file mode 100644
index 00000000000..f031ed5b25e
--- /dev/null
+++ b/eng/common/sdl/extract-artifact-packages.ps1
@@ -0,0 +1,82 @@
+param(
+ [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where artifact packages are stored
+ [Parameter(Mandatory=$true)][string] $ExtractPath # Full path to directory where the packages will be extracted
+)
+
+$ErrorActionPreference = 'Stop'
+Set-StrictMode -Version 2.0
+
+$disableConfigureToolsetImport = $true
+
+function ExtractArtifacts {
+ if (!(Test-Path $InputPath)) {
+ Write-Host "Input Path does not exist: $InputPath"
+ ExitWithExitCode 0
+ }
+ $Jobs = @()
+ Get-ChildItem "$InputPath\*.nupkg" |
+ ForEach-Object {
+ $Jobs += Start-Job -ScriptBlock $ExtractPackage -ArgumentList $_.FullName
+ }
+
+ foreach ($Job in $Jobs) {
+ Wait-Job -Id $Job.Id | Receive-Job
+ }
+}
+
+try {
+ # `tools.ps1` checks $ci to perform some actions. Since the SDL
+ # scripts don't necessarily execute in the same agent that run the
+ # build.ps1/sh script this variable isn't automatically set.
+ $ci = $true
+ . $PSScriptRoot\..\tools.ps1
+
+ $ExtractPackage = {
+ param(
+ [string] $PackagePath # Full path to a NuGet package
+ )
+
+ if (!(Test-Path $PackagePath)) {
+ Write-PipelineTelemetryError -Category 'Build' -Message "Input file does not exist: $PackagePath"
+ ExitWithExitCode 1
+ }
+
+ $RelevantExtensions = @('.dll', '.exe', '.pdb')
+ Write-Host -NoNewLine 'Extracting ' ([System.IO.Path]::GetFileName($PackagePath)) '...'
+
+ $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
+ $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
+
+ Add-Type -AssemblyName System.IO.Compression.FileSystem
+
+ [System.IO.Directory]::CreateDirectory($ExtractPath);
+
+ try {
+ $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
+
+ $zip.Entries |
+ Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
+ ForEach-Object {
+ $TargetPath = Join-Path -Path $ExtractPath -ChildPath (Split-Path -Path $_.FullName)
+ [System.IO.Directory]::CreateDirectory($TargetPath);
+
+ $TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.FullName
+ [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile)
+ }
+ }
+ catch {
+ Write-Host $_
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+ }
+ finally {
+ $zip.Dispose()
+ }
+ }
+ Measure-Command { ExtractArtifacts }
+}
+catch {
+ Write-Host $_
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+}
diff --git a/eng/common/sdl/init-sdl.ps1 b/eng/common/sdl/init-sdl.ps1
new file mode 100644
index 00000000000..3ac1d92b370
--- /dev/null
+++ b/eng/common/sdl/init-sdl.ps1
@@ -0,0 +1,55 @@
+Param(
+ [string] $GuardianCliLocation,
+ [string] $Repository,
+ [string] $BranchName='master',
+ [string] $WorkingDirectory,
+ [string] $AzureDevOpsAccessToken,
+ [string] $GuardianLoggerLevel='Standard'
+)
+
+$ErrorActionPreference = 'Stop'
+Set-StrictMode -Version 2.0
+$disableConfigureToolsetImport = $true
+$global:LASTEXITCODE = 0
+
+# `tools.ps1` checks $ci to perform some actions. Since the SDL
+# scripts don't necessarily execute in the same agent that run the
+# build.ps1/sh script this variable isn't automatically set.
+$ci = $true
+. $PSScriptRoot\..\tools.ps1
+
+# Don't display the console progress UI - it's a huge perf hit
+$ProgressPreference = 'SilentlyContinue'
+
+# Construct basic auth from AzDO access token; construct URI to the repository's gdn folder stored in that repository; construct location of zip file
+$encodedPat = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$AzureDevOpsAccessToken"))
+$escapedRepository = [Uri]::EscapeDataString("/$Repository/$BranchName/.gdn")
+$uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cfg/Items?path=$escapedRepository&versionDescriptor[versionOptions]=0&`$format=zip&api-version=5.0"
+$zipFile = "$WorkingDirectory/gdn.zip"
+
+Add-Type -AssemblyName System.IO.Compression.FileSystem
+$gdnFolder = (Join-Path $WorkingDirectory '.gdn')
+
+try {
+ # if the folder does not exist, we'll do a guardian init and push it to the remote repository
+ Write-Host 'Initializing Guardian...'
+ Write-Host "$GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel"
+ & $GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian init failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ # We create the mainbaseline so it can be edited later
+ Write-Host "$GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline"
+ & $GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian baseline failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ ExitWithExitCode 0
+}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+}
diff --git a/eng/common/sdl/packages.config b/eng/common/sdl/packages.config
new file mode 100644
index 00000000000..e5f543ea68c
--- /dev/null
+++ b/eng/common/sdl/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/eng/common/sdl/run-sdl.ps1 b/eng/common/sdl/run-sdl.ps1
new file mode 100644
index 00000000000..2eac8c78f10
--- /dev/null
+++ b/eng/common/sdl/run-sdl.ps1
@@ -0,0 +1,49 @@
+Param(
+ [string] $GuardianCliLocation,
+ [string] $WorkingDirectory,
+ [string] $GdnFolder,
+ [string] $UpdateBaseline,
+ [string] $GuardianLoggerLevel='Standard'
+)
+
+$ErrorActionPreference = 'Stop'
+Set-StrictMode -Version 2.0
+$disableConfigureToolsetImport = $true
+$global:LASTEXITCODE = 0
+
+try {
+ # `tools.ps1` checks $ci to perform some actions. Since the SDL
+ # scripts don't necessarily execute in the same agent that run the
+ # build.ps1/sh script this variable isn't automatically set.
+ $ci = $true
+ . $PSScriptRoot\..\tools.ps1
+
+ # We store config files in the r directory of .gdn
+ $gdnConfigPath = Join-Path $GdnFolder 'r'
+ $ValidPath = Test-Path $GuardianCliLocation
+
+ if ($ValidPath -eq $False)
+ {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location."
+ ExitWithExitCode 1
+ }
+
+ $gdnConfigFiles = Get-ChildItem $gdnConfigPath -Recurse -Include '*.gdnconfig'
+ Write-Host "Discovered Guardian config files:"
+ $gdnConfigFiles | Out-String | Write-Host
+
+ Exec-BlockVerbosely {
+ & $GuardianCliLocation run `
+ --working-directory $WorkingDirectory `
+ --baseline mainbaseline `
+ --update-baseline $UpdateBaseline `
+ --logger-level $GuardianLoggerLevel `
+ --config @gdnConfigFiles
+ Exit-IfNZEC "Sdl"
+ }
+}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+}
diff --git a/eng/common/sdl/sdl.ps1 b/eng/common/sdl/sdl.ps1
new file mode 100644
index 00000000000..648c5068d7d
--- /dev/null
+++ b/eng/common/sdl/sdl.ps1
@@ -0,0 +1,38 @@
+
+function Install-Gdn {
+ param(
+ [Parameter(Mandatory=$true)]
+ [string]$Path,
+
+ # If omitted, install the latest version of Guardian, otherwise install that specific version.
+ [string]$Version
+ )
+
+ $ErrorActionPreference = 'Stop'
+ Set-StrictMode -Version 2.0
+ $disableConfigureToolsetImport = $true
+ $global:LASTEXITCODE = 0
+
+ # `tools.ps1` checks $ci to perform some actions. Since the SDL
+ # scripts don't necessarily execute in the same agent that run the
+ # build.ps1/sh script this variable isn't automatically set.
+ $ci = $true
+ . $PSScriptRoot\..\tools.ps1
+
+ $argumentList = @("install", "Microsoft.Guardian.Cli", "-Source https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json", "-OutputDirectory $Path", "-NonInteractive", "-NoCache")
+
+ if ($Version) {
+ $argumentList += "-Version $Version"
+ }
+
+ Start-Process nuget -Verbose -ArgumentList $argumentList -NoNewWindow -Wait
+
+ $gdnCliPath = Get-ChildItem -Filter guardian.cmd -Recurse -Path $Path
+
+ if (!$gdnCliPath)
+ {
+ Write-PipelineTelemetryError -Category 'Sdl' -Message 'Failure installing Guardian'
+ }
+
+ return $gdnCliPath.FullName
+}
\ No newline at end of file
diff --git a/eng/common/sdl/trim-assets-version.ps1 b/eng/common/sdl/trim-assets-version.ps1
new file mode 100644
index 00000000000..0daa2a9e946
--- /dev/null
+++ b/eng/common/sdl/trim-assets-version.ps1
@@ -0,0 +1,75 @@
+<#
+.SYNOPSIS
+Install and run the 'Microsoft.DotNet.VersionTools.Cli' tool with the 'trim-artifacts-version' command to trim the version from the NuGet assets file name.
+
+.PARAMETER InputPath
+Full path to directory where artifact packages are stored
+
+.PARAMETER Recursive
+Search for NuGet packages recursively
+
+#>
+
+Param(
+ [string] $InputPath,
+ [bool] $Recursive = $true
+)
+
+$CliToolName = "Microsoft.DotNet.VersionTools.Cli"
+
+function Install-VersionTools-Cli {
+ param(
+ [Parameter(Mandatory=$true)][string]$Version
+ )
+
+ Write-Host "Installing the package '$CliToolName' with a version of '$version' ..."
+ $feed = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json"
+
+ $argumentList = @("tool", "install", "--local", "$CliToolName", "--add-source $feed", "--no-cache", "--version $Version", "--create-manifest-if-needed")
+ Start-Process "$dotnet" -Verbose -ArgumentList $argumentList -NoNewWindow -Wait
+}
+
+# -------------------------------------------------------------------
+
+if (!(Test-Path $InputPath)) {
+ Write-Host "Input Path '$InputPath' does not exist"
+ ExitWithExitCode 1
+}
+
+$ErrorActionPreference = 'Stop'
+Set-StrictMode -Version 2.0
+
+$disableConfigureToolsetImport = $true
+$global:LASTEXITCODE = 0
+
+# `tools.ps1` checks $ci to perform some actions. Since the SDL
+# scripts don't necessarily execute in the same agent that run the
+# build.ps1/sh script this variable isn't automatically set.
+$ci = $true
+. $PSScriptRoot\..\tools.ps1
+
+try {
+ $dotnetRoot = InitializeDotNetCli -install:$true
+ $dotnet = "$dotnetRoot\dotnet.exe"
+
+ $toolsetVersion = Read-ArcadeSdkVersion
+ Install-VersionTools-Cli -Version $toolsetVersion
+
+ $cliToolFound = (& "$dotnet" tool list --local | Where-Object {$_.Split(' ')[0] -eq $CliToolName})
+ if ($null -eq $cliToolFound) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "The '$CliToolName' tool is not installed."
+ ExitWithExitCode 1
+ }
+
+ Exec-BlockVerbosely {
+ & "$dotnet" $CliToolName trim-assets-version `
+ --assets-path $InputPath `
+ --recursive $Recursive
+ Exit-IfNZEC "Sdl"
+ }
+}
+catch {
+ Write-Host $_
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+}
diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md
index f772aa3d78f..e2b07a865f1 100644
--- a/eng/common/template-guidance.md
+++ b/eng/common/template-guidance.md
@@ -71,6 +71,7 @@ eng\common\
source-build.yml (shim)
source-index-stage1.yml (shim)
jobs\
+ codeql-build.yml (shim)
jobs.yml (shim)
source-build.yml (shim)
post-build\
@@ -87,6 +88,7 @@ eng\common\
source-build.yml (shim)
variables\
pool-providers.yml (logic + redirect) # templates/variables/pool-providers.yml will redirect to templates-official/variables/pool-providers.yml if you are running in the internal project
+ sdl-variables.yml (logic)
core-templates\
job\
job.yml (logic)
@@ -95,6 +97,7 @@ eng\common\
source-build.yml (logic)
source-index-stage1.yml (logic)
jobs\
+ codeql-build.yml (logic)
jobs.yml (logic)
source-build.yml (logic)
post-build\
diff --git a/eng/common/templates-official/jobs/codeql-build.yml b/eng/common/templates-official/jobs/codeql-build.yml
new file mode 100644
index 00000000000..a726322ecfe
--- /dev/null
+++ b/eng/common/templates-official/jobs/codeql-build.yml
@@ -0,0 +1,7 @@
+jobs:
+- template: /eng/common/core-templates/jobs/codeql-build.yml
+ parameters:
+ is1ESPipeline: true
+
+ ${{ each parameter in parameters }}:
+ ${{ parameter.key }}: ${{ parameter.value }}
diff --git a/eng/common/templates-official/variables/sdl-variables.yml b/eng/common/templates-official/variables/sdl-variables.yml
new file mode 100644
index 00000000000..f1311bbb1b3
--- /dev/null
+++ b/eng/common/templates-official/variables/sdl-variables.yml
@@ -0,0 +1,7 @@
+variables:
+# The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in
+# sync with the packages.config file.
+- name: DefaultGuardianVersion
+ value: 0.109.0
+- name: GuardianPackagesConfigFile
+ value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config
\ No newline at end of file
diff --git a/eng/common/templates/jobs/codeql-build.yml b/eng/common/templates/jobs/codeql-build.yml
new file mode 100644
index 00000000000..517f24d6a52
--- /dev/null
+++ b/eng/common/templates/jobs/codeql-build.yml
@@ -0,0 +1,7 @@
+jobs:
+- template: /eng/common/core-templates/jobs/codeql-build.yml
+ parameters:
+ is1ESPipeline: false
+
+ ${{ each parameter in parameters }}:
+ ${{ parameter.key }}: ${{ parameter.value }}
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index b6787991769..977a2d4b103 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -34,9 +34,6 @@
# Configures warning treatment in msbuild.
[bool]$warnAsError = if (Test-Path variable:warnAsError) { $warnAsError } else { $true }
-# Specifies semi-colon delimited list of warning codes that should not be treated as errors.
-[string]$warnNotAsError = if (Test-Path variable:warnNotAsError) { $warnNotAsError } else { '' }
-
# Specifies which msbuild engine to use for build: 'vs', 'dotnet' or unspecified (determined based on presence of tools.vs in global.json).
[string]$msbuildEngine = if (Test-Path variable:msbuildEngine) { $msbuildEngine } else { $null }
@@ -160,6 +157,9 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
return $global:_DotNetInstallDir
}
+ # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism
+ $env:DOTNET_MULTILEVEL_LOOKUP=0
+
# Disable first run since we do not need all ASP.NET packages restored.
$env:DOTNET_NOLOGO=1
@@ -225,6 +225,7 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
# Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build
Write-PipelinePrependPath -Path $dotnetRoot
+ Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
Write-PipelineSetVariable -Name 'DOTNET_NOLOGO' -Value '1'
return $global:_DotNetInstallDir = $dotnetRoot
@@ -298,8 +299,6 @@ function InstallDotNet([string] $dotnetRoot,
$dotnetVersionLabel = "'sdk v$version'"
- # For performance this check is duplicated in src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs
- # if you are making changes here, consider if you need to make changes there as well.
if ($runtime -ne '' -and $runtime -ne 'sdk') {
$runtimePath = $dotnetRoot
$runtimePath = $runtimePath + "\shared"
@@ -375,11 +374,12 @@ function InstallDotNet([string] $dotnetRoot,
#
# 1. MSBuild from an active VS command prompt
# 2. MSBuild from a compatible VS installation
+# 3. MSBuild from the xcopy tool package
#
# Returns full path to msbuild.exe.
# Throws on failure.
#
-function InitializeVisualStudioMSBuild([object]$vsRequirements = $null) {
+function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = $null) {
if (-not (IsWindowsPlatform)) {
throw "Cannot initialize Visual Studio on non-Windows"
}
@@ -389,7 +389,13 @@ function InitializeVisualStudioMSBuild([object]$vsRequirements = $null) {
}
# Minimum VS version to require.
- $vsMinVersionReqdStr = '18.0'
+ $vsMinVersionReqdStr = '17.7'
+ $vsMinVersionReqd = [Version]::new($vsMinVersionReqdStr)
+
+ # If the version of msbuild is going to be xcopied,
+ # use this version. Version matches a package here:
+ # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/18.0.0
+ $defaultXCopyMSBuildVersion = '18.0.0'
if (!$vsRequirements) {
if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {
@@ -419,16 +425,46 @@ function InitializeVisualStudioMSBuild([object]$vsRequirements = $null) {
}
}
- # Locate Visual Studio installation.
+ # Locate Visual Studio installation or download x-copy msbuild.
$vsInfo = LocateVisualStudio $vsRequirements
- if ($vsInfo -ne $null) {
+ if ($vsInfo -ne $null -and $env:ForceUseXCopyMSBuild -eq $null) {
# Ensure vsInstallDir has a trailing slash
$vsInstallDir = Join-Path $vsInfo.installationPath "\"
$vsMajorVersion = $vsInfo.installationVersion.Split('.')[0]
InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion
} else {
- throw 'Unable to find Visual Studio that has required version and components installed'
+ if (Get-Member -InputObject $GlobalJson.tools -Name 'xcopy-msbuild') {
+ $xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild'
+ $vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0]
+ } else {
+ #if vs version provided in global.json is incompatible (too low) then use the default version for xcopy msbuild download
+ if($vsMinVersion -lt $vsMinVersionReqd){
+ Write-Host "Using xcopy-msbuild version of $defaultXCopyMSBuildVersion since VS version $vsMinVersionStr provided in global.json is not compatible"
+ $xcopyMSBuildVersion = $defaultXCopyMSBuildVersion
+ $vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0]
+ }
+ else{
+ # If the VS version IS compatible, look for an xcopy msbuild package
+ # with a version matching VS.
+ # Note: If this version does not exist, then an explicit version of xcopy msbuild
+ # can be specified in global.json. This will be required for pre-release versions of msbuild.
+ $vsMajorVersion = $vsMinVersion.Major
+ $vsMinorVersion = $vsMinVersion.Minor
+ $xcopyMSBuildVersion = "$vsMajorVersion.$vsMinorVersion.0"
+ }
+ }
+
+ $vsInstallDir = $null
+ if ($xcopyMSBuildVersion.Trim() -ine "none") {
+ $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
+ if ($vsInstallDir -eq $null) {
+ throw "Could not xcopy msbuild. Please check that package 'Microsoft.DotNet.Arcade.MSBuild.Xcopy @ $xcopyMSBuildVersion' exists on feed 'dotnet-eng'."
+ }
+ }
+ if ($vsInstallDir -eq $null) {
+ throw 'Unable to find Visual Studio that has required version and components installed'
+ }
}
$msbuildVersionDir = if ([int]$vsMajorVersion -lt 16) { "$vsMajorVersion.0" } else { "Current" }
@@ -455,6 +491,38 @@ function InitializeVisualStudioEnvironmentVariables([string] $vsInstallDir, [str
}
}
+function InstallXCopyMSBuild([string]$packageVersion) {
+ return InitializeXCopyMSBuild $packageVersion -install $true
+}
+
+function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
+ $packageName = 'Microsoft.DotNet.Arcade.MSBuild.Xcopy'
+ $packageDir = Join-Path $ToolsDir "msbuild\$packageVersion"
+ $packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg"
+
+ if (!(Test-Path $packageDir)) {
+ if (!$install) {
+ return $null
+ }
+
+ Create-Directory $packageDir
+
+ Write-Host "Downloading $packageName $packageVersion"
+ $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
+ Retry({
+ Invoke-WebRequest "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/flat2/$packageName/$packageVersion/$packageName.$packageVersion.nupkg" -UseBasicParsing -OutFile $packagePath
+ })
+
+ if (!(Test-Path $packagePath)) {
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "See https://dev.azure.com/dnceng/internal/_wiki/wikis/DNCEng%20Services%20Wiki/1074/Updating-Microsoft.DotNet.Arcade.MSBuild.Xcopy-WAS-RoslynTools.MSBuild-(xcopy-msbuild)-generation?anchor=troubleshooting for help troubleshooting issues with XCopy MSBuild"
+ throw
+ }
+ Unzip $packagePath $packageDir
+ }
+
+ return Join-Path $packageDir 'tools'
+}
+
#
# Locates Visual Studio instance that meets the minimal requirements specified by tools.vs object in global.json.
#
@@ -524,11 +592,6 @@ function LocateVisualStudio([object]$vsRequirements = $null){
return $null
}
- if ($null -eq $vsInfo -or $vsInfo.Count -eq 0) {
- throw "No instance of Visual Studio meeting the requirements specified was found. Requirements: $($args -join ' ')"
- return $null
- }
-
# use first matching instance
return $vsInfo[0]
}
@@ -564,7 +627,7 @@ function InitializeBuildTool() {
$buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net' }
} elseif ($msbuildEngine -eq "vs") {
try {
- $msbuildPath = InitializeVisualStudioMSBuild
+ $msbuildPath = InitializeVisualStudioMSBuild -install:$restore
} catch {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
ExitWithExitCode 1
@@ -773,10 +836,6 @@ function MSBuild-Core() {
$cmdArgs += ' /p:TreatWarningsAsErrors=false'
}
- if ($warnNotAsError) {
- $cmdArgs += " /warnnotaserror:$warnNotAsError /p:AdditionalWarningsNotAsErrors=$warnNotAsError"
- }
-
foreach ($arg in $args) {
if ($null -ne $arg -and $arg.Trim() -ne "") {
if ($arg.EndsWith('\')) {
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index a6e0ed594fd..1b296f646c2 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -52,9 +52,6 @@ fi
# Configures warning treatment in msbuild.
warn_as_error=${warn_as_error:-true}
-# Specifies semi-colon delimited list of warning codes that should not be treated as errors.
-warn_not_as_error=${warn_not_as_error:-''}
-
# True to attempt using .NET Core already that meets requirements specified in global.json
# installed on the machine instead of downloading one.
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
@@ -118,6 +115,9 @@ function InitializeDotNetCli {
local install=$1
+ # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism
+ export DOTNET_MULTILEVEL_LOOKUP=0
+
# Disable first run since we want to control all package sources
export DOTNET_NOLOGO=1
@@ -166,6 +166,7 @@ function InitializeDotNetCli {
# build steps from using anything other than what we've downloaded.
Write-PipelinePrependPath -path "$dotnet_root"
+ Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0"
Write-PipelineSetVariable -name "DOTNET_NOLOGO" -value "1"
# return value
@@ -187,8 +188,6 @@ function InstallDotNet {
local version=$2
local runtime=$4
- # For performance this check is duplicated in src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs
- # if you are making changes here, consider if you need to make changes there as well.
local dotnetVersionLabel="'$runtime v$version'"
if [[ -n "${4:-}" ]] && [ "$4" != 'sdk' ]; then
runtimePath="$root"
@@ -533,12 +532,7 @@ function MSBuild-Core {
mt_switch="-mt"
fi
- local warnnotaserror_switch=""
- if [[ -n "$warn_not_as_error" ]]; then
- warnnotaserror_switch="/warnnotaserror:$warn_not_as_error /p:AdditionalWarningsNotAsErrors=$warn_not_as_error"
- fi
-
- RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch $warnnotaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@"
+ RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@"
}
function GetDarc {
diff --git a/eng/renovate.json b/eng/renovate.json
deleted file mode 100644
index a1129866d81..00000000000
--- a/eng/renovate.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "$schema": "https://docs.renovatebot.com/renovate-schema.json",
- "enabledManagers": [
- "custom.regex"
- ],
- "vulnerabilityAlerts": {
- "enabled": false
- },
- "customManagers": [
- {
- "description": "Update the renovateVersion parameter in the Renovate stages template when a new Renovate Docker version is released.",
- "customType": "regex",
- "managerFilePatterns": [
- "/eng/common/core-templates/stages/renovate\\.yml$/"
- ],
- "matchStrings": [
- "renovateVersion\\n\\s+default:\\s*(?\\d+)"
- ],
- "depNameTemplate": "mcr.microsoft.com/dotnet-buildtools/prereqs",
- "datasourceTemplate": "docker",
- "extractVersionTemplate": "^azurelinux-3\\.0-renovate-(?\\d+)-amd64$"
- }
- ]
-}
diff --git a/eng/xcopy-msbuild/azure-pipelines-xcopy-msbuild.yml b/eng/xcopy-msbuild/azure-pipelines-xcopy-msbuild.yml
new file mode 100644
index 00000000000..55b41095290
--- /dev/null
+++ b/eng/xcopy-msbuild/azure-pipelines-xcopy-msbuild.yml
@@ -0,0 +1,49 @@
+parameters:
+- name: Channel
+ displayName: Visual Studio Build Tools Channel (ie, pre == Preview, rel == Release, intpreview == Dogfood, etc...)
+ type: string
+ default: rel
+ values:
+ - pre
+ - rel
+ - intpreview
+
+- name: Release
+ displayName: Visual Studio Build Tools Release (ie, 16, 17, etc...)
+ type: number
+
+trigger: none
+pr: none
+
+name: BuildTools_${{ parameters.Release }}_${{ parameters.Channel }}-$(Rev:r)
+
+jobs:
+- job: Build
+ displayName: Build xcopy-msbuild package
+ pool:
+ name: NetCore1ESPool-Internal
+ demands: ImageOverride -equals windows.vs2026.amd64
+ steps:
+ - task: PowerShell@2
+ displayName: Download Visual Studio Build Tools
+ inputs:
+ filePath: 'eng\xcopy-msbuild\install-visualstudiobuildtools.ps1'
+ arguments: -channel "${{ parameters.channel }}" -release "${{ parameters.release }}" -outputDirectory "$(Build.ArtifactStagingDirectory)\install"
+
+ - task: PowerShell@2
+ displayName: Build Xcopy-MSBuild package
+ inputs:
+ filePath: 'eng\xcopy-msbuild\build-msbuild-package.ps1'
+ arguments: -buildToolsDir "$(Build.ArtifactStagingDirectory)\install" -outputDirectory "$(Build.ArtifactStagingDirectory)\package"
+
+ - task: CopyFiles@2
+ inputs:
+ SourceFolder: '$(Build.ArtifactStagingDirectory)\package'
+ Contents: '*.nupkg'
+ TargetFolder: '$(Build.ArtifactStagingDirectory)\publish'
+ OverWrite: true
+
+ - task: PublishPipelineArtifact@1
+ inputs:
+ targetPath: '$(Build.ArtifactStagingDirectory)\publish'
+ artifactName: 'package'
\ No newline at end of file
diff --git a/eng/xcopy-msbuild/build-msbuild-package.ps1 b/eng/xcopy-msbuild/build-msbuild-package.ps1
new file mode 100644
index 00000000000..dfbd75a3ebe
--- /dev/null
+++ b/eng/xcopy-msbuild/build-msbuild-package.ps1
@@ -0,0 +1,126 @@
+[CmdletBinding(PositionalBinding=$false)]
+param (
+ [Parameter(Mandatory=$true)][string]$buildToolsDir,
+ [Parameter(Mandatory=$true)][string]$outputDirectory,
+ [string]$packageName = "RoslynTools.MSBuild"
+)
+
+Set-StrictMode -version 2.0
+$ErrorActionPreference="Stop"
+
+function Print-Usage() {
+ Write-Host "build-msbuild.ps1"
+ Write-Host "`t-buildToolsDir path Path to Build Tools Installation"
+ Write-Host "`t-packageName Name of the nuget package (RoslynTools.MSBuild)"
+}
+
+function Get-MSBuildFileInfo() {
+ $fileInfo = New-Object IO.FileInfo $msbuildExe
+ return $fileInfo
+}
+function Get-Description() {
+ $fileInfo = Get-MSBuildFileInfo
+ $sha = & git show-ref HEAD -s
+ $text =
+"
+This is an xcopy version of MSBuild with the following version:
+
+- Product Version: $($fileInfo.VersionInfo.ProductVersion)
+- File Version: $($fileInfo.VersionInfo.FileVersion)
+
+This is built using the following tool:
+
+- Repo: https://github.com/dotnet/arcade/eng/xcopy-msbuild
+- Source: https://github.com/dotnet/arcade/eng/xcopy-msbuild/commit/$($sha)
+"
+ return $text
+}
+
+function Create-ReadMe() {
+ Write-Host "Creating README.md"
+ $text = Get-Description
+ $text | Out-File (Join-Path $outputDirectory "README.md")
+}
+
+function Create-Packages() {
+
+ $text = Get-Description
+ $nuget = Ensure-NuGet
+ $fileInfo = Get-MSBuildFileInfo
+ $packageVersion = $fileInfo.VersionInfo.FileVersion
+ # Split the file version by '.' and take the first 3 components
+ $buildNumber = $Env:BUILD_BUILDNUMBER
+ if($buildNumber -ne $null)
+ {
+ $revision = $buildNumber.Substring($buildNumber.LastIndexOf('-') + 1)
+ }
+ else {
+ $revision = '1'
+ }
+ $packageVersion = $packageVersion.Split('.')[0..2] -join '.'
+ $packageVersion = "$packageVersion-$revision"
+ Write-Host "Packing $packageName, version $packageVersion"
+ & $nuget pack msbuild.nuspec -ExcludeEmptyDirectories -OutputDirectory $outputDirectory -Properties name=$packageName`;version=$packageVersion`;filePath=$outputBuildToolsDirectory`;description=$text
+}
+
+function Create-Directory([string]$dir) {
+ New-Item $dir -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
+}
+
+function Ensure-NuGet() {
+ $nuget = Join-Path $outputDirectory "nuget.exe"
+ if (-not (Test-Path $nuget)) {
+ Create-Directory (Split-Path -parent $nuget)
+ $version = "6.7.0"
+ Write-Host "Downloading NuGet.exe $version"
+ $webClient = New-Object -TypeName "System.Net.WebClient"
+ $webClient.DownloadFile("https://dist.nuget.org/win-x86-commandline/v$version/NuGet.exe", $nuget)
+ }
+
+ return $nuget
+}
+
+function Get-PackagesDir() {
+ $d = $null
+ if ($env:NUGET_PACKAGES -ne $null) {
+ $d = $env:NUGET_PACKAGES
+ }
+ else {
+ $d = Join-Path $env:UserProfile ".nuget\packages\"
+ }
+
+ Create-Directory $d
+ return $d
+}
+
+Push-Location $PSScriptRoot
+try {
+ $repoDir = $PSScriptRoot
+
+ $msbuildDir = Join-Path $buildToolsDir "MSBuild\Current\Bin"
+ $msbuildExe = Join-Path $msbuildDir "msbuild.exe"
+
+ if (-not (Test-Path $msbuildExe)) {
+ Write-Host "Did not find msbuild at $msbuildExe"
+ exit 1
+ }
+
+ $outputBuildToolsDirectory = Join-Path $outputDirectory "BuildTools"
+ Create-Directory $outputBuildToolsDirectory -ErrorAction SilentlyContinue | Out-Null
+ Remove-Item -re -fo "$outputBuildToolsDirectory\*"
+ Write-Host "Copying Build Tools"
+ Copy-Item -re "$buildToolsDir\*" $outputBuildToolsDirectory
+ Create-ReadMe
+ Create-Packages
+
+ exit 0
+}
+catch [exception] {
+ Write-Host $_
+ Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ exit 1
+}
+finally {
+ Pop-Location
+}
diff --git a/eng/xcopy-msbuild/install-visualstudiobuildtools.ps1 b/eng/xcopy-msbuild/install-visualstudiobuildtools.ps1
new file mode 100644
index 00000000000..766b683ed42
--- /dev/null
+++ b/eng/xcopy-msbuild/install-visualstudiobuildtools.ps1
@@ -0,0 +1,43 @@
+[CmdletBinding(PositionalBinding=$false)]
+Param(
+ [Parameter(Mandatory=$true)][String][Alias('c')]$channel,
+ [Parameter(Mandatory=$true)][String][Alias('r')]$release,
+ [Parameter(Mandatory=$true)][String][Alias('o')]$outputDirectory
+)
+# sku: BuildTools, Enterprise, Professional, Community
+# Setting sku explicitly to BuildTools for xcopy MSBuild generation
+$sku = "BuildTools"
+# channel: pre, etc..
+# release: 16, 17, etc..
+$downloadUrl = "https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=$sku&ch=$channel&rel=$release"
+
+$folderName = "$sku-$channel-$release"
+$destinationDir = [System.IO.Path]::Combine("$PSScriptRoot", '.download', "$folderName")
+$installerFilename = "vs_installer.exe"
+$installerPath = "$destinationDir\$InstallerFilename"
+
+if(-Not (Test-Path $destinationDir))
+{
+ New-Item -ItemType 'Directory' -Path "$destinationDir" -Force | Out-Null
+}
+# Query the page to get the download link
+$response = Invoke-WebRequest $downloadUrl -UseBasicParsing
+
+$regex = "downloadUrl: '(?[^']+)'"
+$response.Content -Match $regex | Out-Null
+$downloadLink = $Matches['downloadUrl']
+
+Write-Host "download link: $downloadLink"
+$response = Invoke-WebRequest $downloadLink -UseBasicParsing -OutFile "$installerPath"
+
+if(-Not (Test-Path $outputDirectory))
+{
+ New-Item -ItemType 'Directory' -Path "$outputDirectory" -Force | Out-Null
+}
+
+# Install
+Write-Host "Installing..."
+Write-Host "Start-Process -FilePath $installerPath -ArgumentList install, --installPath, $outputDirectory, --quiet, --norestart, --force, --add, 'Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools;includeRecommended' -Verb RunAs -Wait"
+Start-Process -FilePath $installerPath -ArgumentList install, --installPath, $outputDirectory, --quiet, --norestart, --force, --add, 'Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools;includeRecommended' -Verb RunAs -Wait
+
+Write-Host "Installation complete."
\ No newline at end of file
diff --git a/eng/xcopy-msbuild/msbuild.nuspec b/eng/xcopy-msbuild/msbuild.nuspec
new file mode 100644
index 00000000000..68944347e21
--- /dev/null
+++ b/eng/xcopy-msbuild/msbuild.nuspec
@@ -0,0 +1,21 @@
+
+
+
+ $name$
+ $version$
+ $name$
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkID=614949
+ http://aka.ms/vsextensibility
+ http://aka.ms/vsextensibilityicon
+ true
+ $description$
+ Roslyn xcopy msbuild
+ https://www.visualstudio.com/news/vs2015-vs
+ Copyright © Microsoft
+
+
+
+
+
+
diff --git a/es-metadata.yml b/es-metadata.yml
index 76c257c77ef..f28b35357a5 100644
--- a/es-metadata.yml
+++ b/es-metadata.yml
@@ -4,5 +4,5 @@ accountableOwners:
service: b3bbd815-183a-4142-8056-3a676d687f71
routing:
defaultAreaPath:
- org: dnceng
- path: internal\Dotnet-Core-Engineering
+ org: devdiv
+ path: DevDiv\NET Fundamentals\Infrastructure\Arcade\SDL
diff --git a/global.json b/global.json
index 3f50003b140..4e7b5e61606 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "11.0.100-preview.3.26170.106",
+ "version": "10.0.105",
"rollForward": "latestFeature",
"paths": [
".dotnet",
@@ -9,11 +9,11 @@
"errorMessage": "The required .NET SDK wasn't found. Please run ./eng/common/dotnet.cmd/sh to install it."
},
"tools": {
- "dotnet": "11.0.100-preview.3.26170.106"
+ "dotnet": "10.0.105"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26203.4",
- "Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26203.4",
+ "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26177.7",
+ "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26177.7",
"Microsoft.Build.NoTargets": "3.7.0"
}
}
diff --git a/scripts/create-preview-flow.ps1 b/scripts/create-preview-flow.ps1
index cb122c6635a..02db735cdf0 100644
--- a/scripts/create-preview-flow.ps1
+++ b/scripts/create-preview-flow.ps1
@@ -162,11 +162,12 @@ if ($AddInternalFlow) {
Write-Host "Making default channels for SDK repos"
MakeDefaultChannel https://github.com/dotnet/sdk $SdkBranch $SdkChannel
+MakeDefaultChannel https://github.com/dotnet/roslyn-analyzers $SdkBranch $SdkChannel
MakeDefaultChannel https://github.com/dotnet/templating $SdkBranch $SdkChannel
if ($AddInternalFlow) {
# Because of where internal fixes tend to be, we eliminate some leaves in the sdk graph
- # and flow them through the normal public channels: templating
+ # and flow them through the normal public channels: templating, roslyn-analyzers
Write-Host "Making default channels for SDK repos"
MakeDefaultChannel https://dev.azure.com/dnceng/internal/_git/dotnet-sdk $InternalSdkBranch $InternalSdkChannel
MakeDefaultChannel https://dev.azure.com/dnceng/internal/_git/dotnet-templating $InternalSdkBranch $InternalSdkChannel
@@ -189,6 +190,7 @@ if ($AddInternalFlow) {
Write-Host "Adding arcade flow to repos not building in the VMR"
AddArcadeFlow https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int $RuntimeBranch
+AddArcadeFlow https://github.com/dotnet/icu "dotnet/$RuntimeBranch"
Write-Host "Adding non-VMR runtime flow"
AddPackageOnlyFlow https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int $RuntimeChannel https://github.com/dotnet/wpf $RuntimeBranch EveryBuild
@@ -221,12 +223,14 @@ if ($AddInternalFlow) {
}
Write-Host "Add VMR sdk repo forward flow"
+AddForwardFlow https://github.com/dotnet/roslyn-analyzers $SdkChannel $publicVMR roslyn-analyzers $SdkBranch EveryBuild
AddForwardFlow https://github.com/dotnet/templating $SdkChannel $publicVMR templating $SdkBranch EveryBuild
# SDK is batched so that it batches alongside NuGet for a cohesive set of changes.
AddBatchedForwardFlow https://github.com/dotnet/sdk $SdkChannel $publicVMR sdk $SdkBranch EveryBuild
if ($AddInternalFlow) {
Write-Host "Adding internal VMR sdk repo forward flow"
+ AddForwardFlow https://dev.azure.com/dnceng/internal/_git/dotnet-roslyn-analyzers $InternalSdkChannel $internalVMR roslyn-analyzers $InternalSdkBranch EveryBuild
AddForwardFlow https://dev.azure.com/dnceng/internal/_git/dotnet-sdk $InternalSdkChannel $internalVMR sdk $InternalSdkBranch EveryBuild
AddForwardFlow https://dev.azure.com/dnceng/internal/_git/dotnet-templating $InternalSdkChannel $internalVMR templating $InternalSdkBranch EveryBuild
@@ -235,7 +239,10 @@ if ($AddInternalFlow) {
}
Write-Host "Adding tooling repo VMR forward flow"
-AddForwardFlow https://github.com/nuget/nuget.client $VSChannel $publicVMR nuget-client $SdkBranch EveryBuild
+# NuGet is special in that it flows into the SDK and then batched source into the VMR
+# Change to traditional flow when https://github.com/dotnet/arcade-services/issues/4665 is resolved
+AddPackageOnlyFlow https://github.com/nuget/nuget.client $VSChannel https://github.com/dotnet/sdk $SdkBranch EveryBuild
+AddBatchedForwardFlow https://github.com/nuget/nuget.client $VSChannel $publicVMR nuget-client $SdkBranch EveryBuild
AddForwardFlow https://github.com/dotnet/roslyn $VSChannel $publicVMR roslyn $SdkBranch EveryBuild
AddForwardFlow https://github.com/dotnet/fsharp $VSChannel $publicVMR fsharp $SdkBranch EveryBuild
AddForwardFlow https://github.com/dotnet/msbuild $VSChannel $publicVMR msbuild $SdkBranch EveryBuild
@@ -248,9 +255,6 @@ if ($AddInternalFlow) {
throw "NYI"
}
-Write-Host "Adding VMR->repo package flow"
-AddPackageOnlyFlow https://github.com/dotnet/dotnet $SdkBranch https://github.com/dotnet/icu "dotnet/$RuntimeBranch" None
-
Write-Host "Adding VMR->repo backflow."
# Only repos that branch for a release get backflow
AddBackwardsFlow $publicVMR $SdkChannel https://github.com/dotnet/runtime runtime $RuntimeBranch EveryBuild
@@ -260,6 +264,7 @@ AddBackwardsFlow $publicVMR $SdkChannel https://github.com/dotnet/emsdk emsdk $R
AddBackwardsFlow $publicVMR $SdkChannel https://github.com/dotnet/windowsdesktop windowsdesktop $RuntimeBranch EveryBuild
AddBackwardsFlow $publicVMR $SdkChannel https://github.com/dotnet/winforms winforms $RuntimeBranch EveryBuild
AddBackwardsFlow $publicVMR $SdkChannel https://github.com/dotnet/wpf wpf $RuntimeBranch EveryBuild
+AddBackwardsFlow $publicVMR $SdkChannel https://github.com/dotnet/roslyn-analyzers templating $SdkBranch EveryBuild
AddBackwardsFlow $publicVMR $SdkChannel https://github.com/dotnet/sdk sdk $SdkBranch EveryBuild
AddBackwardsFlow $publicVMR $SdkChannel https://github.com/dotnet/templating templating $SdkBranch EveryBuild
diff --git a/scripts/m2m-dotnet.ps1 b/scripts/m2m-dotnet.ps1
new file mode 100644
index 00000000000..b8f8bb6562e
--- /dev/null
+++ b/scripts/m2m-dotnet.ps1
@@ -0,0 +1,404 @@
+<#
+.SYNOPSIS
+Prepares data for migration, disables subscriptions, migrates and verifies
+DARC subcriptions and default channels.
+
+.DESCRIPTION
+This script runs in 3 modes:
+ 1. GenerateDataFile - creates json file which describes DARC migration.
+ 2. DisableSubscriptions - disables targeting subscriptions for your repository and old branch.
+ 3. Migration - using json file generated during Initializatin, this script removes default channels
+ and targeting subscriptions for your repository and branch. Then it recreates them under
+ a new branch.
+ 4. Verification - Compares default channels and targeting subscriptions from json file against current
+ state in DARC.
+
+.PARAMETER Repository
+Mandatory short name of GitHub repository (e.g. dotnet/runtime or dotnet/wpf). This short name is transformed to
+public and internal repository (e.g. for dotnet/runtime https://github.com/dotnet/runtime and
+https://dev.azure.com/dnceng/internal/_git/dotnet-runtime).
+
+.PARAMETER NewBranch
+Optional new name of branch, defaults to 'main'.
+
+.PARAMETER OldBranch
+Optional old name of branch, defaults to 'master'.
+
+.PARAMETER GenerateDataFile
+Switch to run in generate data file mode. Repository parameter is required and NewBranch, OldBranch are optional.
+
+.PARAMETER DisableSubscriptions
+Switch to run in disable subscriptions on old branch mode. DataFile parameter is required.
+
+.PARAMETER Migrate
+Switch to run in migration mode. DataFile parameter is required.
+
+.PARAMETER Verify
+Switch to run in verification mode. DataFile parameter is required.
+
+.PARAMETER DataFile
+json file path used for DARC validation.
+
+.PARAMETER DryRun
+When specified then no DARC updates are executed, but only logged.
+
+.EXAMPLE
+1. For initilization execute:
+./m2m-dotnet.ps1 -GenerateDataFile -Repository dotnet/m2m-renaming-test-1
+or you can additionaly specify branch names:
+./m2m-dotnet.ps1 -GenerateDataFile -Repository dotnet/m2m-renaming-test-1 -OldBranch master -NewBranch main
+
+This generates data file m2m-dotnet_[timestamp].json and disables all targeting subscriptions.
+
+2. To disable targeting subscriptions for your repository and old branch execute:
+.\m2m-dotnet.ps1 -DisableSubscriptions -DataFile m2m-dotnet_[timestamp].json
+
+3. For migration execute:
+.\m2m-dotnet.ps1 -Migrate -DataFile m2m-dotnet_[timestamp].json
+
+4. For verification execute:
+.\m2m-dotnet.ps1 -Verify -DataFile m2m-dotnet_[timestamp].json
+
+#>
+
+[CmdletBinding()]
+param (
+
+ [Parameter(ParameterSetName = 'GenerateDataFile', Mandatory = $true)]
+ [switch]$GenerateDataFile,
+
+ [Parameter(ParameterSetName = 'DisableSubscriptions', Mandatory = $true)]
+ [switch]$DisableSubscriptions,
+
+ [Parameter(ParameterSetName = 'Migrate', Mandatory = $true)]
+ [switch]$Migrate,
+
+ [Parameter(ParameterSetName = 'Verify', Mandatory = $true)]
+ [switch]$Verify,
+
+ [Parameter(ParameterSetName = 'GenerateDataFile', Mandatory = $true)]
+ [string]$Repository,
+ [Parameter(ParameterSetName = 'GenerateDataFile')]
+ [string]$NewBranch = "main",
+ [Parameter(ParameterSetName = 'GenerateDataFile')]
+ [string]$OldBranch = "master",
+
+ [Parameter(ParameterSetName = 'Verify', Mandatory = $true)]
+ [Parameter(ParameterSetName = 'Migrate', Mandatory = $true)]
+ [Parameter(ParameterSetName = 'DisableSubscriptions', Mandatory = $true)]
+ [string]$DataFile,
+
+ [switch]$DryRun = $false
+)
+
+
+Class DarcExecutor {
+ [bool]$DryRun = $false
+
+ [string[]] ParseIgnoreChecks([string] $line) {
+ $ignoreChecks = @()
+ # Matches fragment like : ignoreChecks = [ "WIP", "license/cla" ]
+ if ($line -match "ignoreChecks\s*=\s*\[\s*([^\]]+)\s*\]") {
+ $ignoreChecksValuesMatches = [regex]::matches($matches[1], "`"([^`"]+)`"")
+ ForEach ($check in $ignoreChecksValuesMatches) {
+ $ignoreChecks += $check.Groups[1].Value
+ }
+ }
+
+ return $ignoreChecks
+ }
+
+ [object[]] ParseMergePolicies([string] $line) {
+ $line = $line -replace "ignoreChecks\s*=\s*\[\s*[^\]]*\s*\]", ""
+ $policies = $line -split "\s+" | Where-Object { $_ }
+ return $policies
+ }
+
+ [object[]] ParseSubscriptions([string] $output) {
+ $darcOutputLines = $output.Split([Environment]::NewLine)
+ $list = @()
+ $processingMergePolicies = $false
+ $batchable = $fromRepo = $fromChannel = $updateFrequency = $enabled = $mergePolicies = $null
+ For ($i = 0; $i -le $darcOutputLines.Length; $i++) {
+ $line = $darcOutputLines[$i]
+ # Matches header like: https://github.com/dotnet/arcade (.NET Eng - Latest) ==> 'https://github.com/dotnet/m2m-renaming-test-1' ('main')
+ if ($line -match "([^\s]+)\s+\(([^\)]+)\)\s+==>\s+'([^']+)'\s+\('([^\)]+)'\)") {
+ if ($i -ne 0) {
+ $list += @{fromRepo = $fromRepo; fromChannel = $fromChannel; updateFrequency = $updateFrequency; enabled = $enabled; batchable = $batchable; ignoreChecks = @($this.ParseIgnoreChecks($mergePolicies)); mergePolicies = @($this.ParseMergePolicies($mergePolicies)) };
+ }
+
+ $updateFrequency = $enabled = $batchable = $mergePolicies = ""
+
+ $fromRepo = $matches[1]
+ $fromChannel = $matches[2]
+ continue
+ }
+ # Matches field like: - Update Frequency: EveryWeek
+ if ($line -match "^\s+\-\s+([^:]+):\s*(.*)") {
+ $processingMergePolicies = $false
+ if ($matches[1] -eq "Update Frequency") {
+ $updateFrequency = $matches[2]
+ continue
+ }
+ if ($matches[1] -eq "Enabled") {
+ $enabled = $matches[2]
+ continue
+ }
+ if ($matches[1] -eq "Batchable") {
+ $batchable = $matches[2]
+ continue
+ }
+ if ($matches[1] -eq "Merge Policies") {
+ $mergePolicies = $matches[2]
+ $processingMergePolicies = $true
+ continue
+ }
+ }
+ if ($processingMergePolicies) {
+ $mergePolicies += $line
+ continue
+ }
+ }
+
+ if ($null -ne $fromRepo) {
+ $list += @{fromRepo = $fromRepo; fromChannel = $fromChannel; updateFrequency = $updateFrequency; enabled = $enabled; batchable = $batchable; ignoreChecks = @($this.ParseIgnoreChecks($mergePolicies)); mergePolicies = @($this.ParseMergePolicies($mergePolicies)) };
+ }
+
+ return $list
+ }
+
+ [object[]] GetSubscriptions([string]$repo, [string]$branch) {
+ $arguments = @("get-subscriptions", "--exact", "--target-repo", $repo, "--target-branch", $branch)
+ $output = $this.Execute($arguments, $false)
+ $subscriptions = @($this.ParseSubscriptions($output))
+ return $subscriptions
+ }
+
+
+ [void]AddSubscription($repo, $branch, $item) {
+ $arguments = @("add-subscription", "--channel", $item.fromChannel, "--source-repo", $item.fromRepo, "--target-repo", $repo, "--update-frequency", $item.updateFrequency, "--target-branch", $branch, "--no-trigger", "-q")
+ $policiesArguments = @("set-repository-policies", "--repo", $repo, "--branch", $branch, "-q")
+ $targetArgumentsRef = [ref]$arguments
+ if ($item.batchable -eq "True") {
+ $arguments += "--batchable"
+ $targetArgumentsRef = [ref]$policiesArguments
+ }
+ if ($item.mergePolicies -contains "Standard") {
+ $targetArgumentsRef.value += "--standard-automerge"
+ }
+ if ($item.mergePolicies -like "NoRequestedChanges") {
+ $targetArgumentsRef.value += "--no-requested-changes"
+ }
+ if ($item.mergePolicies -like "NoExtraCommits") {
+ $targetArgumentsRef.value += "--no-extra-commits"
+ }
+ if ($item.mergePolicies -like "AllChecksSuccessful") {
+ $targetArgumentsRef.value += "--all-checks-passed"
+ }
+ if ($item.ignoreChecks.length -gt 0) {
+ $targetArgumentsRef.value += "--ignore-checks"
+ $targetArgumentsRef.value += $item.ignoreChecks -join ","
+ }
+
+ if ($item.batchable -eq "True") {
+ $this.Execute($policiesArguments, $true)
+ }
+
+ $output = $this.Execute($arguments, $true)
+
+ if ($output -match "Successfully created new subscription with id '([^']+)'.") {
+ $id = $matches[1]
+ if ($item.enabled -eq [bool]::FalseString) {
+ $this.DisableSubscription($id)
+ }
+ }
+ else {
+ Write-Error(" WARNING: {0}" -f $output)
+ }
+ }
+
+ [void]DeleteSubscriptions($repo, $branch) {
+ $arguments = @("get-subscriptions", "--exact", "--target-repo", $repo, "--target-branch", $branch)
+ $output = $this.Execute($arguments, $false)
+ if (-not ($output -match "^No subscriptions found matching the specified criteria.")) {
+ Write-Host ("Deleting subscriptions for {0} {1}" -f $repo, $branch)
+ $arguments = @("delete-subscriptions", "--exact", "--target-repo", $repo, "--target-branch", $branch, "-q")
+ $this.Execute($arguments, $true)
+ }
+ }
+
+ [void]CreateDefaultChannel($repo, $branch, $channel) {
+ Write-Host ("Creating default channel {2} for branch {0} {1}" -f $repo, $branch, $channel)
+ $arguments = @("add-default-channel", "--repo", $repo, "--branch", $branch, "--channel", $channel, "-q")
+ $this.Execute($arguments, $true)
+ }
+
+ [void]DisableSubscription ([string] $id) {
+ Write-Host ("Disabling subscription {0}" -f $id)
+ $arguments = @("subscription-status", "--id", $id, "-d", "-q")
+ $this.Execute($arguments, $true)
+ }
+
+ [string[]]GetTargetSubscriptionIds ([string] $repo, [string] $branch) {
+ $arguments = @("get-subscriptions", "--exact", "--target-repo", $repo, "--target-branch", $branch)
+ $ids = $this.Execute($arguments, $false) | Select-String -AllMatches -Pattern "\s+-\s+Id:\s+([^\s]+)" | ForEach-Object { $_.Matches } | Foreach-Object { $_.Groups[1].Value }
+ return $ids
+ }
+
+ [void]DisableTargetSubscriptions ([string] $repo, [string] $branch) {
+ Write-Host "Disabling targeting subscriptions for $repo ($branch)"
+
+ $ids = $this.GetTargetSubscriptionIds($repo, $branch)
+ ForEach ($id in $ids) {
+ $this.DisableSubscription($id)
+ }
+ }
+
+ [Hashtable[]]GetDefaultChannels ([string] $repo, [string] $branch) {
+ $arguments = @("get-default-channels", "--source-repo", $repo, "--branch", $branch)
+ $output = $this.Execute($arguments, $true)
+ $records = @($output | Select-String -AllMatches -Pattern "\((\d+)\)\s+$repo\s+@\s+$branch\s+->\s+(.*)\b" | ForEach-Object { $_.Matches } | ForEach-Object { @{id = $_.Groups[1].Value; channel = $_.Groups[2].Value } })
+ return $records
+ }
+
+ [void]DeleteDefaultChannel([string] $id) {
+ Write-Host ("Deleting default channel {0}" -f $id)
+ $arguments = @("delete-default-channel", "--id", $id)
+ $this.Execute($arguments, $true)
+ }
+
+ [void]DeleteDefaultChannels([string] $repo, [string] $branch) {
+ $channels = @($this.GetDefaultChannels($repo, $branch))
+ ForEach ($item in $channels) {
+ $this.DeleteDefaultChannel($item.id)
+ }
+ }
+
+ [Hashtable]GetRepoConfig([string] $repo, [string] $newBranch, [string] $oldBranch) {
+ $defaultChannels = @($this.GetDefaultChannels($repo, $oldBranch) | ForEach-Object { $_.channel })
+ $subscriptions = @($this.GetSubscriptions($repo, $oldBranch))
+ $config = @{repo = $repo; newBranch = $newBranch; oldBranch = $oldBranch; defaultChannels = $defaultChannels; subscriptions = $subscriptions; }
+ return $config
+ }
+
+ [void]MigrateRepo([PSCustomObject]$config) {
+ Write-Host (">>>Migrating repository {0} {1} ==> {2}..." -f $config.repo, $config.oldBranch, $config.newBranch)
+
+ $this.DeleteDefaultChannels($config.repo, $config.oldBranch)
+ ForEach ($channel in $config.defaultChannels) {
+ $this.CreateDefaultChannel($config.repo, $config.newBranch, $channel)
+ }
+
+ $this.DeleteSubscriptions($config.repo, $config.oldBranch)
+ $this.DeleteSubscriptions($config.repo, $config.newBranch)
+
+ Write-Host ("Adding subscriptions")
+ ForEach ($item in $config.subscriptions) {
+ $this.AddSubscription($config.repo, $config.newBranch, $item)
+ }
+ }
+
+ [void]VerifyRepo([PSCustomObject]$config) {
+ Write-Host (">>>Verifying repository {0} {1} ==> {2}..." -f $config.repo, $config.oldBranch, $config.newBranch)
+ if ($this.GetDefaultChannels($config.repo, $config.oldBranch).length -ne 0) {
+ throw("Default channels for old branch haven't been removed.")
+ }
+ if ($this.GetTargetSubscriptionIds($config.repo, $config.oldBranch).length -ne 0) {
+ throw("Subscriptions for old branch haven't been removed.")
+ }
+
+ $actualConfig = $this.GetRepoConfig($config.repo, $config.oldBranch, $config.newBranch)
+ if ($actualConfig.defaultChannels.length -ne $config.defaultChannels.length) {
+ throw("Subscriptions for old branch haven't been removed.")
+ }
+
+ $expectedDefaultChannels = ConvertTo-Json($actualConfig.defaultChannels | Sort-Object)
+ $actualDefaultChannels = ConvertTo-Json($config.defaultChannels | Sort-Object)
+ if ($expectedDefaultChannels -ne $actualDefaultChannels) {
+ throw("Expected default channels {0} don't match actual {1}." -f $actualDefaultChannels, $actualDefaultChannels)
+ }
+
+ $actualSubscriptions = ConvertTo-Json($actualConfig.subscriptions | Sort-Object { $_.fromRepo })
+ $expectedSubscriptions = ConvertTo-Json($config.subscriptions | Sort-Object { $_.fromRepo })
+
+ if ($expectedSubscriptions -ne $actualSubscriptions) {
+ throw("Expected subscriptions {0} don't match actual {1}." -f $expectedSubscriptions, $actualSubscriptions)
+ }
+
+ Write-Host ("Validation of {0} passed" -f $config.repo)
+ }
+
+ [string]Execute ([string[]] $arguments, [bool]$exitCodeCheck) {
+ if ($this.DryRun -and ($arguments[0] -ne "get-default-channels") -and ($arguments[0] -ne "get-subscriptions")) {
+ Write-Host (">>> darc {0}" -f ($arguments -join " "))
+ return "Successfully created new subscription with id 'TEST_ID'."
+ }
+ else {
+ $output = (&"darc" $arguments | Out-String)
+ if ($exitCodeCheck -and $LASTEXITCODE -ne 0) {
+ throw (" Error executing command ""darc {0}"" with status code {1}: {2}" -f ($arguments -join " "), $LASTEXITCODE, $output)
+ }
+ return $output
+ }
+ }
+}
+function InitializeDarc {
+ param (
+ [DarcExecutor] $darc
+ )
+ $configFile = "m2m-dotnet_{0:yyyyMMdd_HHmmss}.json" -f (get-date)
+ $internalRepo = "https://dev.azure.com/dnceng/internal/_git/{0}" -f ($Repository -replace "/", "-")
+ $publicRepo = "https://github.com/{0}" -f $Repository
+
+ Write-Host ("Creating configuration for repository {0} {1} ==> {2}..." -f $publicRepo, $OldBranch, $NewBranch)
+ $configPublic = $darc.GetRepoConfig($publicRepo, $NewBranch, $OldBranch)
+
+ Write-Host ("Creating configuration for repository {0} {1} ==> {2}..." -f $internalRepo, $OldBranch, $NewBranch)
+ $configInternal = $darc.GetRepoConfig($internalRepo, $NewBranch, $OldBranch)
+
+ $configs = @($configPublic, $configInternal)
+ ConvertTo-Json $configs -Depth 4 | Out-File -FilePath $configFile
+ Write-Host ("Configuration has been saved as {0}" -f $configFile)
+}
+
+function DisableDarcSubscriptions {
+ param (
+ [DarcExecutor] $darc
+ )
+
+ $configs = Get-Content -Raw -Path $DataFile | ConvertFrom-Json
+ ForEach ($config in $configs) {
+ $darc.DisableTargetSubscriptions($config.repo, $config.oldBranch)
+ }
+}
+function MigrateDarc {
+ param (
+ [DarcExecutor]$darc
+ )
+
+ $configs = Get-Content -Raw -Path $DataFile | ConvertFrom-Json
+ ForEach ($config in $configs) {
+ $darc.MigrateRepo($config)
+ }
+}
+function VerifyDarc {
+ param (
+ [DarcExecutor]$darc
+ )
+
+ $configs = Get-Content -Raw -Path $DataFile | ConvertFrom-Json
+ ForEach ($config in $configs) {
+ $darc.VerifyRepo($config)
+ }
+}
+
+$ErrorActionPreference = 'Stop'
+$darc = [DarcExecutor]::new()
+$darc.DryRun = $DryRun
+
+switch ($PSCmdlet.ParameterSetName) {
+ "GenerateDataFile" { InitializeDarc -darc $darc }
+ "DisableSubscriptions" { DisableDarcSubscriptions -darc $darc }
+ "Migrate" { MigrateDarc -darc $darc }
+ "Verify" { VerifyDarc -darc $darc }
+}
diff --git a/src/Common/Internal/AssemblyResolution.cs b/src/Common/Internal/AssemblyResolution.cs
new file mode 100644
index 00000000000..caea03260c1
--- /dev/null
+++ b/src/Common/Internal/AssemblyResolution.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#if NET472
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Microsoft.DotNet
+{
+ internal static class AssemblyResolution
+ {
+ internal static TaskLoggingHelper Log;
+
+ public static void Initialize()
+ {
+ AppDomain.CurrentDomain.AssemblyResolve += AssemblyResolve;
+ }
+
+ private static Assembly AssemblyResolve(object sender, ResolveEventArgs args)
+ {
+ var name = new AssemblyName(args.Name);
+
+ if (!name.Name.Equals("System.Collections.Immutable", StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
+
+ var fullPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "System.Collections.Immutable.dll");
+
+ Assembly sci;
+ try
+ {
+ sci = Assembly.LoadFile(fullPath);
+ }
+ catch (Exception e)
+ {
+ Log?.LogWarning($"AssemblyResolve: exception while loading '{fullPath}': {e.Message}");
+ return null;
+ }
+
+ if (name.Version <= sci.GetName().Version)
+ {
+ Log?.LogMessage(MessageImportance.Low, $"AssemblyResolve: loaded '{fullPath}' to {AppDomain.CurrentDomain.FriendlyName}");
+ return sci;
+ }
+
+ return null;
+ }
+ }
+}
+
+#endif
diff --git a/src/Common/Internal/AssemblyResolver.cs b/src/Common/Internal/AssemblyResolver.cs
new file mode 100644
index 00000000000..d398408cc29
--- /dev/null
+++ b/src/Common/Internal/AssemblyResolver.cs
@@ -0,0 +1,110 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#nullable disable
+
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Reflection;
+
+namespace Microsoft.Arcade.Common.Desktop
+{
+ ///
+ /// Used to enable app-local assembly unification.
+ ///
+ internal static class AssemblyResolver
+ {
+ static AssemblyResolver()
+ {
+ AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
+ }
+
+ ///
+ /// Call to enable the assembly resolver for the current AppDomain.
+ ///
+ public static void Enable()
+ {
+ // intentionally empty. This is just meant to ensure the static constructor
+ // has run.
+ }
+
+ private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
+ {
+ // apply any existing policy
+ AssemblyName referenceName = new AssemblyName(AppDomain.CurrentDomain.ApplyPolicy(args.Name));
+
+ string fileName = referenceName.Name + ".dll";
+ string assemblyPath = null;
+ string probingPath = null;
+ Assembly assm = null;
+
+ // look next to requesting assembly
+ assemblyPath = args.RequestingAssembly?.Location;
+ if (!String.IsNullOrEmpty(assemblyPath))
+ {
+ probingPath = Path.Combine(Path.GetDirectoryName(assemblyPath), fileName);
+ Debug.WriteLine($"Considering {probingPath} based on RequestingAssembly");
+ if (Probe(probingPath, referenceName.Version, out assm))
+ {
+ return assm;
+ }
+ }
+
+ // look next to the executing assembly
+ assemblyPath = Assembly.GetExecutingAssembly().Location;
+ if (!String.IsNullOrEmpty(assemblyPath))
+ {
+ probingPath = Path.Combine(Path.GetDirectoryName(assemblyPath), fileName);
+
+ Debug.WriteLine($"Considering {probingPath} based on ExecutingAssembly");
+ if (Probe(probingPath, referenceName.Version, out assm))
+ {
+ return assm;
+ }
+ }
+
+ // look in AppDomain base directory
+ probingPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName);
+ Debug.WriteLine($"Considering {probingPath} based on BaseDirectory");
+ if (Probe(probingPath, referenceName.Version, out assm))
+ {
+ return assm;
+ }
+
+ // look in current directory
+ Debug.WriteLine($"Considering {fileName}");
+ if (Probe(fileName, referenceName.Version, out assm))
+ {
+ return assm;
+ }
+
+ return null;
+ }
+
+ ///
+ /// Considers a path to load for satisfying an assembly ref and loads it
+ /// if the file exists and version is sufficient.
+ ///
+ /// Path to consider for load
+ /// Minimum version to consider
+ /// loaded assembly
+ /// true if assembly was loaded
+ private static bool Probe(string filePath, Version minimumVersion, out Assembly assembly)
+ {
+ if (File.Exists(filePath))
+ {
+ AssemblyName name = AssemblyName.GetAssemblyName(filePath);
+
+ if (name.Version >= minimumVersion)
+ {
+ assembly = Assembly.Load(name);
+ return true;
+ }
+ }
+
+ assembly = null;
+ return false;
+ }
+ }
+}
diff --git a/src/Common/Internal/BuildTask.Desktop.cs b/src/Common/Internal/BuildTask.Desktop.cs
new file mode 100644
index 00000000000..f71609229a9
--- /dev/null
+++ b/src/Common/Internal/BuildTask.Desktop.cs
@@ -0,0 +1,13 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+namespace Microsoft.Arcade.Common.Desktop
+{
+ public partial class BuildTask
+ {
+ static BuildTask()
+ {
+ AssemblyResolver.Enable();
+ }
+ }
+}
diff --git a/src/Common/Microsoft.Arcade.Common.Tests/ArgumentEscaperTests.cs b/src/Common/Microsoft.Arcade.Common.Tests/ArgumentEscaperTests.cs
index 7033e48ab8d..5dd54761600 100644
--- a/src/Common/Microsoft.Arcade.Common.Tests/ArgumentEscaperTests.cs
+++ b/src/Common/Microsoft.Arcade.Common.Tests/ArgumentEscaperTests.cs
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Common;
using Xunit;
diff --git a/src/Common/Microsoft.Arcade.Common.Tests/Microsoft.Arcade.Common.Tests.csproj b/src/Common/Microsoft.Arcade.Common.Tests/Microsoft.Arcade.Common.Tests.csproj
index 708b2001440..11cd8e38804 100644
--- a/src/Common/Microsoft.Arcade.Common.Tests/Microsoft.Arcade.Common.Tests.csproj
+++ b/src/Common/Microsoft.Arcade.Common.Tests/Microsoft.Arcade.Common.Tests.csproj
@@ -1,12 +1,12 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
enable
-
+
diff --git a/src/Common/Microsoft.Arcade.Common/Command.cs b/src/Common/Microsoft.Arcade.Common/Command.cs
index c7c1ef638dc..0ab31c5ad61 100644
--- a/src/Common/Microsoft.Arcade.Common/Command.cs
+++ b/src/Common/Microsoft.Arcade.Common/Command.cs
@@ -118,7 +118,11 @@ public ICommand WorkingDirectory(string projectDirectory)
public ICommand EnvironmentVariable(string name, string value)
{
+#if NET45
+ _process.StartInfo.EnvironmentVariables[name] = value;
+#else
_process.StartInfo.Environment[name] = value;
+#endif
_process.StartInfo.UseShellExecute = false;
return this;
}
diff --git a/src/Common/Microsoft.Arcade.Common/MSBuildTaskBase.Desktop.cs b/src/Common/Microsoft.Arcade.Common/MSBuildTaskBase.Desktop.cs
new file mode 100644
index 00000000000..39d999e8f92
--- /dev/null
+++ b/src/Common/Microsoft.Arcade.Common/MSBuildTaskBase.Desktop.cs
@@ -0,0 +1,14 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+using Microsoft.Arcade.Common.Desktop;
+
+namespace Microsoft.Arcade.Common
+{
+ public partial class MSBuildTaskBase
+ {
+ static MSBuildTaskBase()
+ {
+ AssemblyResolver.Enable();
+ }
+ }
+}
diff --git a/src/Common/Microsoft.Arcade.Common/Microsoft.Arcade.Common.csproj b/src/Common/Microsoft.Arcade.Common/Microsoft.Arcade.Common.csproj
index fbc3b77904b..bf6d4c11032 100644
--- a/src/Common/Microsoft.Arcade.Common/Microsoft.Arcade.Common.csproj
+++ b/src/Common/Microsoft.Arcade.Common/Microsoft.Arcade.Common.csproj
@@ -2,8 +2,9 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);netstandard2.0;$(NetFrameworkToolCurrent)
true
+ **/*.Desktop.*
@@ -12,4 +13,14 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Common/Microsoft.Arcade.Test.Common/Microsoft.Arcade.Test.Common.csproj b/src/Common/Microsoft.Arcade.Test.Common/Microsoft.Arcade.Test.Common.csproj
index 53ed94d1db7..4867a58638f 100644
--- a/src/Common/Microsoft.Arcade.Test.Common/Microsoft.Arcade.Test.Common.csproj
+++ b/src/Common/Microsoft.Arcade.Test.Common/Microsoft.Arcade.Test.Common.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
true
@@ -10,6 +10,10 @@
+
+
+
+
diff --git a/src/Microsoft.Cci.Extensions/Microsoft.Cci.Extensions.csproj b/src/Microsoft.Cci.Extensions/Microsoft.Cci.Extensions.csproj
index 3e834bcfe86..4a6d36711e0 100644
--- a/src/Microsoft.Cci.Extensions/Microsoft.Cci.Extensions.csproj
+++ b/src/Microsoft.Cci.Extensions/Microsoft.Cci.Extensions.csproj
@@ -1,7 +1,8 @@
- $(BundledNETCoreAppTargetFramework)
+
+ $(NetToolCurrent);netstandard2.0;$(NetFrameworkToolCurrent)
true
true
true
@@ -19,4 +20,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Arcade.Sdk.Tests/CentralPackageManagementTests.cs b/src/Microsoft.DotNet.Arcade.Sdk.Tests/CentralPackageManagementTests.cs
deleted file mode 100644
index 8e06b67f0c8..00000000000
--- a/src/Microsoft.DotNet.Arcade.Sdk.Tests/CentralPackageManagementTests.cs
+++ /dev/null
@@ -1,171 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#nullable enable
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Xml.Linq;
-using Xunit;
-
-namespace Microsoft.DotNet.Arcade.Sdk.Tests
-{
- ///
- /// Validates that implicitly defined PackageReferences in .targets and .props files
- /// do not conflict with PackageVersion entries in Directory.Packages.props.
- /// NuGet CPM rule: implicit PackageReferences cannot have a corresponding
- /// PackageVersion entry — they must set Version directly on the PackageReference.
- /// Violation produces NU1009 at restore time.
- ///
- public class CentralPackageManagementTests
- {
- private static readonly string? s_repoRoot = TryGetRepoRoot();
-
- [Fact]
- public void ImplicitPackageReferences_ShouldNotConflictWithPackageVersionEntries()
- {
- if (s_repoRoot == null)
- {
- // Running on Helix or outside the repo — skip
- return;
- }
-
- var directoryPackagesPropsPath = Path.Combine(s_repoRoot, "Directory.Packages.props");
- Assert.True(File.Exists(directoryPackagesPropsPath), $"Directory.Packages.props not found at {directoryPackagesPropsPath}");
-
- // Collect all PackageVersion entries from Directory.Packages.props
- var packageVersionIds = GetPackageIds(directoryPackagesPropsPath, "PackageVersion");
-
- // Find all IsImplicitlyDefined="true" PackageReferences in .targets and .props files
- var implicitReferences = new List<(string file, string packageId)>();
- var sdkToolsDir = Path.Combine(s_repoRoot, "src", "Microsoft.DotNet.Arcade.Sdk", "tools");
-
- foreach (var file in Directory.EnumerateFiles(sdkToolsDir, "*.targets", SearchOption.AllDirectories)
- .Concat(Directory.EnumerateFiles(sdkToolsDir, "*.props", SearchOption.AllDirectories)))
- {
- foreach (var id in GetImplicitPackageReferenceIds(file))
- {
- implicitReferences.Add((file, id));
- }
- }
-
- // Assert: no implicit PackageReference should have a matching PackageVersion
- var conflicts = implicitReferences
- .Where(r => packageVersionIds.Contains(r.packageId))
- .ToList();
-
- Assert.True(conflicts.Count == 0,
- $"NU1009 conflict: the following implicitly defined PackageReferences have " +
- $"corresponding PackageVersion entries in Directory.Packages.props. " +
- $"Remove the PackageVersion entries or remove IsImplicitlyDefined from the PackageReference.\n" +
- string.Join("\n", conflicts.Select(c =>
- $" - '{c.packageId}' (implicit in {Path.GetRelativePath(s_repoRoot, c.file)})")));
- }
-
- ///
- /// Collects PackageVersion Include values from an XML file,
- /// following simple Import directives (relative paths without MSBuild properties).
- ///
- private static HashSet GetPackageIds(string propsFile, string elementName)
- {
- var result = new HashSet(StringComparer.OrdinalIgnoreCase);
- CollectElementIds(propsFile, elementName, result);
- return result;
- }
-
- private static void CollectElementIds(string xmlFile, string elementName, HashSet result)
- {
- XDocument doc;
- try
- {
- doc = XDocument.Load(xmlFile);
- }
- catch
- {
- return;
- }
-
- string? directory = Path.GetDirectoryName(xmlFile);
-
- foreach (var element in doc.Descendants())
- {
- if (element.Name.LocalName == elementName)
- {
- string? id = element.Attribute("Include")?.Value;
- if (id != null)
- {
- result.Add(id);
- }
- }
- else if (element.Name.LocalName == "Import")
- {
- string? project = element.Attribute("Project")?.Value;
- if (project != null && !project.Contains("$(") && directory != null)
- {
- string importPath = Path.GetFullPath(Path.Combine(directory, project));
- if (File.Exists(importPath))
- {
- CollectElementIds(importPath, elementName, result);
- }
- }
- }
- }
- }
-
- private static IEnumerable GetImplicitPackageReferenceIds(string targetsFile)
- {
- XDocument doc;
- try
- {
- doc = XDocument.Load(targetsFile);
- }
- catch (System.Xml.XmlException)
- {
- // Non-XML files with .targets/.props extension — skip
- yield break;
- }
-
- foreach (var element in doc.Descendants().Where(e => e.Name.LocalName == "PackageReference"))
- {
- var isImplicit = element.Attribute("IsImplicitlyDefined")?.Value;
- if (string.Equals(isImplicit, "true", StringComparison.OrdinalIgnoreCase))
- {
- var id = element.Attribute("Include")?.Value;
- if (id != null)
- {
- yield return id;
- }
- }
- }
- }
-
- private static string? TryGetRepoRoot()
- {
- var dir = AppContext.BaseDirectory;
- while (dir != null)
- {
- if (File.Exists(Path.Combine(dir, "Directory.Packages.props")) &&
- Directory.Exists(Path.Combine(dir, "src", "Microsoft.DotNet.Arcade.Sdk")))
- {
- return dir;
- }
- dir = Path.GetDirectoryName(dir);
- }
-
- dir = Directory.GetCurrentDirectory();
- while (dir != null)
- {
- if (File.Exists(Path.Combine(dir, "Directory.Packages.props")) &&
- Directory.Exists(Path.Combine(dir, "src", "Microsoft.DotNet.Arcade.Sdk")))
- {
- return dir;
- }
- dir = Path.GetDirectoryName(dir);
- }
-
- return null;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Arcade.Sdk.Tests/Microsoft.DotNet.Arcade.Sdk.Tests.csproj b/src/Microsoft.DotNet.Arcade.Sdk.Tests/Microsoft.DotNet.Arcade.Sdk.Tests.csproj
index d8dd48a2ef3..01234e4c065 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk.Tests/Microsoft.DotNet.Arcade.Sdk.Tests.csproj
+++ b/src/Microsoft.DotNet.Arcade.Sdk.Tests/Microsoft.DotNet.Arcade.Sdk.Tests.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
$(DefaultItemExcludes);testassets\**\*
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/Microsoft.DotNet.Arcade.Sdk.csproj b/src/Microsoft.DotNet.Arcade.Sdk/Microsoft.DotNet.Arcade.Sdk.csproj
index 861028474b9..baebf769c53 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/Microsoft.DotNet.Arcade.Sdk.csproj
+++ b/src/Microsoft.DotNet.Arcade.Sdk/Microsoft.DotNet.Arcade.Sdk.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
true
true
@@ -26,6 +26,11 @@
+
+
+
+
+
@@ -42,15 +47,13 @@
PackagePath="tools\DefaultVersions.Generated.props" />
+
+
+
+
-
+
@@ -81,14 +84,4 @@
-
-
-
-
-
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/src/DownloadFile.cs b/src/Microsoft.DotNet.Arcade.Sdk/src/DownloadFile.cs
index d76eb4aa53a..cd1a18098d2 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/src/DownloadFile.cs
+++ b/src/Microsoft.DotNet.Arcade.Sdk/src/DownloadFile.cs
@@ -128,6 +128,7 @@ private async Tasks.Task DownloadFromUriAsync(string uri) {
// on Mac if the endpoint is not available. This is only available on .NET Core, but has only been
// observed on Mac anyway.
+#if NET
using SocketsHttpHandler handler = new SocketsHttpHandler();
handler.SslOptions.CertificateChainPolicy = new X509ChainPolicy
{
@@ -150,6 +151,9 @@ private async Tasks.Task DownloadFromUriAsync(string uri) {
};
using (var httpClient = new HttpClient(handler))
+#else
+ using (var httpClient = new HttpClient(new HttpClientHandler { CheckCertificateRevocationList = true }))
+#endif
{
httpClient.Timeout = TimeSpan.FromSeconds(TimeoutInSeconds);
try
@@ -211,11 +215,11 @@ private async Tasks.Task DownloadWithRetriesAsync(HttpClient httpClient, s
if (attempt > Retries)
{
Log.LogMessage($"Failed to download '{uri}' to '{DestinationPath}': {e.Message}");
- Log.LogErrorFromException(e, true, true, null);
return false;
}
Log.LogMessage($"Retrying download of '{uri}' to '{DestinationPath}' due to failure: '{e.Message}' ({attempt}/{Retries})");
+ Log.LogErrorFromException(e, true, true, null);
await Tasks.Task.Delay(RetryDelayMilliseconds).ConfigureAwait(false);
continue;
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/src/GetLicenseFilePath.cs b/src/Microsoft.DotNet.Arcade.Sdk/src/GetLicenseFilePath.cs
index a0abef70c0f..d195c79398e 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/src/GetLicenseFilePath.cs
+++ b/src/Microsoft.DotNet.Arcade.Sdk/src/GetLicenseFilePath.cs
@@ -37,6 +37,15 @@ private void ExecuteImpl()
{
const string fileName = "license";
+#if NET472
+ IEnumerable enumerateFiles(string extension)
+ {
+ var fileNameWithExtension = fileName + extension;
+ return System.IO.Directory.EnumerateFiles(Directory, "*", SearchOption.TopDirectoryOnly)
+ .Where(path => string.Equals(fileNameWithExtension, System.IO.Path.GetFileName(path), System.StringComparison.OrdinalIgnoreCase));
+ }
+
+#else
var options = new EnumerationOptions
{
MatchCasing = MatchCasing.CaseInsensitive,
@@ -48,7 +57,7 @@ private void ExecuteImpl()
IEnumerable enumerateFiles(string extension) =>
System.IO.Directory.EnumerateFileSystemEntries(Directory, fileName + extension, options);
-
+#endif
var matches =
(from extension in new[] { ".txt", ".md", "" }
from path in enumerateFiles(extension)
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs b/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs
index 8e72a3686db..d3ff77edbb5 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs
+++ b/src/Microsoft.DotNet.Arcade.Sdk/src/InstallDotNetCore.cs
@@ -16,9 +16,16 @@
namespace Microsoft.DotNet.Arcade.Sdk
{
+#if NET472
+ [LoadInSeparateAppDomain]
+ public class InstallDotNetCore : AppDomainIsolatedTask
+ {
+ static InstallDotNetCore() => AssemblyResolution.Initialize();
+#else
public class InstallDotNetCore : Microsoft.Build.Utilities.Task
{
- private static readonly char[] s_keyTrimChars = ['$', '(', ')'];
+#endif
+ private static readonly char[] s_keyTrimChars = [ '$', '(', ')' ];
public string VersionsPropsPath { get; set; }
@@ -27,12 +34,10 @@ public class InstallDotNetCore : Microsoft.Build.Utilities.Task
[Required]
public string GlobalJsonPath { get; set; }
[Required]
- public string DotNetPath { get; set; }
- [Required]
public string Platform { get; set; }
public string RuntimeSourceFeed { get; set; }
-
+
public string RuntimeSourceFeedKey { get; set; }
public override bool Execute()
@@ -120,9 +125,7 @@ public override bool Execute()
if (version != null)
{
- string normalizedVersion = version.ToNormalizedString();
- string runtime = runtimeItem.Key;
- string arguments = $"-runtime \"{runtime}\" -version \"{normalizedVersion}\"";
+ string arguments = $"-runtime \"{runtimeItem.Key}\" -version \"{version.ToNormalizedString()}\"";
if (!string.IsNullOrEmpty(architecture))
{
arguments += $" -architecture {architecture}";
@@ -139,20 +142,6 @@ public override bool Execute()
arguments += $" -runtimeSourceFeedKey {RuntimeSourceFeedKey}";
}
- // Null architecture means that the script should infer it, we don't want to re-implement too much logic here,
- // so we skip the quick check.
- if (architecture != null)
- {
- // Quickly check if the runtime is already installed, skipping double process hop,
- // load of powershell, and load of tools.sh, or similar overhead for shell script.
- // Saving about 1 second per runtime.
- if (CheckRuntimeDotnetInstalled(DotNetPath, normalizedVersion, architecture, runtime))
-
- {
- continue;
- }
- }
-
Log.LogMessage(MessageImportance.Low, $"Executing: {DotNetInstallScript} {arguments}");
var process = Process.Start(new ProcessStartInfo()
{
@@ -239,42 +228,5 @@ private IEnumerable> GetItemsFromJsonElementArray(J
}
return items.ToArray();
}
-
- private static bool CheckRuntimeDotnetInstalled(
- string dotnetRoot,
- string version,
- string architecture,
- string runtime)
- {
- // For performance this check is duplicated from InstallDotnet in tools.sh and tools.ps1
- // if you are making changes here, consider if you need to make changes there as well.
- if (string.IsNullOrEmpty(runtime) && runtime == "sdk")
- {
- throw new ArgumentException($"{nameof(InstallDotNetCore)} cannot be used for .NET SDK installation.");
- }
-
- if (!string.Equals(architecture, RuntimeInformation.OSArchitecture.ToString(), StringComparison.OrdinalIgnoreCase))
- {
- // This istallation is not native to this OS, it will be installed into a subfolder with the architecture name.
- // See eng/common/dotnet-install.sh and eng/common/dotnet-install.ps1
- dotnetRoot = Path.Combine(dotnetRoot, architecture.ToLowerInvariant());
- }
-
- string runtimePath = runtime switch
- {
- "dotnet" => Path.Combine(dotnetRoot, "shared", "Microsoft.NETCore.App", version),
- "aspnetcore" => Path.Combine(dotnetRoot, "shared", "Microsoft.AspNetCore.App", version),
- "windowsdesktop" => Path.Combine(dotnetRoot, "shared", "Microsoft.WindowsDesktop.App", version),
- _ => Path.Combine(dotnetRoot, "shared", version)
- };
-
- if (Directory.Exists(runtimePath))
- {
- Console.WriteLine($" Runtime toolset '{runtime}/{architecture} v{version}' already installed in directory '{runtimePath}'.");
- return true;
- }
-
- return false;
- }
}
}
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/src/SetCorFlags.cs b/src/Microsoft.DotNet.Arcade.Sdk/src/SetCorFlags.cs
index 98525024117..593ba369bc9 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/src/SetCorFlags.cs
+++ b/src/Microsoft.DotNet.Arcade.Sdk/src/SetCorFlags.cs
@@ -12,8 +12,15 @@
namespace Microsoft.DotNet.Arcade.Sdk
{
+#if NET472
+ [LoadInSeparateAppDomain]
+ public class SetCorFlags : AppDomainIsolatedTask
+ {
+ static SetCorFlags() => AssemblyResolution.Initialize();
+#else
public class SetCorFlags : Microsoft.Build.Utilities.Task
{
+#endif
[Required]
public string FilePath { get; set; }
@@ -28,6 +35,9 @@ public class SetCorFlags : Microsoft.Build.Utilities.Task
public override bool Execute()
{
+#if NET472
+ AssemblyResolution.Log = Log;
+#endif
try
{
ExecuteImpl();
@@ -35,6 +45,9 @@ public override bool Execute()
}
finally
{
+#if NET472
+ AssemblyResolution.Log = null;
+#endif
}
}
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/src/Unsign.cs b/src/Microsoft.DotNet.Arcade.Sdk/src/Unsign.cs
index f9c8bf00b2b..934939e265d 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/src/Unsign.cs
+++ b/src/Microsoft.DotNet.Arcade.Sdk/src/Unsign.cs
@@ -12,13 +12,23 @@
namespace Microsoft.DotNet.Arcade.Sdk
{
+#if NET472
+ [LoadInSeparateAppDomain]
+ public sealed class Unsign : AppDomainIsolatedTask
+ {
+ static Unsign() => AssemblyResolution.Initialize();
+#else
public class Unsign : Microsoft.Build.Utilities.Task
{
+#endif
[Required]
public string FilePath { get; set; }
public override bool Execute()
{
+#if NET472
+ AssemblyResolution.Log = Log;
+#endif
try
{
ExecuteImpl();
@@ -26,6 +36,9 @@ public override bool Execute()
}
finally
{
+#if NET472
+ AssemblyResolution.Log = null;
+#endif
}
}
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/BeforeCommonTargets.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/BeforeCommonTargets.targets
index 76e89170b45..d5d1ae7e4b7 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/BeforeCommonTargets.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/BeforeCommonTargets.targets
@@ -9,7 +9,6 @@
-
-
-
-
-
- $(BundledRuntimeIdentifierGraphFile)
-
-
- $(MSBuildThisFileDirectory)net\Microsoft.DotNet.Arcade.Sdk.dll
+ $(MSBuildThisFileDirectory)netframework\Microsoft.DotNet.Arcade.Sdk.dll
+ $(MSBuildThisFileDirectory)net\Microsoft.DotNet.Arcade.Sdk.dll
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props b/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props
index 8a17e952a46..bb618cf9850 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props
@@ -67,12 +67,7 @@
1.0.422
5.1.0-beta.21356.1
18.0.1
-
- 17.14.2120
+ 16.9.1050
$(ArcadeSdkVersion)
$(ArcadeSdkVersion)
$(ArcadeSdkVersion)
@@ -83,12 +78,12 @@
2.9.3
1.22.0
$(XUnitVersion)
- 3.1.5
+ 3.1.3
- 3.2.2
- 1.9.1
+ 3.0.0
+ 1.7.3
- 4.1.0
+ 3.9.3
$(MSTestVersion)
$(MSTestVersion)
$(ArcadeSdkVersion)
@@ -103,7 +98,7 @@
1.0.0
2.1.3
1.1.286
- 3.14.1-11027.2914512
+ 3.14.1-9323.2545153
5.0.2-dotnet.2811440
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/GenerateChecksums.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/GenerateChecksums.targets
index b625b3e70e9..b272e667b44 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/GenerateChecksums.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/GenerateChecksums.targets
@@ -1,7 +1,7 @@
-
+
-
+
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Imports.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/Imports.targets
index a50d2207589..2bbcc145865 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Imports.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Imports.targets
@@ -9,8 +9,8 @@
-
+
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/InstallDotNetCore.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/InstallDotNetCore.targets
index aba176e26b2..c59c07cb980 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/InstallDotNetCore.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/InstallDotNetCore.targets
@@ -1,7 +1,7 @@
-
+
@@ -16,7 +16,6 @@
-
-
-
+
+
+
$(IntermediateOutputPath)$(TargetFileName).pcbm
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props b/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props
index b8cb8efe741..e443c179b2a 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props
@@ -20,9 +20,6 @@
Icon.png
$(MSBuildThisFileDirectory)Assets\DotNetPackageIcon.png
-
- $(WarningsNotAsErrors);$(AdditionalWarningsNotAsErrors)
-
true
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.targets
index 1dff8890440..ff765c31141 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.targets
@@ -1,6 +1,11 @@
+
+
+ false
+
+
$(__DeployProjectOutput)
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj
index 44834f60188..f56db0fa71d 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj
@@ -34,7 +34,7 @@
-
+
-
+
$(BeforePack);_AddSourcePackageSourceLinkFile
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/RepositoryValidation.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/RepositoryValidation.proj
index 5efc4b438dd..ba32af54e3f 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/RepositoryValidation.proj
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/RepositoryValidation.proj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/RuntimeIdentifierInference.BeforeNETSdkTargets.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/RuntimeIdentifierInference.BeforeNETSdkTargets.targets
index e0d310a92a4..8ec183cd272 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/RuntimeIdentifierInference.BeforeNETSdkTargets.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/RuntimeIdentifierInference.BeforeNETSdkTargets.targets
@@ -1,32 +1,5 @@
-
-
-
- <_IsExecutable Condition="'$(OutputType)' == 'Exe' or '$(OutputType)'=='WinExe'">true
-
-
-
- true
-
-
- $(NETCoreSdkPortableRuntimeIdentifier)
-
-
<_EnableArcadeRuntimeIdentifierInference Condition="'$(_EnableArcadeRuntimeIdentifierInference)' == ''">$(EnableArcadeRuntimeIdentifierInference)
@@ -37,30 +10,41 @@
If the SDK will infer this project as "RID agnostic", don't infer RIDs.
This should generally match the logic for setting IsRidAgnostic in the SDK.
-->
- <_RidAgnosticProject Condition="('$(OutputType)' == 'Library' or '$(IsTestProject)' == 'true') and ('$(RuntimeIdentifiers)' == '' and '$(PublishRuntimeIdentifier)' == '')">true
+ <_RidAgnosticProject Condition="('$(OutputType)' == 'Library' or '$(IsTestProject)' == 'true') and '$(RuntimeIdentifiers)' == ''">true
<_EnableArcadeRuntimeIdentifierInference Condition="'$(_EnableArcadeRuntimeIdentifierInference)' == '' and ('$(IsRidAgnostic)' == 'true' or '$(_RidAgnosticProject)' == 'true')">false
-
- <_BuildFlavorRequiredRid Condition="'$(SelfContained)' == 'true' or '$(PublishRuntimeIdentifier)' != ''">true
+
+ <_BuildFlavorRequiredRid
+ Condition="
+ '$(SelfContained)' == 'true' or
+ ('$(_IsPublishing)' == 'true' and
+ (
+ '$(PublishReadyToRun)' == 'true' or
+ '$(PublishSingleFile)' == 'true' or
+ '$(PublishAot)' == 'true'
+ )
+ )">true
<_EnableArcadeRuntimeIdentifierInference Condition="'$(_EnableArcadeRuntimeIdentifierInference)' == '' and '$(_BuildFlavorRequiredRid)' != 'true'">false
- <_EnableArcadeRuntimeIdentifierInference Condition="'$(_EnableArcadeRuntimeIdentifierInference)' == '' and '$(DotNetBuildTargetRidOnly)' == 'true' and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCurrent)'))">true
+ <_EnableArcadeRuntimeIdentifierInference Condition="'$(_EnableArcadeRuntimeIdentifierInference)' == '' and '$(DotNetBuildTargetRidOnly)' == 'true'">true
<_EnableArcadeRuntimeIdentifierFilters Condition="'$(EnableArcadeRuntimeIdentifierFilters)' != ''">$(EnableArcadeRuntimeIdentifierFilters)
- <_EnableArcadeRuntimeIdentifierFilters Condition="'$(_EnableArcadeRuntimeIdentifierFilters)' == '' and '$(_EnableArcadeRuntimeIdentifierInference)' == 'true'">true
+ <_EnableArcadeRuntimeIdentifierFilters Condition="'$(_EnableArcadeRuntimeIdentifierFilters)' == '' and '$(_EnableArcadeRuntimeIdentifierInference)' == 'true'">$(_EnableArcadeRuntimeIdentifierFilters)
@@ -72,9 +56,9 @@
true
-
+
- <_ExplicitlySpecifiedRuntimeIdentifiers>;$(RuntimeIdentifiers);$(PublishRuntimeIdentifier);
+ <_ExplicitlySpecifiedRuntimeIdentifiers>;$(RuntimeIdentifiers);
- <_SuppressAllTargets Condition="'$(DisableArcadeExcludeFromBuildSupport)' != 'true' and $(_ExplicitlySpecifiedRuntimeIdentifiers.Contains(';$(_FilterRuntimeIdentifier);')) == 'false'">true
+ <_SuppressAllTargets Condition="'$(DisableArcadeExcludeFromBuildSupport)' != 'true' and $(_ExplicitlySpecifiedRuntimeIdentifiers).Contains(';$(_FilterRuntimeIdentifier);')) == 'false'">true
$(RuntimeIdentifier)
-
-
- $(RuntimeIdentifier)
- false
-
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/CreateBaselineUpdatePR.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/CreateBaselineUpdatePR.proj
index c3c1920baaa..2687f94083a 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/CreateBaselineUpdatePR.proj
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/CreateBaselineUpdatePR.proj
@@ -2,7 +2,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetFrameworkToolCurrent)
Publish
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishArtifactsInManifest.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishArtifactsInManifest.proj
index 1c09e11e205..d0c77effc66 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishArtifactsInManifest.proj
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishArtifactsInManifest.proj
@@ -75,7 +75,7 @@
-->
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
Publish
false
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishBuildAssets.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishBuildAssets.proj
index 851fbaaae10..6fbe0aa5c73 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishBuildAssets.proj
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishBuildAssets.proj
@@ -19,7 +19,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetFrameworkToolCurrent)
Publish
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishSignedAssets.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishSignedAssets.proj
index 64464f4785c..83a3e1f12eb 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishSignedAssets.proj
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishSignedAssets.proj
@@ -3,7 +3,7 @@
Publish
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
Publish
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/SigningValidation.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/SigningValidation.proj
index e1d00e97224..c9b5e09585f 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/SigningValidation.proj
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/SigningValidation.proj
@@ -19,7 +19,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
Build
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/VisualStudio.BuildIbcTrainingSettings.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/VisualStudio.BuildIbcTrainingSettings.proj
index cec7c2c0a5c..3b423874bdb 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/VisualStudio.BuildIbcTrainingSettings.proj
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/VisualStudio.BuildIbcTrainingSettings.proj
@@ -20,10 +20,10 @@
- <_VisualStudioBuildTasksAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.visualstudio\$(MicrosoftDotNetBuildTasksVisualStudioVersion)\tools\net\Microsoft.DotNet.Build.Tasks.VisualStudio.dll
+ <_VisualStudioBuildTasksAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.visualstudio\$(MicrosoftDotNetBuildTasksVisualStudioVersion)\tools\netframework\Microsoft.DotNet.Build.Tasks.VisualStudio.dll
-
+
<_OutputFilePath>$(VisualStudioSetupInsertionPath)OptProf\Training.runsettings
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj
index 8049677420e..cf2a163077a 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj
@@ -60,12 +60,10 @@
$(NuGetPackageRoot)sn\$(SNVersion)\sn.exe
-
-
-
+
-
-
+ $(NuGetPackageRoot)microsoft.dotnet.macospkg.cli\$(MicrosoftDotNetMacOsPkgVersion)\tools\$(NetToolCurrent)\any\Microsoft.Dotnet.MacOsPkg.Cli.dll
+
@@ -74,6 +72,7 @@
<_DotNetCorePath>$(DotNetTool)
+
-
- false
+ false
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/SymStore.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/SymStore.targets
index fa8bd14863b..a32bf6dec13 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/SymStore.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/SymStore.targets
@@ -4,7 +4,7 @@
-
+
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetFrameworkDefaults.props b/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetFrameworkDefaults.props
index 1fd3a08a451..33c2fea4ed1 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetFrameworkDefaults.props
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetFrameworkDefaults.props
@@ -10,28 +10,34 @@
-->
-
- net11.0
+
+ net10.0
-
- $(NetCurrent)
+ Undefined when NetMinimum and NetPrevious are identical. -->
+ net9.0
-
- net10.0
- $(NetCurrent)
+
+ net8.0
net481
net462
+
+
+
+
+ net10.0
+ $(NetCurrent)
+
+
+ net8.0
+ $(NetToolCurrent)
net472
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetFrameworkFilters.BeforeCommonTargets.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetFrameworkFilters.BeforeCommonTargets.targets
index 311e242010f..d78e613edd0 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetFrameworkFilters.BeforeCommonTargets.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetFrameworkFilters.BeforeCommonTargets.targets
@@ -4,7 +4,7 @@
- netstandard2.0%3bnetstandard2.1%3bnetcoreapp2.1%3bnetcoreapp3.1%3bnet5.0%3bnet6.0%3bnet7.0%3bnet8.0%3bnet9.0%3bnet10.0%3bnet11.0%3b$(NetCurrent)
+ netstandard2.0%3bnetstandard2.1%3bnetcoreapp2.1%3bnetcoreapp3.1%3bnet5.0%3bnet6.0%3bnet7.0%3bnet8.0%3bnet9.0%3bnet10.0
<_EnableTargetFrameworkFiltering>false
<_EnableTargetFrameworkFiltering Condition="'$(NoTargetFrameworkFiltering)' != 'true' and '$(DotNetTargetFrameworkFilter)' != ''">true
@@ -20,5 +20,71 @@
true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetingPacks.BeforeCommonTargets.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetingPacks.BeforeCommonTargets.targets
deleted file mode 100644
index 90a5318d581..00000000000
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetingPacks.BeforeCommonTargets.targets
+++ /dev/null
@@ -1,158 +0,0 @@
-
-
-
-
- true
-
-
- true
-
-
-
-
-
- $([System.Text.RegularExpressions.Regex]::Match('%(TargetFramework)', '\d+').Value).0.0
-
-
- 6.0.2
-
-
-
-
-
-
-
-
-
-
-
-
- <_BundledAnalyzer Include="$(NetCoreTargetingPackRoot)\Microsoft.NETCore.App.Ref\$(BundledNETCoreAppPackageVersion)\analyzers\dotnet\cs\*.dll" />
-
-
- <_BundledAnalyzerByName Include="@(_BundledAnalyzer->Metadata('FileName'))" OriginalIdentity="%(Identity)" />
- <_AnalyzerByName Include="@(Analyzer->Metadata('FileName'))" />
- <_BundledAnalyzerByName Remove="@(_AnalyzerByName)" />
-
-
-
-
-
-
-
- true
- true
-
- $(NetCurrent)
- $(NetPrevious)
- $(NetMinimum)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- %(RuntimePackRuntimeIdentifiers);$(NETCoreSdkRuntimeIdentifier)
-
-
- %(Crossgen2RuntimeIdentifiers);$(NETCoreSdkRuntimeIdentifier)
-
-
-
-
-
-
- $(KnownFrameworkReferenceMicrosoftNETCoreAppCurrentDefaultRuntimeFrameworkVersion)
- $(KnownFrameworkReferenceMicrosoftNETCoreAppCurrentLatestRuntimeFrameworkVersion)
- $(KnownFrameworkReferenceMicrosoftNETCoreAppCurrentTargetingPackVersion)
-
-
-
- $(KnownRuntimePackMicrosoftNETCoreAppCurrentMonoLatestRuntimeFrameworkVersion)
-
-
-
- $(KnownRuntimePackMicrosoftNETCoreAppCurrentNativeAOTLatestRuntimeFrameworkVersion)
-
-
-
- $(KnownILCompilerPackCurrentVersion)
-
-
-
- $(KnownCrossgen2PackCurrentVersion)
-
-
-
- $(KnownAppHostPackCurrentVersion)
-
-
-
- $(KnownILLinkPackCurrentVersion)
-
-
-
-
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj
index c5ba4421054..bb32919efd8 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj
@@ -3,7 +3,7 @@
-
+
net472
@@ -12,9 +12,6 @@
.NETFramework,Version=v4.7.2
$(BaseIntermediateOutputPath)
- PackageReference
- true
-
true
@@ -37,7 +34,7 @@
-
+
@@ -48,23 +45,24 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -99,10 +97,10 @@
-
+
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Version.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/Version.targets
index fab5620c279..7dbd2411e9c 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Version.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Version.targets
@@ -8,7 +8,7 @@
SemanticVersioningV1 "true" if the Version needs to respect SemVer 1.0. Default is false, which means format following SemVer 2.0.
-->
-
+
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.AcquireOptimizationData.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.AcquireOptimizationData.targets
index 33704816096..9979a784c8c 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.AcquireOptimizationData.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.AcquireOptimizationData.targets
@@ -11,10 +11,10 @@
-->
- <_VisualStudioBuildTasksAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.visualstudio\$(MicrosoftDotNetBuildTasksVisualStudioVersion)\tools\net\Microsoft.DotNet.Build.Tasks.VisualStudio.dll
+ <_VisualStudioBuildTasksAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.visualstudio\$(MicrosoftDotNetBuildTasksVisualStudioVersion)\tools\netframework\Microsoft.DotNet.Build.Tasks.VisualStudio.dll
-
+
true
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.BuildIbcTrainingInputs.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.BuildIbcTrainingInputs.targets
index 39949cff687..d9d6a384058 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.BuildIbcTrainingInputs.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.BuildIbcTrainingInputs.targets
@@ -8,11 +8,11 @@
-->
- <_VisualStudioBuildTasksAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.visualstudio\$(MicrosoftDotNetBuildTasksVisualStudioVersion)\tools\net\Microsoft.DotNet.Build.Tasks.VisualStudio.dll
+ <_VisualStudioBuildTasksAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.visualstudio\$(MicrosoftDotNetBuildTasksVisualStudioVersion)\tools\netframework\Microsoft.DotNet.Build.Tasks.VisualStudio.dll
-
-
+
+
-
+
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.targets
index ab840aae8ae..c408c823b3c 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.targets
@@ -24,8 +24,8 @@
-
-
+
+
diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnitV3/XUnitV3.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnitV3/XUnitV3.targets
index 9fc8dc9e7a4..e8e529cec4a 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnitV3/XUnitV3.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnitV3/XUnitV3.targets
@@ -9,10 +9,10 @@
-
-
-
-
+
+
+
+
diff --git a/src/Microsoft.DotNet.ArcadeAzureIntegration/AzureCliCredentialWithAzNoUpdateWrapper.cs b/src/Microsoft.DotNet.ArcadeAzureIntegration/AzureCliCredentialWithAzNoUpdateWrapper.cs
index 67a03e88b10..1aab8408c4d 100644
--- a/src/Microsoft.DotNet.ArcadeAzureIntegration/AzureCliCredentialWithAzNoUpdateWrapper.cs
+++ b/src/Microsoft.DotNet.ArcadeAzureIntegration/AzureCliCredentialWithAzNoUpdateWrapper.cs
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+#if !NET472_OR_GREATER
+
#nullable enable
using System;
@@ -133,3 +135,5 @@ public override async ValueTask GetTokenAsync(TokenRequestContext r
return await _azureCliCredential.GetTokenAsync(requestContext, cancellationToken);
}
}
+
+#endif
diff --git a/src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredential.cs b/src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredential.cs
index 0447dbc83b7..4d609d3e254 100644
--- a/src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredential.cs
+++ b/src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredential.cs
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+#if !NET472_OR_GREATER
+
#nullable enable
using System;
@@ -172,3 +174,5 @@ private static TokenCredential CreateAvailableTokenCredential(DefaultIdentityTok
return null;
}
}
+
+#endif
diff --git a/src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredentialOptions.cs b/src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredentialOptions.cs
index c854367692a..eb91074ff15 100644
--- a/src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredentialOptions.cs
+++ b/src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredentialOptions.cs
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+#if !NET472_OR_GREATER
+
#nullable enable
namespace Microsoft.DotNet.ArcadeAzureIntegration;
@@ -13,3 +15,5 @@ public class DefaultIdentityTokenCredentialOptions
public bool ExcludeAzureCliCredential { get; set; }
public bool DisableShortCache { get; set; }
}
+
+#endif
diff --git a/src/Microsoft.DotNet.ArcadeAzureIntegration/Microsoft.DotNet.ArcadeAzureIntegration.csproj b/src/Microsoft.DotNet.ArcadeAzureIntegration/Microsoft.DotNet.ArcadeAzureIntegration.csproj
index 7f4307d5dfe..514a08a6c5a 100644
--- a/src/Microsoft.DotNet.ArcadeAzureIntegration/Microsoft.DotNet.ArcadeAzureIntegration.csproj
+++ b/src/Microsoft.DotNet.ArcadeAzureIntegration/Microsoft.DotNet.ArcadeAzureIntegration.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
diff --git a/src/Microsoft.DotNet.ArcadeAzureIntegration/TokenCredentialShortCache.cs b/src/Microsoft.DotNet.ArcadeAzureIntegration/TokenCredentialShortCache.cs
index f84ca91e78e..2f263ece4d6 100644
--- a/src/Microsoft.DotNet.ArcadeAzureIntegration/TokenCredentialShortCache.cs
+++ b/src/Microsoft.DotNet.ArcadeAzureIntegration/TokenCredentialShortCache.cs
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+#if !NET472_OR_GREATER
+
#nullable enable
using System;
@@ -87,3 +89,5 @@ public async ValueTask GetToken(TokenRequestContext requestContext,
}
}
}
+
+#endif
diff --git a/src/Microsoft.DotNet.ArcadeLogging/Microsoft.DotNet.ArcadeLogging.csproj b/src/Microsoft.DotNet.ArcadeLogging/Microsoft.DotNet.ArcadeLogging.csproj
index 8ba87b42b34..66710e1db8f 100644
--- a/src/Microsoft.DotNet.ArcadeLogging/Microsoft.DotNet.ArcadeLogging.csproj
+++ b/src/Microsoft.DotNet.ArcadeLogging/Microsoft.DotNet.ArcadeLogging.csproj
@@ -1,8 +1,7 @@
-
- $(BundledNETCoreAppTargetFramework);$(NetFrameworkToolCurrent)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
diff --git a/src/Microsoft.DotNet.Baselines.Tasks/Microsoft.DotNet.Baselines.Tasks.csproj b/src/Microsoft.DotNet.Baselines.Tasks/Microsoft.DotNet.Baselines.Tasks.csproj
index 87b04d4e9e8..424d6c6c739 100644
--- a/src/Microsoft.DotNet.Baselines.Tasks/Microsoft.DotNet.Baselines.Tasks.csproj
+++ b/src/Microsoft.DotNet.Baselines.Tasks/Microsoft.DotNet.Baselines.Tasks.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
true
true
true
diff --git a/src/Microsoft.DotNet.Baselines.Tasks/build/Microsoft.DotNet.Baselines.Tasks.targets b/src/Microsoft.DotNet.Baselines.Tasks/build/Microsoft.DotNet.Baselines.Tasks.targets
index 2158a0e36bd..192e58623d0 100644
--- a/src/Microsoft.DotNet.Baselines.Tasks/build/Microsoft.DotNet.Baselines.Tasks.targets
+++ b/src/Microsoft.DotNet.Baselines.Tasks/build/Microsoft.DotNet.Baselines.Tasks.targets
@@ -1,10 +1,10 @@
-
- <_MicrosoftDotNetBaselinesTasksDir>$(MSBuildThisFileDirectory)../tools/net/
+ <_MicrosoftDotNetBaselinesTasksDir>$(MSBuildThisFileDirectory)../tools/netframework/
+ <_MicrosoftDotNetBaselinesTasksDir Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)../tools/net/
-
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Archives/Microsoft.DotNet.Build.Tasks.Archives.csproj b/src/Microsoft.DotNet.Build.Tasks.Archives/Microsoft.DotNet.Build.Tasks.Archives.csproj
index ec8a65ac470..03301ff8e12 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Archives/Microsoft.DotNet.Build.Tasks.Archives.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.Archives/Microsoft.DotNet.Build.Tasks.Archives.csproj
@@ -1,9 +1,10 @@
-
+
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
true
true
+ false
Targets for producing an archive of file outputs.
MSBuildSdk
diff --git a/src/Microsoft.DotNet.Build.Tasks.Archives/README.md b/src/Microsoft.DotNet.Build.Tasks.Archives/README.md
index 164873c8b11..6764d5669e1 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Archives/README.md
+++ b/src/Microsoft.DotNet.Build.Tasks.Archives/README.md
@@ -6,25 +6,12 @@ This package generates an archive that can be extracted on top of an existing .N
## Build Skip Support for Unsupported Platforms and Servicing
-This SDK also supports automatically skipping builds on unsupported platforms or in servicing releases. If a project with a list of provided RIDs in `RuntimeIdentifiers` is built with the `RuntimeIdentifier` property set to a RID that is not in the `RuntimeIdentifiers` list, the build will be skipped. This enables cleanly skipping optional packs, installers, or bundles that only exist on specific platforms.
+This SDK also supports automatically skipping builds on unsupported platforms or in servicing releases. If a project with a list of provided RIDs in `RuntimeIdentifiers` is built with the `RuntimeIdentifier` property set to a RID that is not in the `RuntimeIdentifiers` list, the build will be skipped. This enables cleanly skipping optional packs, installers, or bundles that only exist on specific platforms.
Additionally, if a `ProjectServicingConfiguration` item is provided with the identity of the project name and the `PatchVersion` metadata on the item is not equal to the current `PatchVersion`, the build will be skipped. This support enables a repository to disable building targeting packs in servicing releases if that is desired.
-## Archive Formats
+# Creating tar.gz archives on Windows
-The `ArchiveFormat` ItemGroup specifies which archive formats to generate. By default:
-
-- **Windows**: Both `zip` and `tar.gz` archives are generated
-- **Linux/macOS**: Only `tar.gz` archives are generated
-
-The `PublishToDisk` target runs once, then each archive format is created from the same staged output directory.
-
-### Customizing Archive Formats
-
-To customize which formats are generated, define the `ArchiveFormat` ItemGroup in your project:
-
-```xml
-
-
-
-```
+There is an override that you can use to opt into generating tar.gz archives instead of zip archives on Windows to get an consistent experience as with linux and macos.
+That opt-in is setting ``ArchiveFormat`` to ``tar.gz`` on a project that uses this package when building for Windows.
+This can also be used on Linux and MacOS to force creating ``zip`` archives as well.
diff --git a/src/Microsoft.DotNet.Build.Tasks.Archives/build/Microsoft.DotNet.Build.Tasks.Archives.props b/src/Microsoft.DotNet.Build.Tasks.Archives/build/Microsoft.DotNet.Build.Tasks.Archives.props
index 6e5961c01dd..f6a41b80468 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Archives/build/Microsoft.DotNet.Build.Tasks.Archives.props
+++ b/src/Microsoft.DotNet.Build.Tasks.Archives/build/Microsoft.DotNet.Build.Tasks.Archives.props
@@ -1,9 +1,9 @@
-
-
-
-
+
+ zip
+ tar.gz
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Archives/build/archives.targets b/src/Microsoft.DotNet.Build.Tasks.Archives/build/archives.targets
index 606568efd1b..bc5c2486639 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Archives/build/archives.targets
+++ b/src/Microsoft.DotNet.Build.Tasks.Archives/build/archives.targets
@@ -5,8 +5,8 @@
$(BuildDependsOn);
_GetSkipArchivesBuildProps;
- _CreateArchives;
- _CreateSymbolsArchives
+ _CreateArchive;
+ _CreateSymbolsArchive
@@ -87,102 +87,72 @@
-
-
<_OutputPathRoot>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'output'))
+ <_ArchiveFileName>$(ArchiveName)-$(Version)
+ <_ArchiveFileName Condition="'$(RuntimeIdentifier)' != ''">$(ArchiveName)-$(Version)-$(RuntimeIdentifier)
+ <_DestinationFileName>$([MSBuild]::NormalizePath($(PackageOutputPath), '$(_ArchiveFileName).$(ArchiveFormat)'))
-
- <_ArchiveBuildProject Include="$(MSBuildProjectFile)">
-
- _CurrentArchiveFormat=%(ArchiveFormat.Identity);
- _OutputPathRoot=$(_OutputPathRoot)
-
-
-
-
-
-
-
-
-
-
- <_ArchiveFileName>$(ArchiveName)-$(Version)
- <_ArchiveFileName Condition="'$(RuntimeIdentifier)' != ''">$(ArchiveName)-$(Version)-$(RuntimeIdentifier)
- <_DestinationFileName>$([MSBuild]::NormalizePath($(PackageOutputPath), '$(_ArchiveFileName).$(_CurrentArchiveFormat)'))
-
-
+ Condition="'$(ArchiveFormat)' == 'zip'"/>
-
+ Condition="'$(ArchiveFormat)' == 'tar.gz' and '$(_PigzFoundExitCode)' == '0'"/>
-
+ Condition="'$(ArchiveFormat)' == 'tar.gz' and '$(_PigzFoundExitCode)' != '0'"/>
-
-
+
<_SymbolsOutputPathRoot>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'symbols'))
+ <_ArchiveFileName>$(SymbolsArchiveName)-$(Version)
+ <_ArchiveFileName Condition="'$(RuntimeIdentifier)' != ''">$(SymbolsArchiveName)-$(RuntimeIdentifier)-$(Version)
+ <_DestinationFileName>$([MSBuild]::NormalizePath($(PackageOutputPath), '$(_ArchiveFileName).$(ArchiveFormat)'))
-
- <_SymbolsArchiveBuildProject Include="$(MSBuildProjectFile)">
-
- _CurrentArchiveFormat=%(ArchiveFormat.Identity);
- _SymbolsOutputPathRoot=$(_SymbolsOutputPathRoot)
-
-
-
-
-
-
-
-
-
-
- <_ArchiveFileName>$(SymbolsArchiveName)-$(Version)
- <_ArchiveFileName Condition="'$(RuntimeIdentifier)' != ''">$(SymbolsArchiveName)-$(RuntimeIdentifier)-$(Version)
- <_DestinationFileName>$([MSBuild]::NormalizePath($(PackageOutputPath), '$(_ArchiveFileName).$(_CurrentArchiveFormat)'))
-
-
+ Condition="'$(ArchiveFormat)' == 'zip'"/>
-
+ Condition="'$(ArchiveFormat)' == 'tar.gz' and '$(_PigzFoundExitCode)' == '0'"/>
-
+ Condition="'$(ArchiveFormat)' == 'tar.gz' and '$(_PigzFoundExitCode)' != '0'"/>
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/ArtifactUrlHelperTests.cs b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/ArtifactUrlHelperTests.cs
index 33e7ea23b37..096a648dd34 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/ArtifactUrlHelperTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/ArtifactUrlHelperTests.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System;
-using AwesomeAssertions;
+using FluentAssertions;
using Xunit;
using Microsoft.DotNet.Build.Tasks.Feed;
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/DownloadFileTests.cs b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/DownloadFileTests.cs
index 75120e217f5..c1a97909043 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/DownloadFileTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/DownloadFileTests.cs
@@ -8,7 +8,7 @@
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Common;
using Microsoft.Arcade.Test.Common;
using Microsoft.DotNet.Build.Manifest.Tests;
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/GeneralTests.cs b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/GeneralTests.cs
index 8eb36cf1183..afa9d0642c1 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/GeneralTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/GeneralTests.cs
@@ -7,7 +7,7 @@
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Test.Common;
using Microsoft.DotNet.Build.Tasks.Feed.Model;
using Microsoft.DotNet.Build.Tasks.Feed.Tests.TestDoubles;
@@ -37,23 +37,6 @@ public void ChannelConfigsHaveAllConfigs()
}
}
- [Theory]
- [InlineData(8103)]
- [InlineData(8104)]
- [InlineData(8105)]
- public void AspireChannelsAllowOnlyGetAspireCliInstallScripts(int channelId)
- {
- var channelConfig = PublishingConstants.ChannelInfos.Single(c => c.Id == channelId);
-
- channelConfig.AkaMSCreateLinkPatterns.Any(pattern => pattern.IsMatch("assets/installers/foo.zip")).Should().BeTrue();
- channelConfig.AkaMSCreateLinkPatterns.Any(pattern => pattern.IsMatch("assets/installers/get-aspire-cli.ps1")).Should().BeTrue();
- channelConfig.AkaMSCreateLinkPatterns.Any(pattern => pattern.IsMatch("assets/installers/get-aspire-cli.ps1.sha512")).Should().BeTrue();
- channelConfig.AkaMSCreateLinkPatterns.Any(pattern => pattern.IsMatch("assets/installers/get-aspire-cli.sh")).Should().BeTrue();
- channelConfig.AkaMSCreateLinkPatterns.Any(pattern => pattern.IsMatch("assets/installers/get-aspire-cli.sh.sha512")).Should().BeTrue();
- channelConfig.AkaMSCreateLinkPatterns.Any(pattern => pattern.IsMatch("assets/installers/install-other-tool.ps1")).Should().BeFalse();
- channelConfig.AkaMSCreateLinkPatterns.Any(pattern => pattern.IsMatch("assets/installers/install-other-tool.sh")).Should().BeFalse();
- }
-
[Theory]
[InlineData("foo/bar/baz/bop.symbols.nupkg", true)]
[InlineData("foo/bar/baz/bop.symbols.nupkg.sha512", false)]
@@ -281,28 +264,5 @@ public void TargetChannelConfig_TargetFeeds_UnequalTest()
actualResult.Should().BeFalse();
}
-
- [Theory]
- [InlineData("https://dotnetcli.blob.core.windows.net/test", "https://builds.dotnet.microsoft.com/test")]
- [InlineData("https://dotnetbuilds.blob.core.windows.net/internal", "https://ci.dot.net/internal")]
- [InlineData("https://dotnetbuilds.blob.core.windows.net/public?sv=token", "https://ci.dot.net/public")]
- [InlineData("https://unknown.blob.core.windows.net/test", "https://unknown.blob.core.windows.net/test")]
- [InlineData("https://pkgs.dev.azure.com/dnceng/public/_packaging/feed/nuget/v3/index.json", "https://pkgs.dev.azure.com/dnceng/public/_packaging/feed/nuget/v3/index.json")]
- public void TargetFeedConfig_SafeTargetURL_AppliesCdnSubstitution(string targetUrl, string expectedSafeUrl)
- {
- // Arrange
- var feedConfig = new TargetFeedConfig(
- contentType: TargetFeedContentType.Installer,
- targetURL: targetUrl,
- type: FeedType.AzureStorageContainer,
- token: "dummyToken"
- );
-
- // Act
- var actualSafeUrl = feedConfig.SafeTargetURL;
-
- // Assert
- actualSafeUrl.Should().Be(expectedSafeUrl);
- }
}
}
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/LatestLinksManagerTests.cs b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/LatestLinksManagerTests.cs
index bf782ca0891..5c0ffcd7f54 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/LatestLinksManagerTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/LatestLinksManagerTests.cs
@@ -6,7 +6,7 @@
using System.Collections.Immutable;
using System.Linq;
using System.Text.RegularExpressions;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Test.Common;
using Microsoft.Build.Utilities;
using Microsoft.DotNet.Build.Tasks.Feed.Model;
@@ -221,47 +221,5 @@ public void GetLatestLinksToCreate_NonFlattenedShouldNotFlatten()
new AkaMSLink("prefix2/assets/plop/Microsoft.stuff.json.zip", "https://example.com/feed/assets/plop/Microsoft.stuff.json.zip")
});
}
-
- [Fact]
- public void GetLatestLinksToCreate_RestrictedInstallScriptPatternShouldOnlyIncludeGetAspireCli()
- {
- var taskLoggingHelper = new TaskLoggingHelper(new StubTask());
- var assetsToPublish = new HashSet
- {
- "assets/installers/get-aspire-cli.ps1",
- "assets/installers/get-aspire-cli.ps1.sha512",
- "assets/installers/get-aspire-cli.sh",
- "assets/installers/get-aspire-cli.sh.sha512",
- "assets/installers/install-other-tool.ps1",
- "assets/installers/install-other-tool.sh",
- };
- var feedConfig = new TargetFeedConfig(
- contentType: TargetFeedContentType.Other,
- targetURL: "https://example.com/feed",
- type: FeedType.AzureStorageContainer,
- token: "",
- latestLinkShortUrlPrefixes: ImmutableList.Create("dotnet/9/aspire/rc/daily"),
- akaMSCreateLinkPatterns: PublishingConstants.AspireAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: [],
- assetSelection: AssetSelection.All,
- isolated: false,
- @internal: false,
- allowOverwrite: false,
- symbolPublishVisibility: SymbolPublishVisibility.None,
- flatten: true
- );
-
- var manager = new LatestLinksManager("clientId", null, "tenant", "groupOwner", "createdBy", "owners", taskLoggingHelper);
-
- var links = manager.GetLatestLinksToCreate(assetsToPublish, feedConfig, "https://example.com/feed/");
-
- links.Should().BeEquivalentTo(new List
- {
- new AkaMSLink("dotnet/9/aspire/rc/daily/get-aspire-cli.ps1", "https://example.com/feed/assets/installers/get-aspire-cli.ps1"),
- new AkaMSLink("dotnet/9/aspire/rc/daily/get-aspire-cli.ps1.sha512", "https://example.com/feed/assets/installers/get-aspire-cli.ps1.sha512"),
- new AkaMSLink("dotnet/9/aspire/rc/daily/get-aspire-cli.sh", "https://example.com/feed/assets/installers/get-aspire-cli.sh"),
- new AkaMSLink("dotnet/9/aspire/rc/daily/get-aspire-cli.sh.sha512", "https://example.com/feed/assets/installers/get-aspire-cli.sh.sha512"),
- });
- }
}
}
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/Microsoft.DotNet.Build.Tasks.Feed.Tests.csproj b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/Microsoft.DotNet.Build.Tasks.Feed.Tests.csproj
index 37b966d0379..7b091823dbe 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/Microsoft.DotNet.Build.Tasks.Feed.Tests.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/Microsoft.DotNet.Build.Tasks.Feed.Tests.csproj
@@ -1,12 +1,12 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
false
-
+
@@ -21,6 +21,11 @@
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/ProductionChannelValidatorTests.cs b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/ProductionChannelValidatorTests.cs
index bdfd15efd93..ece57d4bd3d 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/ProductionChannelValidatorTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/ProductionChannelValidatorTests.cs
@@ -6,7 +6,7 @@
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.DotNet.Build.Tasks.Feed.Model;
using Microsoft.DotNet.Build.Manifest;
using Microsoft.Extensions.Logging;
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PublishArtifactsInManifestTests.cs b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PublishArtifactsInManifestTests.cs
index 1c59370ecd5..4b150806a7d 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PublishArtifactsInManifestTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PublishArtifactsInManifestTests.cs
@@ -9,7 +9,7 @@
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Common;
using Microsoft.Arcade.Test.Common;
using Microsoft.DotNet.Build.Manifest;
@@ -333,7 +333,7 @@ await task.PushNugetPackageAsync(
if (!expectedFailure && localPackageMatchesFeed)
{
// Successful retry scenario; make sure we ran the # of retries we thought.
- timesCalled.Should().BeLessThanOrEqualTo(task.MaxRetryCount);
+ timesCalled.Should().BeLessOrEqualTo(task.MaxRetryCount);
}
expectedFailure.Should().Be(task.Log.HasLoggedErrors);
}
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PublishBuildToMaestroTests.cs b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PublishBuildToMaestroTests.cs
index 59636478869..64623a4efc4 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PublishBuildToMaestroTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PublishBuildToMaestroTests.cs
@@ -3,7 +3,7 @@
using System;
using System.Net;
-using AwesomeAssertions;
+using FluentAssertions;
using Xunit;
namespace Microsoft.DotNet.Build.Tasks.Feed.Tests
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PushToBuildStorageTests.cs b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PushToBuildStorageTests.cs
index cb8c9fe78d8..d6b9788f4f4 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PushToBuildStorageTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/PushToBuildStorageTests.cs
@@ -8,7 +8,7 @@
using System.Linq;
using System.Text;
using System.Xml.Linq;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Common;
using Microsoft.Arcade.Test.Common;
using Microsoft.Build.Utilities;
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/SetupTargetFeedConfigV3Tests.cs b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/SetupTargetFeedConfigV3Tests.cs
index 415220de981..461ca229999 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/SetupTargetFeedConfigV3Tests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/SetupTargetFeedConfigV3Tests.cs
@@ -5,7 +5,7 @@
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Test.Common;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/SetupTargetFeedConfigV4Tests.cs b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/SetupTargetFeedConfigV4Tests.cs
index 7470b2ac354..e43bdc96cf3 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/SetupTargetFeedConfigV4Tests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed.Tests/SetupTargetFeedConfigV4Tests.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Test.Common;
using Microsoft.DotNet.Build.Tasks.Feed.Model;
using System.Collections.Generic;
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/Microsoft.DotNet.Build.Tasks.Feed.csproj b/src/Microsoft.DotNet.Build.Tasks.Feed/Microsoft.DotNet.Build.Tasks.Feed.csproj
index adb882fef1f..f3cb15a12eb 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed/Microsoft.DotNet.Build.Tasks.Feed.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed/Microsoft.DotNet.Build.Tasks.Feed.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
true
false
This package provides support for publishing assets to appropriate channels.
@@ -23,7 +23,7 @@
-
+
@@ -34,11 +34,19 @@
the symbol publishing doesn't run on framework anyway (this project has a throwing stub for .NET framework in that path
due to the reliance in maestro). Until we really need to multitarget, this is the better path. -->
+
+
+
+
+
+
+
@@ -47,8 +55,8 @@
-
-
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/build/Microsoft.DotNet.Build.Tasks.Feed.targets b/src/Microsoft.DotNet.Build.Tasks.Feed/build/Microsoft.DotNet.Build.Tasks.Feed.targets
index 05579d54b39..9b7f8eb8a71 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed/build/Microsoft.DotNet.Build.Tasks.Feed.targets
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed/build/Microsoft.DotNet.Build.Tasks.Feed.targets
@@ -43,14 +43,15 @@
-->
- <_MicrosoftDotNetBuildTasksFeedTaskDir>$(MSBuildThisFileDirectory)../tools/net/
+ <_MicrosoftDotNetBuildTasksFeedTaskDir>$(MSBuildThisFileDirectory)../tools/netframework/
+ <_MicrosoftDotNetBuildTasksFeedTaskDir Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)../tools/net/
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifest.cs b/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifest.cs
index b3429746a2e..480d5985395 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifest.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifest.cs
@@ -389,7 +389,11 @@ internal PublishArtifactsInManifestBase ConstructPublishingV3Task(BuildModel bui
SkipSafetyChecks = this.SkipSafetyChecks,
AkaMSClientId = this.AkaMSClientId,
AkaMSClientCertificate = !string.IsNullOrEmpty(AkaMSClientCertificate) ?
+#if NET9_0_OR_GREATER
X509CertificateLoader.LoadPkcs12(Convert.FromBase64String(File.ReadAllText(AkaMSClientCertificate)), password: null) : null,
+#else
+ new X509Certificate2(Convert.FromBase64String(File.ReadAllText(AkaMSClientCertificate))) : null,
+#endif
AkaMSCreatedBy = this.AkaMSCreatedBy,
AkaMSGroupOwner = this.AkaMSGroupOwner,
AkaMsOwners = this.AkaMsOwners,
@@ -435,7 +439,11 @@ internal PublishArtifactsInManifestBase ConstructPublishingV4Task(BuildModel bui
SkipSafetyChecks = this.SkipSafetyChecks,
AkaMSClientId = this.AkaMSClientId,
AkaMSClientCertificate = !string.IsNullOrEmpty(AkaMSClientCertificate) ?
+#if NET9_0_OR_GREATER
X509CertificateLoader.LoadPkcs12(Convert.FromBase64String(File.ReadAllText(AkaMSClientCertificate)), password: null) : null,
+#else
+ new X509Certificate2(Convert.FromBase64String(File.ReadAllText(AkaMSClientCertificate))) : null,
+#endif
AkaMSCreatedBy = this.AkaMSCreatedBy,
AkaMSGroupOwner = this.AkaMSGroupOwner,
AkaMsOwners = this.AkaMsOwners,
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishBuildToMaestro.cs b/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishBuildToMaestro.cs
index e3249051803..80e05cb284a 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishBuildToMaestro.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishBuildToMaestro.cs
@@ -12,7 +12,6 @@
using System.Threading.Tasks;
using System.Xml.Linq;
using System.Xml.Serialization;
-using Maestro.Common;
using Microsoft.Arcade.Common;
using Microsoft.Build.Framework;
using Microsoft.DotNet.DarcLib;
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/src/common/LatestLinksManager.cs b/src/Microsoft.DotNet.Build.Tasks.Feed/src/common/LatestLinksManager.cs
index cf5a509ac58..d2e63487485 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed/src/common/LatestLinksManager.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed/src/common/LatestLinksManager.cs
@@ -22,6 +22,12 @@ public class LatestLinksManager
private string _akaMSCreatedBy { get; }
private string _akaMSGroupOwner { get; }
+ private static Dictionary AccountsWithCdns { get; } = new()
+ {
+ {"dotnetcli.blob.core.windows.net", "builds.dotnet.microsoft.com" },
+ {"dotnetbuilds.blob.core.windows.net", "ci.dot.net" }
+ };
+
public LatestLinksManager(
string akaMSClientId,
X509Certificate2 certificate,
@@ -100,6 +106,14 @@ public static string ComputeLatestLinkBase(TargetFeedConfig feedConfig)
{
feedBaseUrl += "/";
}
+ var authority = new Uri(feedBaseUrl).Authority;
+ if (AccountsWithCdns.TryGetValue(authority, out var replacementAuthority))
+ {
+ // The storage accounts are in a single datacenter in the US and thus download
+ // times can be painful elsewhere. The CDN helps with this therefore we point the target
+ // of the aka.ms links to the CDN.
+ feedBaseUrl = feedBaseUrl.Replace(authority, replacementAuthority);
+ }
return feedBaseUrl;
}
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/src/common/NativeMethods.cs b/src/Microsoft.DotNet.Build.Tasks.Feed/src/common/NativeMethods.cs
index daaa643f1b5..7eaa76db72a 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed/src/common/NativeMethods.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed/src/common/NativeMethods.cs
@@ -3,18 +3,30 @@
using System;
using System.Runtime.InteropServices;
+#if NET
using System.Runtime.InteropServices.Marshalling;
+#endif
namespace Microsoft.DotNet.Build.Tasks.Feed
{
internal partial class NativeMethods
{
+#if NET
[LibraryImport("kernel32.dll", EntryPoint = "CreateHardLinkW", SetLastError = true, StringMarshalling = StringMarshalling.Utf16)]
[return: MarshalAs(UnmanagedType.Bool)]
internal static partial bool CreateHardLink(string newFileName, string exitingFileName, IntPtr securityAttributes);
+#else
+ [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+ internal static extern bool CreateHardLink(string newFileName, string exitingFileName, IntPtr securityAttributes);
+#endif
+#if NET
[LibraryImport("libc", SetLastError = true, StringMarshalling = StringMarshalling.Utf16)]
internal static partial int link(string oldpath, string newpath);
+#else
+ [DllImport("libc", SetLastError = true)]
+ internal static extern int link(string oldpath, string newpath);
+#endif
internal static bool MakeHardLink(string newFileName, string exitingFileName, ref string errorMessage)
{
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/PublishingConstants.cs b/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/PublishingConstants.cs
index cdb6fe4b89e..87aa7803983 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/PublishingConstants.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/PublishingConstants.cs
@@ -13,16 +13,6 @@ public class PublishingConstants
{
public static readonly string ExpectedFeedUrlSuffix = "index.json";
- ///
- /// Mapping of Azure storage accounts to their corresponding CDN URLs.
- /// Used to replace blob storage URLs with CDN URLs for both aka.ms links and asset locations.
- ///
- public static readonly Dictionary AccountsWithCdns = new()
- {
- {"dotnetcli.blob.core.windows.net", "builds.dotnet.microsoft.com" },
- {"dotnetbuilds.blob.core.windows.net", "ci.dot.net" }
- };
-
// Matches package feeds like
// https://pkgs.dev.azure.com/dnceng/public/_packaging/public-feed-name/nuget/v3/index.json
// or https://pkgs.dev.azure.com/dnceng/_packaging/internal-feed-name/nuget/v3/index.json
@@ -104,8 +94,6 @@ public enum BuildQuality
public const string FeedDotNetEng = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json";
- private const string FeedDotNetEngInternal = "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-eng-internal/nuget/v3/index.json";
-
private const string FeedDotNetTools = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json";
private const string FeedDotNetToolsInternal = "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json";
@@ -237,16 +225,8 @@ public enum BuildQuality
private static TargetFeedSpecification[] DotNet10InternalFeeds =
{
- (TargetFeedContentType.Package, FeedDotNet10InternalShipping, AssetSelection.ShippingOnly),
- (TargetFeedContentType.Package, FeedDotNet10InternalTransport, AssetSelection.NonShippingOnly),
- (TargetFeedContentType.InfrastructurePackage, FeedDotNetEngInternal, AssetSelection.ShippingOnly),
- (TargetFeedContentType.InfrastructurePackage, FeedDotNetEngInternal, AssetSelection.NonShippingOnly),
- (TargetFeedContentType.CorePackage, FeedDotNet10InternalShipping, AssetSelection.ShippingOnly),
- (TargetFeedContentType.CorePackage, FeedDotNet10InternalTransport, AssetSelection.NonShippingOnly),
- (TargetFeedContentType.LibraryPackage, FeedDotNetLibrariesInternalShipping, AssetSelection.ShippingOnly),
- (TargetFeedContentType.LibraryPackage, FeedDotNetLibrariesInternalTransport, AssetSelection.NonShippingOnly),
- (TargetFeedContentType.ToolingPackage, FeedDotNetToolsInternal, AssetSelection.ShippingOnly),
- (TargetFeedContentType.ToolingPackage, FeedDotNetToolsInternal, AssetSelection.NonShippingOnly),
+ (Packages, FeedDotNet10InternalShipping, AssetSelection.ShippingOnly),
+ (Packages, FeedDotNet10InternalTransport, AssetSelection.NonShippingOnly),
(InstallersAndSymbols, FeedStagingInternalForInstallers),
(TargetFeedContentType.Checksum, FeedStagingInternalForChecksums),
};
@@ -374,12 +354,6 @@ public enum BuildQuality
new Regex(@"productversion", RegexOptions.IgnoreCase)
];
- public static readonly ImmutableList AspireAkaMSCreateLinkPatterns =
- [
- ..DefaultAkaMSCreateLinkPatterns,
- new Regex(@"(^|[\\/])get-aspire-cli\.(ps1|sh)(\.sha512)?$", RegexOptions.IgnoreCase)
- ];
-
public static readonly ImmutableList DefaultAkaMSDoNotCreateLinkPatterns =
[
new Regex(@"wixpack", RegexOptions.IgnoreCase),
@@ -640,17 +614,6 @@ public enum BuildQuality
targetFeeds: DotNet8InternalFeeds,
symbolTargetType: SymbolPublishVisibility.Internal),
- // .NET 8 HotFix Internal,
- new TargetChannelConfig(
- id: 8624,
- isInternal: true,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/8.0-hotfix"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet8InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
-
// .NET 8.0.1xx SDK,
new TargetChannelConfig(
id: 3074,
@@ -673,17 +636,6 @@ public enum BuildQuality
targetFeeds: DotNet8InternalFeeds,
symbolTargetType: SymbolPublishVisibility.Internal),
- // .NET 8.0.1xx SDK HotFix Internal,
- new TargetChannelConfig(
- id: 8625,
- isInternal: true,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/8.0.1xx-hotfix"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet8InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
-
// .NET 8.0.2xx SDK,
new TargetChannelConfig(
id: 4036,
@@ -728,17 +680,6 @@ public enum BuildQuality
targetFeeds: DotNet8InternalFeeds,
symbolTargetType: SymbolPublishVisibility.Internal),
- // .NET 8.0.3xx SDK HotFix Internal,
- new TargetChannelConfig(
- id: 8627,
- isInternal: true,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/8.0.3xx-hotfix"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet8InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
-
// .NET 8.0.4xx SDK,
new TargetChannelConfig(
id: 4586,
@@ -761,17 +702,6 @@ public enum BuildQuality
targetFeeds: DotNet8InternalFeeds,
symbolTargetType: SymbolPublishVisibility.Internal),
- // .NET 8.0.4xx SDK HotFix Internal,
- new TargetChannelConfig(
- id: 8628,
- isInternal: true,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/8.0.4xx-hotfix"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet8InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
-
#endregion
#region .NET 9 Channels
@@ -832,17 +762,6 @@ public enum BuildQuality
targetFeeds: DotNet9InternalFeeds,
symbolTargetType: SymbolPublishVisibility.Internal),
- // .NET 9 HotFix Internal,
- new TargetChannelConfig(
- id: 8629,
- isInternal: true,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/9.0-hotfix"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet9InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
-
// .NET 9 Workload Release,
new TargetChannelConfig(
id: 4611,
@@ -876,17 +795,6 @@ public enum BuildQuality
targetFeeds: DotNet9InternalFeeds,
symbolTargetType: SymbolPublishVisibility.Internal),
- // .NET 9.0.1xx SDK HotFix Internal,
- new TargetChannelConfig(
- id: 8630,
- isInternal: true,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/9.0.1xx-hotfix"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet9InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
-
// .NET 9.0.2xx SDK,
new TargetChannelConfig(
id: 5286,
@@ -931,17 +839,6 @@ public enum BuildQuality
targetFeeds: DotNet9InternalFeeds,
symbolTargetType: SymbolPublishVisibility.Internal),
- // .NET 9.0.3xx SDK HotFix Internal,
- new TargetChannelConfig(
- id: 8632,
- isInternal: true,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/9.0.3xx-hotfix"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet9InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
-
#endregion
#region .NET 10 Channels
@@ -957,28 +854,6 @@ public enum BuildQuality
targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 10 Internal,
- new TargetChannelConfig(
- id: 5177,
- isInternal: true,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/10.0"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet10InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
-
- // .NET 10 Private,
- new TargetChannelConfig(
- id: 8710,
- isInternal: true,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/10.0-private"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet10InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
-
// .NET 10 Eng,
new TargetChannelConfig(
id: 8394,
@@ -1024,133 +899,111 @@ public enum BuildQuality
targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 10.0.1xx SDK Release,
+ // .NET 10 UB,
new TargetChannelConfig(
- id: 8859,
+ id: 5708,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [ "10.0.1xx-release", "10.0-release" ],
+ akaMSChannelNames: ["10.0.1xx-ub", "10.0-ub"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 10.0.1xx SDK Internal,
- new TargetChannelConfig(
- id: 5178,
- isInternal: true,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/10.0.1xx", "internal/10.0"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet10InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
-
- // .NET 10.0.1xx SDK Release Internal,
+ // .NET 10 Preview 1,
new TargetChannelConfig(
- id: 8858,
- isInternal: true,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/10.0.1xx-release", "internal/10.0-release"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet10InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
-
- // .NET 10.0.1xx SDK HotFix Internal,
- new TargetChannelConfig(
- id: 9399,
- isInternal: true,
+ id: 6545,
+ isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/10.0.1xx-hotfix"],
+ akaMSChannelNames: ["10.0-preview1"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet10InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
+ targetFeeds: DotNet10Feeds,
+ symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 10.0.2xx SDK,
+ // .NET 10 Preview 2,
new TargetChannelConfig(
- id: 8856,
+ id: 6547,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [ "10.0.2xx", "10.0" ],
+ akaMSChannelNames: ["10.0-preview2"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 10.0.2xx SDK Release,
+ // .NET 10 Preview 3,
new TargetChannelConfig(
- id: 8860,
+ id: 6549,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [ "10.0.2xx-release" ],
+ akaMSChannelNames: ["10.0-preview3"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 10.0.2xx SDK Internal,
+ // .NET 10 Preview 4,
new TargetChannelConfig(
- id: 8857,
- isInternal: true,
+ id: 6551,
+ isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/10.0.2xx"],
+ akaMSChannelNames: ["10.0-preview4"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet10InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
+ targetFeeds: DotNet10Feeds,
+ symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 10.0.2xx SDK Internal,
+ // .NET 10 Preview 5,
new TargetChannelConfig(
- id: 8861,
- isInternal: true,
+ id: 6553,
+ isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/10.0.2xx-release"],
+ akaMSChannelNames: ["10.0-preview5"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet10InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
+ targetFeeds: DotNet10Feeds,
+ symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 10.0.2xx SDK HotFix Internal,
+ // .NET 10 Preview 6,
new TargetChannelConfig(
- id: 9400,
- isInternal: true,
+ id: 6555,
+ isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/10.0.2xx-hotfix"],
+ akaMSChannelNames: ["10.0-preview6"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet10InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
+ akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
+ targetFeeds: DotNet10Feeds,
+ symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 10.0.3xx SDK,
+ // .NET 10 Preview 7,
new TargetChannelConfig(
- id: 9626,
+ id: 6557,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [ "10.0.3xx", "10.0" ],
+ akaMSChannelNames: ["10.0-preview7"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 10.0.3xx SDK Internal,
+ // .NET 10 RC 1,
new TargetChannelConfig(
- id: 9627,
- isInternal: true,
+ id: 6494,
+ isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/10.0.3xx", "internal/10.0"],
+ akaMSChannelNames: ["10.0-rc1"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet10InternalFeeds,
- symbolTargetType: SymbolPublishVisibility.Internal),
+ targetFeeds: DotNet10Feeds,
+ symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 10.0.3xx SDK HotFix Internal,
+ // .NET 10 RC 1 Internal,
new TargetChannelConfig(
- id: 9401,
+ id: 6496,
isInternal: true,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/10.0.3xx-hotfix"],
+ akaMSChannelNames: ["internal/10.0-rc1"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
targetFeeds: DotNet10InternalFeeds,
@@ -1178,217 +1031,162 @@ public enum BuildQuality
targetFeeds: DotNet10InternalFeeds,
symbolTargetType: SymbolPublishVisibility.Internal),
- // .NET 10.0.1xx RC 2,
+ // .NET 10.0.1xx RC 1,
new TargetChannelConfig(
- id: 6577,
+ id: 6573,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["10.0.1xx-rc2"],
+ akaMSChannelNames: ["10.0.1xx-rc1"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 10.0.1xx RC 2 Internal,
+ // .NET 10.0.1xx RC 1 Internal,
new TargetChannelConfig(
- id: 6579,
+ id: 6575,
isInternal: true,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["internal/10.0.1xx-rc2"],
+ akaMSChannelNames: ["internal/10.0.1xx-rc1"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
targetFeeds: DotNet10InternalFeeds,
symbolTargetType: SymbolPublishVisibility.Internal),
- #endregion
-
- #region .NET 11 Channels
-
- // .NET 11,
- new TargetChannelConfig(
- id: 8297,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
- symbolTargetType: SymbolPublishVisibility.Public),
-
- // .NET 11 Workload Release,
- new TargetChannelConfig(
- id: 8299,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [ "11.0-workloads" ],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11WorkloadFeeds,
- symbolTargetType: SymbolPublishVisibility.Public),
-
- // .NET 11.0.1xx SDK,
- new TargetChannelConfig(
- id: 8298,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [ "11.0.1xx", "11.0" ],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
- symbolTargetType: SymbolPublishVisibility.Public),
-
- // .NET 11 Preview 1,
+ // .NET 10.0.1xx RC 2,
new TargetChannelConfig(
- id: 9581,
+ id: 6577,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0-preview1"],
+ akaMSChannelNames: ["10.0.1xx-rc2"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
+ targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 11.0.1xx SDK Preview 1,
+ // .NET 10.0.1xx RC 2 Internal,
new TargetChannelConfig(
- id: 9582,
- isInternal: false,
+ id: 6579,
+ isInternal: true,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0.1xx-preview1"],
+ akaMSChannelNames: ["internal/10.0.1xx-rc2"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
- symbolTargetType: SymbolPublishVisibility.Public),
+ targetFeeds: DotNet10InternalFeeds,
+ symbolTargetType: SymbolPublishVisibility.Internal),
- // .NET 11 Preview 2,
+ // .NET 10.0.1xx SDK Preview 1,
new TargetChannelConfig(
- id: 9583,
+ id: 6476,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0-preview2"],
+ akaMSChannelNames: ["10.0.1xx-preview1"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
+ targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 11.0.1xx SDK Preview 2,
+ // .NET 10.0.1xx SDK Preview 2,
new TargetChannelConfig(
- id: 9584,
+ id: 6478,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0.1xx-preview2"],
+ akaMSChannelNames: ["10.0.1xx-preview2"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
+ targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 11 Preview 3,
+ // .NET 10.0.1xx SDK Preview 3,
new TargetChannelConfig(
- id: 9585,
+ id: 6484,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0-preview3"],
+ akaMSChannelNames: ["10.0.1xx-preview3"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
+ targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 11.0.1xx SDK Preview 3,
+ // .NET 10.0.1xx SDK Preview 4,
new TargetChannelConfig(
- id: 9586,
+ id: 6486,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0.1xx-preview3"],
+ akaMSChannelNames: ["10.0.1xx-preview4"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
+ targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 11 Preview 4,
+ // .NET 10.0.1xx SDK Preview 5,
new TargetChannelConfig(
- id: 9587,
+ id: 6488,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0-preview4"],
+ akaMSChannelNames: ["10.0.1xx-preview5"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
+ targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 11.0.1xx SDK Preview 4,
+ // .NET 10.0.1xx SDK Preview 6,
new TargetChannelConfig(
- id: 9588,
+ id: 6490,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0.1xx-preview4"],
+ akaMSChannelNames: ["10.0.1xx-preview6"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
+ targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 11 Preview 5,
+ // .NET 10.0.1xx SDK Preview 7,
new TargetChannelConfig(
- id: 9589,
+ id: 6492,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0-preview5"],
+ akaMSChannelNames: ["10.0.1xx-preview7"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
+ targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 11.0.1xx SDK Preview 5,
- new TargetChannelConfig(
- id: 9590,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0.1xx-preview5"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
- symbolTargetType: SymbolPublishVisibility.Public),
+ #endregion
- // .NET 11 Preview 6,
- new TargetChannelConfig(
- id: 9591,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0-preview6"],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
- symbolTargetType: SymbolPublishVisibility.Public),
+ #region .NET 11 Channels
- // .NET 11.0.1xx SDK Preview 6,
+ // .NET 11,
new TargetChannelConfig(
- id: 9592,
+ id: 8297,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0.1xx-preview6"],
+ akaMSChannelNames: ["11.0"],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
targetFeeds: DotNet11Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 11 Preview 7,
+ // .NET 11 Workload Release,
new TargetChannelConfig(
- id: 9593,
+ id: 8299,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0-preview7"],
+ akaMSChannelNames: [ "11.0-workloads" ],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
+ targetFeeds: DotNet11WorkloadFeeds,
symbolTargetType: SymbolPublishVisibility.Public),
- // .NET 11.0.1xx SDK Preview 7,
+ // .NET 11.0.1xx SDK,
new TargetChannelConfig(
- id: 9594,
+ id: 8298,
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: ["11.0.1xx-preview7"],
+ akaMSChannelNames: [ "11.0.1xx", "11.0" ],
akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: UnifiedBuildAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNet11Feeds,
+ targetFeeds: DotNet10Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
#endregion
@@ -1569,7 +1367,7 @@ public enum BuildQuality
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
akaMSChannelNames: ["9/aspire"],
- akaMSCreateLinkPatterns: AspireAkaMSCreateLinkPatterns,
+ akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
targetFeeds: DotNet9Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
@@ -1580,7 +1378,7 @@ public enum BuildQuality
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
akaMSChannelNames: ["9/aspire/rc"],
- akaMSCreateLinkPatterns: AspireAkaMSCreateLinkPatterns,
+ akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
targetFeeds: DotNet9Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
@@ -1591,7 +1389,7 @@ public enum BuildQuality
isInternal: false,
publishingInfraVersion: PublishingInfraVersion.Latest,
akaMSChannelNames: ["9/aspire/ga"],
- akaMSCreateLinkPatterns: AspireAkaMSCreateLinkPatterns,
+ akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
targetFeeds: DotNet9Feeds,
symbolTargetType: SymbolPublishVisibility.Public),
@@ -1898,126 +1696,7 @@ public enum BuildQuality
targetFeeds: DotNetToolsFeeds,
symbolTargetType: SymbolPublishVisibility.Public,
flatten: false),
-
- // 18.1
- new TargetChannelConfig(
- id: 8703,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNetToolsFeeds,
- symbolTargetType: SymbolPublishVisibility.Public,
- flatten: false),
-
- // 18.2
- new TargetChannelConfig(
- id: 8704,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNetToolsFeeds,
- symbolTargetType: SymbolPublishVisibility.Public,
- flatten: false),
-
- // 18.3
- new TargetChannelConfig(
- id: 8705,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNetToolsFeeds,
- symbolTargetType: SymbolPublishVisibility.Public,
- flatten: false),
-
- // 18.4
- new TargetChannelConfig(
- id: 8706,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNetToolsFeeds,
- symbolTargetType: SymbolPublishVisibility.Public,
- flatten: false),
-
- // 18.5
- new TargetChannelConfig(
- id: 8707,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNetToolsFeeds,
- symbolTargetType: SymbolPublishVisibility.Public,
- flatten: false),
-
- // 18.6
- new TargetChannelConfig(
- id: 8708,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNetToolsFeeds,
- symbolTargetType: SymbolPublishVisibility.Public,
- flatten: false),
-
- // 18.7
- new TargetChannelConfig(
- id: 10189,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNetToolsFeeds,
- symbolTargetType: SymbolPublishVisibility.Public,
- flatten: false),
-
- // 18.8
- new TargetChannelConfig(
- id: 10188,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNetToolsFeeds,
- symbolTargetType: SymbolPublishVisibility.Public,
- flatten: false),
-
- // 18.9
- new TargetChannelConfig(
- id: 10190,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNetToolsFeeds,
- symbolTargetType: SymbolPublishVisibility.Public,
- flatten: false),
-
- // 18.10
- new TargetChannelConfig(
- id: 10191,
- isInternal: false,
- publishingInfraVersion: PublishingInfraVersion.Latest,
- akaMSChannelNames: [],
- akaMSCreateLinkPatterns: DefaultAkaMSCreateLinkPatterns,
- akaMSDoNotCreateLinkPatterns: DefaultAkaMSDoNotCreateLinkPatterns,
- targetFeeds: DotNetToolsFeeds,
- symbolTargetType: SymbolPublishVisibility.Public,
- flatten: false),
+
#endregion
];
}
diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/TargetFeedConfig.cs b/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/TargetFeedConfig.cs
index fe3220c3739..b2f25c8fb4f 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/TargetFeedConfig.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/TargetFeedConfig.cs
@@ -16,25 +16,9 @@ namespace Microsoft.DotNet.Build.Tasks.Feed.Model
public class TargetFeedConfig
{
///
- /// Returns the TargetURL stripped of SAS token and with CDN substitution applied
- /// for known blob storage accounts. This is used for both logging purposes and
- /// for storing asset locations in BAR that point to publicly accessible CDN URLs.
+ /// Returns the TargetURL stripped of SAS token so it can be used for logging purposes.
///
- public string SafeTargetURL
- {
- get
- {
- var uriBuilder = new UriBuilder(TargetURL) { Query = "", Fragment = "" };
-
- // Apply CDN substitution for known storage accounts
- if (PublishingConstants.AccountsWithCdns.TryGetValue(uriBuilder.Host, out var replacementHost))
- {
- uriBuilder.Host = replacementHost;
- }
-
- return uriBuilder.Uri.AbsoluteUri;
- }
- }
+ public string SafeTargetURL => new UriBuilder(TargetURL) {Query = "", Fragment = ""}.Uri.AbsoluteUri;
public TargetFeedContentType ContentType { get; }
diff --git a/src/Microsoft.DotNet.Build.Tasks.Installers/Microsoft.DotNet.Build.Tasks.Installers.csproj b/src/Microsoft.DotNet.Build.Tasks.Installers/Microsoft.DotNet.Build.Tasks.Installers.csproj
index dd3b461547d..b802bc9a24a 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Installers/Microsoft.DotNet.Build.Tasks.Installers.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.Installers/Microsoft.DotNet.Build.Tasks.Installers.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
true
true
true
@@ -39,6 +39,12 @@
Pack="true" />
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Installers/build/Microsoft.DotNet.Build.Tasks.Installers.props b/src/Microsoft.DotNet.Build.Tasks.Installers/build/Microsoft.DotNet.Build.Tasks.Installers.props
index 29db77597b8..f5996ed1b57 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Installers/build/Microsoft.DotNet.Build.Tasks.Installers.props
+++ b/src/Microsoft.DotNet.Build.Tasks.Installers/build/Microsoft.DotNet.Build.Tasks.Installers.props
@@ -2,7 +2,8 @@
- $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.Build.Tasks.Installers.dll
+ $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.Build.Tasks.Installers.dll
+ $(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.DotNet.Build.Tasks.Installers.dll
$(MSBuildThisFileDirectory)
diff --git a/src/Microsoft.DotNet.Build.Tasks.Installers/build/acquisition/acquire-nuget-exe/acquire-nuget-exe.proj b/src/Microsoft.DotNet.Build.Tasks.Installers/build/acquisition/acquire-nuget-exe/acquire-nuget-exe.proj
new file mode 100644
index 00000000000..c283a08255e
--- /dev/null
+++ b/src/Microsoft.DotNet.Build.Tasks.Installers/build/acquisition/acquire-nuget-exe/acquire-nuget-exe.proj
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+ https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe
+ $(BaseIntermediateOutputPath)nuget\
+ $(NuGetExeToolDir)NuGet.exe
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Installers/build/acquisition/acquire-wix/acquire-wix.proj b/src/Microsoft.DotNet.Build.Tasks.Installers/build/acquisition/acquire-wix/acquire-wix.proj
index 830cf565e72..5b3076d67cf 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Installers/build/acquisition/acquire-wix/acquire-wix.proj
+++ b/src/Microsoft.DotNet.Build.Tasks.Installers/build/acquisition/acquire-wix/acquire-wix.proj
@@ -1,7 +1,7 @@
-
+
-
+
-
-
diff --git a/src/Microsoft.DotNet.Build.Tasks.Installers/build/installer.props b/src/Microsoft.DotNet.Build.Tasks.Installers/build/installer.props
index beefa1d5462..1ec247f1718 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Installers/build/installer.props
+++ b/src/Microsoft.DotNet.Build.Tasks.Installers/build/installer.props
@@ -6,17 +6,22 @@
true
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Installers/build/wix/wix.targets b/src/Microsoft.DotNet.Build.Tasks.Installers/build/wix/wix.targets
index 08f5414e896..b5006eb8130 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Installers/build/wix/wix.targets
+++ b/src/Microsoft.DotNet.Build.Tasks.Installers/build/wix/wix.targets
@@ -452,10 +452,24 @@
ComponentMsiFile=$(CrossArchMsiFile)" />
+
+
+
+
+
+
+
@@ -466,12 +480,25 @@
$(MSBuildThisFileDirectory)vs\VS.Redist.Common.Component.nuspec.txt
$(IntermediateOutputPath)vs\VS.Redist.Common.Component.nuspec
- COMPONENT_MSI=$(ComponentMsiFile);ARCH=$(MsiArch);COMPONENT_NAME=$(VSInsertionComponentName);FRIENDLY_NAME=$(ProductBrandName);PROJECT_URL=$(RepositoryUrl)
+
+ $(PackProperties)COMPONENT_MSI=$(ComponentMsiFile);
+ $(PackProperties)ARCH=$(MsiArch);
+ $(PackProperties)COMPONENT_NAME=$(VSInsertionComponentName);
+ $(PackProperties)FRIENDLY_NAME=$(ProductBrandName);
+ $(PackProperties)PROJECT_URL=$(RepositoryUrl);
+
+
+ $(PackArgs) $(VsInsertionNuspecFile)
+ $(PackArgs) -Version $(Version)
+ $(PackArgs) -OutputDirectory $(ArtifactsNonShippingPackagesDir)
+ $(PackArgs) -NoDefaultExcludes
+ $(PackArgs) -NoPackageAnalysis
+ $(PackArgs) -Properties "$(PackProperties)"
-
+
-
+
+
+
+
+
+
+
@@ -482,12 +496,25 @@
$(MSBuildThisFileDirectory)vs\VS.Redist.Common.Component.nuspec.txt
$(IntermediateOutputPath)vs\VS.Redist.Common.Component.nuspec
- COMPONENT_MSI=$(ComponentMsiFile);ARCH=$(MsiArch);COMPONENT_NAME=$(VSInsertionComponentName);FRIENDLY_NAME=$(ProductBrandName);PROJECT_URL=$(RepositoryUrl)
+
+ $(PackProperties)COMPONENT_MSI=$(ComponentMsiFile);
+ $(PackProperties)ARCH=$(MsiArch);
+ $(PackProperties)COMPONENT_NAME=$(VSInsertionComponentName);
+ $(PackProperties)FRIENDLY_NAME=$(ProductBrandName);
+ $(PackProperties)PROJECT_URL=$(RepositoryUrl);
+
+
+ $(PackArgs) $(VsInsertionNuspecFile)
+ $(PackArgs) -Version $(Version)
+ $(PackArgs) -OutputDirectory $(ArtifactsNonShippingPackagesDir)
+ $(PackArgs) -NoDefaultExcludes
+ $(PackArgs) -NoPackageAnalysis
+ $(PackArgs) -Properties "$(PackProperties)"
-
+
0)
+ {
+ int read = stream.Read(buffer, offset, count);
+ if (read == 0)
+ {
+ throw new InvalidOperationException("Unexpected end of stream");
+ }
+ offset += read;
+ count -= read;
+ }
+ }
+#else
private void ReadExactly(byte[] buffer, int offset, int count)
{
stream.ReadExactly(buffer.AsSpan(offset, count));
}
+#endif
}
}
diff --git a/src/Microsoft.DotNet.Build.Tasks.Installers/src/ArWriter.cs b/src/Microsoft.DotNet.Build.Tasks.Installers/src/ArWriter.cs
index 3e44acbef07..cbfbf4e66e1 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Installers/src/ArWriter.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Installers/src/ArWriter.cs
@@ -19,7 +19,12 @@ public ArWriter(Stream output, bool leaveOpen)
{
_stream = output;
_leaveOpen = leaveOpen;
+#if NET
_stream.Write("!\n"u8);
+#else
+ byte[] magic = Encoding.ASCII.GetBytes("!\n");
+ _stream.Write(magic, 0, magic.Length);
+#endif
}
public void AddEntry(ArEntry entry)
@@ -45,7 +50,11 @@ public void AddEntry(ArEntry entry)
private void Write(byte[] data)
{
+#if NET
_stream.Write(data);
+#else
+ _stream.Write(data, 0, data.Length);
+#endif
}
public void Dispose()
diff --git a/src/Microsoft.DotNet.Build.Tasks.Installers/src/CreateMD5SumsFile.cs b/src/Microsoft.DotNet.Build.Tasks.Installers/src/CreateMD5SumsFile.cs
index 2f1bad1a3a1..69ab5340c52 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Installers/src/CreateMD5SumsFile.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Installers/src/CreateMD5SumsFile.cs
@@ -40,7 +40,11 @@ public override bool Execute()
byte[] hash = md5.ComputeHash(fileStream);
string relativePath = file.ItemSpec.Substring(RootDirectory.Length).TrimStart(Path.DirectorySeparatorChar).Replace('\\', '/');
// Always use Linux line-endings
+#if NET
writer.Write($"{Convert.ToHexStringLower(hash)} {relativePath}\n");
+#else
+ writer.Write($"{BitConverter.ToString(hash).Replace("-", "").ToLower()} {relativePath}\n");
+#endif
}
InstalledSize = (installedSize / 1024).ToString();
diff --git a/src/Microsoft.DotNet.Build.Tasks.Installers/src/CreateRpmPackage.cs b/src/Microsoft.DotNet.Build.Tasks.Installers/src/CreateRpmPackage.cs
index 102d3e93eac..41bd5450031 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Installers/src/CreateRpmPackage.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Installers/src/CreateRpmPackage.cs
@@ -72,11 +72,13 @@ public override bool Execute()
"x64" => Architecture.X64,
"arm" => Architecture.Arm,
"arm64" => Architecture.Arm64,
+#if NET
"armv6" => Architecture.Armv6,
"s390x" => Architecture.S390x,
"ppc64le" => Architecture.Ppc64le,
"riscv64" => Architecture.RiscV64,
"loongarch64" => Architecture.LoongArch64,
+#endif
_ => throw new ArgumentException($"Unknown architecture: {PackageArchitecture}")
};
RpmBuilder builder = new(PackageName, PackageVersion, PackageRelease, arch, OSPlatform.Create(PackageOS))
diff --git a/src/Microsoft.DotNet.Build.Tasks.Installers/src/HexConverter.cs b/src/Microsoft.DotNet.Build.Tasks.Installers/src/HexConverter.cs
index e1aec007337..0e6db40a605 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Installers/src/HexConverter.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Installers/src/HexConverter.cs
@@ -1,4 +1,29 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-global using HexConverter = System.Convert;
\ No newline at end of file
+#if NET
+global using HexConverter = System.Convert;
+#else
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Microsoft.DotNet.Build.Tasks.Installers
+{
+ internal static class HexConverter
+ {
+ public static string ToHexStringLower(byte[] byteArray)
+ {
+ StringBuilder hexString = new(byteArray.Length * 2);
+ foreach (byte b in byteArray)
+ {
+ hexString.AppendFormat("{0:x2}", b);
+ }
+ return hexString.ToString();
+ }
+ }
+}
+
+#endif
diff --git a/src/Microsoft.DotNet.Build.Tasks.Installers/src/RpmBuilder.cs b/src/Microsoft.DotNet.Build.Tasks.Installers/src/RpmBuilder.cs
index 3ae52d789d7..68b5f81f4f9 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Installers/src/RpmBuilder.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Installers/src/RpmBuilder.cs
@@ -64,11 +64,13 @@ private static short GetRpmLeadArchitecture(Architecture architecture)
Architecture.X64 => 1,
Architecture.Arm => 12,
Architecture.Arm64 => 19,
+#if NET
Architecture.Armv6 => 12,
Architecture.S390x => 15,
Architecture.Ppc64le => 16,
Architecture.RiscV64 => 22,
Architecture.LoongArch64 => 23,
+#endif
_ => throw new ArgumentException("Unsupported architecture", nameof(architecture))
};
}
@@ -82,11 +84,13 @@ public static string GetRpmHeaderArchitecture(Architecture architecture)
Architecture.X64 => "x86_64",
Architecture.Arm => "armv7hl",
Architecture.Arm64 => "aarch64",
+#if NET
Architecture.Armv6 => "armv6hl",
Architecture.S390x => "s390x",
Architecture.Ppc64le => "ppc64le",
Architecture.RiscV64 => "riscv64",
Architecture.LoongArch64 => "loongarch64",
+#endif
_ => throw new ArgumentException("Unsupported architecture", nameof(architecture))
};
}
diff --git a/src/Microsoft.DotNet.Build.Tasks.Installers/src/StreamHelpers.cs b/src/Microsoft.DotNet.Build.Tasks.Installers/src/StreamHelpers.cs
index 0205a218743..b5ab9a9ce5a 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Installers/src/StreamHelpers.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Installers/src/StreamHelpers.cs
@@ -7,6 +7,27 @@ namespace Microsoft.DotNet.Build.Tasks.Installers
{
internal static class StreamHelpers
{
+#if !NET
+ public static void ReadExactly(this Stream stream, byte[] buffer, int offset, int count)
+ {
+ while (count > 0)
+ {
+ int read = stream.Read(buffer, offset, count);
+ if (read == 0)
+ {
+ throw new InvalidOperationException("Unexpected end of stream");
+ }
+ offset += read;
+ count -= read;
+ }
+ }
+
+ public static void Write(this Stream stream, byte[] buffer)
+ {
+ stream.Write(buffer, 0, buffer.Length);
+ }
+#endif
+
public static Span ReadExactly(this Stream stream, int n)
{
byte[] buffer = new byte[n];
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/src/Microsoft.DotNet.Build.Tasks.Packaging.csproj b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/Microsoft.DotNet.Build.Tasks.Packaging.csproj
index 2e455a9faa6..3fd7becffb3 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/src/Microsoft.DotNet.Build.Tasks.Packaging.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/Microsoft.DotNet.Build.Tasks.Packaging.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
true
true
MSBuildSdk
@@ -55,6 +55,12 @@
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Microsoft.DotNet.Build.Tasks.Packaging.props b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Microsoft.DotNet.Build.Tasks.Packaging.props
index 81116d55833..77c5c70435f 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Microsoft.DotNet.Build.Tasks.Packaging.props
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Microsoft.DotNet.Build.Tasks.Packaging.props
@@ -1,16 +1,6 @@
-
-
-
-
- $(BundledRuntimeIdentifierGraphFile)
-
-
true
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.common.targets b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.common.targets
index 0705afd686a..cddcada8201 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.common.targets
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.common.targets
@@ -6,7 +6,8 @@
- $(MSBuildThisFileDirectory)../tools/net/
+ $(MSBuildThisFileDirectory)../tools/net/
+ $(MSBuildThisFileDirectory)../tools/netframework/
$(MSBuildThisFileDirectory)runtime.json
$([MSBuild]::NormalizeDirectory('$(BaseOutputPath)', 'pkg'))
@@ -18,32 +19,32 @@
$(PackageTargetRuntimeSuffix)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.targets b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.targets
index 52a20ab5b53..38ff3e34be0 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.targets
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/src/build/Packaging.targets
@@ -958,10 +958,6 @@
@(NETCoreApp100RIDs)
-
-
- @(NETCoreAppCurrentRIDs)
-
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/ApplyBaseLineTests.cs b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/ApplyBaseLineTests.cs
index 84b6a27b637..2dc393fb43a 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/ApplyBaseLineTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/ApplyBaseLineTests.cs
@@ -5,7 +5,7 @@
using Microsoft.Build.Utilities;
using Xunit;
using Xunit.Abstractions;
-using AwesomeAssertions;
+using FluentAssertions;
namespace Microsoft.DotNet.Build.Tasks.Packaging.Tests
{
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/CreateTrimDependencyGroupsTests.cs b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/CreateTrimDependencyGroupsTests.cs
index f9225cace72..7918aadc066 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/CreateTrimDependencyGroupsTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/CreateTrimDependencyGroupsTests.cs
@@ -8,7 +8,7 @@
using System.Linq;
using Xunit;
using Xunit.Abstractions;
-using AwesomeAssertions;
+using FluentAssertions;
namespace Microsoft.DotNet.Build.Tasks.Packaging.Tests
{
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/GenerateNuSpecAndPackTests.cs b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/GenerateNuSpecAndPackTests.cs
index e442c18190c..47eefb4e9d9 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/GenerateNuSpecAndPackTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/GenerateNuSpecAndPackTests.cs
@@ -7,7 +7,7 @@
using System.IO;
using Xunit;
using Xunit.Abstractions;
-using AwesomeAssertions;
+using FluentAssertions;
namespace Microsoft.DotNet.Build.Tasks.Packaging.Tests
{
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/GetLastStablePackageTests.cs b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/GetLastStablePackageTests.cs
index 5ccd9fb6058..c5ea06cb3d9 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/GetLastStablePackageTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/GetLastStablePackageTests.cs
@@ -5,7 +5,7 @@
using Microsoft.Build.Utilities;
using Xunit;
using Xunit.Abstractions;
-using AwesomeAssertions;
+using FluentAssertions;
namespace Microsoft.DotNet.Build.Tasks.Packaging.Tests
{
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/HarvestPackageTests.cs b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/HarvestPackageTests.cs
index 5fe2594cad0..919975aa504 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/HarvestPackageTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/HarvestPackageTests.cs
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System.IO;
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/Log.cs b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/Log.cs
index ccb5cbf79f3..4805498dc36 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/Log.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/Log.cs
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using AwesomeAssertions;
+using FluentAssertions;
using Xunit.Abstractions;
namespace Microsoft.DotNet.Build.Tasks.Packaging.Tests
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/Microsoft.DotNet.Build.Tasks.Packaging.Tests.csproj b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/Microsoft.DotNet.Build.Tasks.Packaging.Tests.csproj
index 6f48692c843..a8d9333437e 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/Microsoft.DotNet.Build.Tasks.Packaging.Tests.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/Microsoft.DotNet.Build.Tasks.Packaging.Tests.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
false
$(NoWarn);xUnit2013
@@ -16,7 +16,7 @@
-
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/NuGetAssetResolverTests.cs b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/NuGetAssetResolverTests.cs
index 175bbf5ff4d..412faac4387 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/NuGetAssetResolverTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/NuGetAssetResolverTests.cs
@@ -4,7 +4,7 @@
using NuGet.Frameworks;
using Xunit;
using Xunit.Abstractions;
-using AwesomeAssertions;
+using FluentAssertions;
namespace Microsoft.DotNet.Build.Tasks.Packaging.Tests
{
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/NugetPropertyStringProviderTests.cs b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/NugetPropertyStringProviderTests.cs
index 2435f749174..f08cbe55a68 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/NugetPropertyStringProviderTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/NugetPropertyStringProviderTests.cs
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using AwesomeAssertions;
+using FluentAssertions;
using System;
using System.Collections.Generic;
using System.IO;
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/PackageIndexTests.cs b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/PackageIndexTests.cs
index ddc595a795c..b4e26887681 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/PackageIndexTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/PackageIndexTests.cs
@@ -4,7 +4,7 @@
using System;
using System.IO;
using Xunit;
-using AwesomeAssertions;
+using FluentAssertions;
namespace Microsoft.DotNet.Build.Tasks.Packaging.Tests
{
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/RuntimeGraphTests.cs b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/RuntimeGraphTests.cs
index b9b55b01d12..eef0d6735ee 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/RuntimeGraphTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/RuntimeGraphTests.cs
@@ -6,7 +6,7 @@
using System.IO;
using Xunit;
using Xunit.Abstractions;
-using AwesomeAssertions;
+using FluentAssertions;
namespace Microsoft.DotNet.Build.Tasks.Packaging.Tests
{
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/ValidateHarvestVersionIsLatestForReleaseTests.cs b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/ValidateHarvestVersionIsLatestForReleaseTests.cs
index 60e2b4b1eaf..268f9c02a0a 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/ValidateHarvestVersionIsLatestForReleaseTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/ValidateHarvestVersionIsLatestForReleaseTests.cs
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System;
diff --git a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/VersionUtilityTests.cs b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/VersionUtilityTests.cs
index da81df09b97..41d7546c6bb 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/VersionUtilityTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Packaging/tests/VersionUtilityTests.cs
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using AwesomeAssertions;
+using FluentAssertions;
using System;
using System.Collections.Generic;
using Xunit;
diff --git a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/ChooseBestP2PTargetFrameworkTask.cs b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/ChooseBestP2PTargetFrameworkTask.cs
index 764fc9b52b8..d98db883c6b 100644
--- a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/ChooseBestP2PTargetFrameworkTask.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/ChooseBestP2PTargetFrameworkTask.cs
@@ -111,9 +111,15 @@ public override bool Execute()
private static bool TryParseFramework(string targetFrameworkMoniker, string? targetPlatformMoniker, string errorMessage, Log logger, out NuGetFramework nugetFramework)
{
// Check if we have a long name.
+#if NETFRAMEWORK || NETSTANDARD
+ nugetFramework = targetFrameworkMoniker.Contains(",")
+ ? NuGetFramework.ParseComponents(targetFrameworkMoniker, targetPlatformMoniker)
+ : NuGetFramework.Parse(targetFrameworkMoniker);
+#else
nugetFramework = targetFrameworkMoniker.Contains(',', System.StringComparison.Ordinal)
? NuGetFramework.ParseComponents(targetFrameworkMoniker, targetPlatformMoniker)
: NuGetFramework.Parse(targetFrameworkMoniker);
+#endif
// validate framework
if (nugetFramework.IsUnsupported)
diff --git a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/Microsoft.DotNet.Build.Tasks.TargetFramework.csproj b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/Microsoft.DotNet.Build.Tasks.TargetFramework.csproj
index b8d5a7ec9fb..c3ad17606c7 100644
--- a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/Microsoft.DotNet.Build.Tasks.TargetFramework.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/Microsoft.DotNet.Build.Tasks.TargetFramework.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
true
true
Configuration system for cross-targeting projects.
@@ -13,6 +13,11 @@
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/BinPlace.targets b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/BinPlace.targets
index 68f71d4c843..e9be0f36a70 100644
--- a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/BinPlace.targets
+++ b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/BinPlace.targets
@@ -1,7 +1,7 @@
-
+
true
diff --git a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.props b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.props
index b548e38c216..d0180c04142 100644
--- a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.props
+++ b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.props
@@ -2,7 +2,8 @@
- ..\tools\net\Microsoft.DotNet.Build.Tasks.TargetFramework.dll
+ ..\tools\net\Microsoft.DotNet.Build.Tasks.TargetFramework.dll
+ ..\tools\netframework\Microsoft.DotNet.Build.Tasks.TargetFramework.dll
diff --git a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.targets b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.targets
index 19f7f200885..ccf6b879ff0 100644
--- a/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.targets
+++ b/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/build/Microsoft.DotNet.Build.Tasks.TargetFramework.targets
@@ -1,7 +1,7 @@
-
+
-
+
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
Templating task package
true
true
diff --git a/src/Microsoft.DotNet.Build.Tasks.Templating/src/build/Microsoft.DotNet.Build.Tasks.Templating.props b/src/Microsoft.DotNet.Build.Tasks.Templating/src/build/Microsoft.DotNet.Build.Tasks.Templating.props
index c2835e13031..358cf132b71 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Templating/src/build/Microsoft.DotNet.Build.Tasks.Templating.props
+++ b/src/Microsoft.DotNet.Build.Tasks.Templating/src/build/Microsoft.DotNet.Build.Tasks.Templating.props
@@ -2,9 +2,10 @@
- $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.Build.Tasks.Templating.dll
+ $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.Build.Tasks.Templating.dll
+ $(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.DotNet.Build.Tasks.Templating.dll
-
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Templating/test/Microsoft.DotNet.Build.Tasks.Templating.Tests.csproj b/src/Microsoft.DotNet.Build.Tasks.Templating/test/Microsoft.DotNet.Build.Tasks.Templating.Tests.csproj
index a1264fe5b35..03679598d86 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Templating/test/Microsoft.DotNet.Build.Tasks.Templating.Tests.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.Templating/test/Microsoft.DotNet.Build.Tasks.Templating.Tests.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
diff --git a/src/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests.csproj b/src/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests.csproj
index 7f4630f73fc..e276d85658e 100644
--- a/src/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests.csproj
@@ -1,13 +1,12 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetFrameworkToolCurrent)
-
diff --git a/src/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests/OptProf/GenerateTrainingInputFilesTests.cs b/src/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests/OptProf/GenerateTrainingInputFilesTests.cs
index 483994409c2..3b001e11895 100644
--- a/src/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests/OptProf/GenerateTrainingInputFilesTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests/OptProf/GenerateTrainingInputFilesTests.cs
@@ -130,7 +130,7 @@ private static void CreateVsix(string vsixPath, string manifestContent)
}
}
- [WindowsOnlyFact]
+ [Fact]
public void Execute()
{
var temp = Path.GetTempPath();
@@ -182,7 +182,7 @@ public void Execute()
""RelativeInstallationPath"": ""Common7\\IDE\\PrivateAssemblies\\System.Collections.Immutable.dll"",
""InstrumentationArguments"": ""/ExeConfig:\""%VisualStudio.InstallationUnderTest.Path%\\Common7\\IDE\\vsn.exe\""""
}
-", json, ignoreLineEndingDifferences: true);
+", json);
JObject.Parse(json);
@@ -193,7 +193,7 @@ public void Execute()
""RelativeInstallationPath"": ""MSBuild\\15.0\\Bin\\Roslyn\\System.Collections.Immutable.dll"",
""InstrumentationArguments"": ""/ExeConfig:\""%VisualStudio.InstallationUnderTest.Path%\\Common7\\IDE\\zzz.exe\""""
}
-", json, ignoreLineEndingDifferences: true);
+", json);
JObject.Parse(json);
@@ -204,7 +204,7 @@ public void Execute()
""RelativeInstallationPath"": ""Common7\\IDE\\CommonExtensions\\Microsoft\\ManagedLanguages\\VBCSharp\\LanguageServices\\x\\y\\z\\Microsoft.CodeAnalysis.CSharp.dll"",
""InstrumentationArguments"": ""/ExeConfig:\""%VisualStudio.InstallationUnderTest.Path%\\Common7\\IDE\\vsn.exe\""""
}
-", json, ignoreLineEndingDifferences: true);
+", json);
JObject.Parse(json);
json = File.ReadAllText(Path.Combine(outputDir, @"TeamEng\Configurations\TeamEng.OptProfTest.vs_debugger_start_no_build_cs_scribble\xyzMicrosoft.CodeAnalysis.VisualBasic.0.IBC.json"));
@@ -214,7 +214,7 @@ public void Execute()
""RelativeInstallationPath"": ""Common7\\IDE\\CommonExtensions\\Microsoft\\ManagedLanguages\\VBCSharp\\LanguageServices\\x\\y\\z\\Microsoft.CodeAnalysis.VisualBasic.dll"",
""InstrumentationArguments"": ""/ExeConfig:\""%VisualStudio.InstallationUnderTest.Path%\\Common7\\IDE\\vsn.exe\""""
}
-", json, ignoreLineEndingDifferences: true);
+", json);
JObject.Parse(json);
Assert.True(result);
diff --git a/src/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests/OptProf/GetRunSettingsSessionConfigurationTests.cs b/src/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests/OptProf/GetRunSettingsSessionConfigurationTests.cs
index 6e28e615327..b042f2e5840 100644
--- a/src/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests/OptProf/GetRunSettingsSessionConfigurationTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.VisualStudio.Tests/OptProf/GetRunSettingsSessionConfigurationTests.cs
@@ -439,7 +439,7 @@ public void Execute()
-FullyQualifiedName=DDRIT.RPS.CSharp.CSharpTest.EditingAndDesigner|FullyQualifiedName=VSPE.OptProfTests.vs_perf_designtime_ide_searchtest|FullyQualifiedName=VSPE.OptProfTests.vs_perf_designtime_editor_intellisense_globalcompletionlist_cs|FullyQualifiedName=VSPE.OptProfTests.vs_asl_cs_scenario|FullyQualifiedName=VSPE.OptProfTests.vs_ddbvtqa_vbwi|FullyQualifiedName=VSPE.OptProfTests.vs_asl_vb_scenario|FullyQualifiedName=VSPE.OptProfTests.vs_env_solution_createnewproject_vb_winformsapp|FullyQualifiedName=DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging", task.SessionConfiguration, ignoreLineEndingDifferences: true);
+FullyQualifiedName=DDRIT.RPS.CSharp.CSharpTest.EditingAndDesigner|FullyQualifiedName=VSPE.OptProfTests.vs_perf_designtime_ide_searchtest|FullyQualifiedName=VSPE.OptProfTests.vs_perf_designtime_editor_intellisense_globalcompletionlist_cs|FullyQualifiedName=VSPE.OptProfTests.vs_asl_cs_scenario|FullyQualifiedName=VSPE.OptProfTests.vs_ddbvtqa_vbwi|FullyQualifiedName=VSPE.OptProfTests.vs_asl_vb_scenario|FullyQualifiedName=VSPE.OptProfTests.vs_env_solution_createnewproject_vb_winformsapp|FullyQualifiedName=DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging", task.SessionConfiguration);
Assert.True(result);
@@ -454,8 +454,8 @@ public void Execute()
public void TestProductsOnly(string configJson, string expectedContainerString, string expectedTestCaseFilterString)
{
var (actualContainerString, actualTestCaseFilterString) = GetRunSettingsSessionConfiguration.GetTestContainersAndFilters(configJson, "config.json");
- Assert.Equal(expectedContainerString, actualContainerString, ignoreLineEndingDifferences: true);
- Assert.Equal(expectedTestCaseFilterString, actualTestCaseFilterString, ignoreLineEndingDifferences: true);
+ Assert.Equal(expectedContainerString, actualContainerString);
+ Assert.Equal(expectedTestCaseFilterString, actualTestCaseFilterString);
}
}
}
diff --git a/src/Microsoft.DotNet.Build.Tasks.VisualStudio/Microsoft.DotNet.Build.Tasks.VisualStudio.csproj b/src/Microsoft.DotNet.Build.Tasks.VisualStudio/Microsoft.DotNet.Build.Tasks.VisualStudio.csproj
index e7816e1e66b..410c5cee1c6 100644
--- a/src/Microsoft.DotNet.Build.Tasks.VisualStudio/Microsoft.DotNet.Build.Tasks.VisualStudio.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.VisualStudio/Microsoft.DotNet.Build.Tasks.VisualStudio.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetFrameworkToolCurrent)
true
true
Arcade SDK build tasks for Visual Studio profile guided optimization training
@@ -12,7 +12,9 @@
-
+
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.VisualStudio/Vsix/FinalizeInsertionVsixFile.cs b/src/Microsoft.DotNet.Build.Tasks.VisualStudio/Vsix/FinalizeInsertionVsixFile.cs
index dc8f0bee9b1..ad8211eb5cd 100644
--- a/src/Microsoft.DotNet.Build.Tasks.VisualStudio/Vsix/FinalizeInsertionVsixFile.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.VisualStudio/Vsix/FinalizeInsertionVsixFile.cs
@@ -127,7 +127,7 @@ private static void UpdatePartHashInManifestJson(Package package, string partNam
using (var writer = new StreamWriter(stream, Encoding.UTF8, bufferSize: 2048, leaveOpen: false))
{
- writer.Write(json.ToString(Formatting.None, Array.Empty()));
+ writer.Write(json.ToString(Formatting.None));
}
}
}
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/CreateVisualStudioWorkloadSetTests.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/CreateVisualStudioWorkloadSetTests.cs
index ded16c69915..670aa8a5659 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/CreateVisualStudioWorkloadSetTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/CreateVisualStudioWorkloadSetTests.cs
@@ -3,7 +3,7 @@
using System.IO;
using System.Linq;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Test.Common;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/Microsoft.DotNet.Build.Tasks.Workloads.Tests.csproj b/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/Microsoft.DotNet.Build.Tasks.Workloads.Tests.csproj
index ddbfc1f02f7..cd322aac72d 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/Microsoft.DotNet.Build.Tasks.Workloads.Tests.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/Microsoft.DotNet.Build.Tasks.Workloads.Tests.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
@@ -13,7 +13,11 @@
-
+
+
+
+
+
@@ -32,6 +36,10 @@
+
+
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/MsiTests.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/MsiTests.cs
index 6d8db4df90b..05a2099959d 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/MsiTests.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/MsiTests.cs
@@ -4,7 +4,7 @@
using System;
using System.IO;
using System.Linq;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Test.Common;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
@@ -20,9 +20,8 @@ public class MsiTests : TestBase
{
private static ITaskItem BuildManifestMsi(string path, string msiVersion = "1.2.3", string platform = "x64", string msiOutputPath = null)
{
- string packageRootDirectory = Path.Combine(PackageRootDirectory, Guid.NewGuid().ToString("N"));
TaskItem packageItem = new(path);
- WorkloadManifestPackage pkg = new(packageItem, packageRootDirectory, new Version(msiVersion));
+ WorkloadManifestPackage pkg = new(packageItem, PackageRootDirectory, new Version(msiVersion));
pkg.Extract();
WorkloadManifestMsi msi = new(pkg, platform, new MockBuildEngine(), WixToolsetPath, BaseIntermediateOutputPath,
isSxS: true);
@@ -44,6 +43,8 @@ public void WorkloadManifestsIncludeInstallationRecords()
[WindowsOnlyFact]
public void ItCanBuildSideBySideManifestMsis()
{
+ string PackageRootDirectory = Path.Combine(BaseIntermediateOutputPath, "pkg");
+
// Build 6.0.200 manifest for version 6.0.3
ITaskItem msi603 = BuildManifestMsi(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.3.nupkg"));
string msiPath603 = msi603.GetMetadata(Metadata.FullPath);
@@ -79,9 +80,9 @@ public void ItCanBuildSideBySideManifestMsis()
[WindowsOnlyFact]
public void ItCanBuildAManifestMsi()
{
- string packageRootDirectory = Path.Combine(PackageRootDirectory, Guid.NewGuid().ToString("N"));
+ string PackageRootDirectory = Path.Combine(BaseIntermediateOutputPath, "pkg");
TaskItem packageItem = new(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.3.nupkg"));
- WorkloadManifestPackage pkg = new(packageItem, packageRootDirectory, new Version("1.2.3"));
+ WorkloadManifestPackage pkg = new(packageItem, PackageRootDirectory, new Version("1.2.3"));
pkg.Extract();
WorkloadManifestMsi msi = new(pkg, "x64", new MockBuildEngine(), WixToolsetPath, BaseIntermediateOutputPath);
@@ -109,11 +110,11 @@ public void ItCanBuildAManifestMsi()
[WindowsOnlyFact]
public void ItCanBuildATemplatePackMsi()
{
- string packageRootDirectory = Path.Combine(PackageRootDirectory, Guid.NewGuid().ToString("N"));
+ string PackageRootDirectory = Path.Combine(BaseIntermediateOutputPath, "pkg");
string packagePath = Path.Combine(TestAssetsPath, "microsoft.ios.templates.15.2.302-preview.14.122.nupkg");
WorkloadPack p = new(new WorkloadPackId("Microsoft.iOS.Templates"), "15.2.302-preview.14.122", WorkloadPackKind.Template, null);
- TemplatePackPackage pkg = new(p, packagePath, new[] { "x64" }, packageRootDirectory);
+ TemplatePackPackage pkg = new(p, packagePath, new[] { "x64" }, PackageRootDirectory);
pkg.Extract();
var buildEngine = new MockBuildEngine();
WorkloadPackMsi msi = new(pkg, "x64", buildEngine, WixToolsetPath, BaseIntermediateOutputPath);
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Microsoft.DotNet.Build.Tasks.Workloads.csproj b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Microsoft.DotNet.Build.Tasks.Workloads.csproj
index 3abcaf2fe62..0f1d87796bc 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Microsoft.DotNet.Build.Tasks.Workloads.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Microsoft.DotNet.Build.Tasks.Workloads.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
true
true
true
@@ -30,6 +30,11 @@
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Misc/msi.csproj b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Misc/msi.csproj
index f50babc64d6..02fad4832cb 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Misc/msi.csproj
+++ b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Misc/msi.csproj
@@ -7,7 +7,6 @@
- $(BundledNETCoreAppTargetFramework)
$(_Authors)
$(_Copyright)
__DESCRIPTION__
@@ -21,6 +20,7 @@
DotnetPlatform
__PACKAGE_VERSION__
true
+ net10.0
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/build/Microsoft.DotNet.Build.Tasks.Workloads.props b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/build/Microsoft.DotNet.Build.Tasks.Workloads.props
index 3636efb67aa..6c44c02a663 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/build/Microsoft.DotNet.Build.Tasks.Workloads.props
+++ b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/build/Microsoft.DotNet.Build.Tasks.Workloads.props
@@ -2,10 +2,11 @@
- $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.Build.Tasks.Workloads.dll
+ $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.Build.Tasks.Workloads.dll
+ $(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.DotNet.Build.Tasks.Workloads.dll
-
-
+
+
diff --git a/src/Microsoft.DotNet.CMake.Sdk/Microsoft.DotNet.CMake.Sdk.csproj b/src/Microsoft.DotNet.CMake.Sdk/Microsoft.DotNet.CMake.Sdk.csproj
index f1f1af126e1..47b6a076af6 100644
--- a/src/Microsoft.DotNet.CMake.Sdk/Microsoft.DotNet.CMake.Sdk.csproj
+++ b/src/Microsoft.DotNet.CMake.Sdk/Microsoft.DotNet.CMake.Sdk.csproj
@@ -1,21 +1,19 @@
-
+
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
true
- true
Common toolset for calling into CMake from MSBuild and easily reference native assets from managed projects.
MSBuildSdk
- $(NoWarn);NU5128;CS0649
+ $(NoWarn);NU5128
+ true
-
-
-
-
-
-
+
+
diff --git a/src/Microsoft.DotNet.CMake.Sdk/build/Microsoft.DotNet.CMake.Sdk.targets b/src/Microsoft.DotNet.CMake.Sdk/build/Microsoft.DotNet.CMake.Sdk.targets
index 7680c206ab1..c34dc5d02ed 100644
--- a/src/Microsoft.DotNet.CMake.Sdk/build/Microsoft.DotNet.CMake.Sdk.targets
+++ b/src/Microsoft.DotNet.CMake.Sdk/build/Microsoft.DotNet.CMake.Sdk.targets
@@ -1,13 +1,6 @@
-
- $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.CMake.Sdk.dll
-
-
-
-
-
@@ -99,12 +92,6 @@
-
-
-
-
-
-
@@ -188,14 +175,8 @@
-
-
-
-
+ DependsOnTargets="GetConfigScript">
diff --git a/src/Microsoft.DotNet.CMake.Sdk/sdk/ProjectReference.targets b/src/Microsoft.DotNet.CMake.Sdk/sdk/ProjectReference.targets
index 5ba98a479a7..ad3c2720d8c 100644
--- a/src/Microsoft.DotNet.CMake.Sdk/sdk/ProjectReference.targets
+++ b/src/Microsoft.DotNet.CMake.Sdk/sdk/ProjectReference.targets
@@ -1,12 +1,6 @@
-
- $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.CMake.Sdk.dll
-
-
-
-
@@ -17,6 +11,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -48,6 +116,12 @@
+
+
+
+
<_NativeProjectReferenceToBuild Include="%(NativeProjectReferenceNormalized.CMakeProject)"
Condition="'%(NativeProjectReferenceNormalized.BuildNative)' == 'true'"
@@ -61,62 +135,17 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
- <_SourceDirectory>$([System.IO.Path]::GetDirectoryName($(ReferencedCMakeLists)))
-
-
-
-
-
-
-
-
-
- <_ArtifactsToCopy Include="@(NativeProjectBinaries)" Condition="Exists('%(Identity)')" />
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Microsoft.DotNet.CMake.Sdk/src/CMakeFileApiModels.cs b/src/Microsoft.DotNet.CMake.Sdk/src/CMakeFileApiModels.cs
deleted file mode 100644
index 96173cd1894..00000000000
--- a/src/Microsoft.DotNet.CMake.Sdk/src/CMakeFileApiModels.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Collections.Generic;
-using System.Text.Json.Serialization;
-
-namespace Microsoft.DotNet.CMake.Sdk
-{
- ///
- /// C# object models for the CMake File API.
- /// These types represent a subset of the CMake File API that we use for discovering build artifacts.
- ///
- /// For the full CMake File API specification, see:
- /// https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html
- ///
- /// Specifically, we use:
- /// - Index file: https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html#index-file
- /// - Codemodel object (v2): https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html#codemodel-version-2
- ///
-
- internal sealed class CMakeFileApiIndex
- {
- public CMakeFileApiIndexReply Reply { get; set; }
- }
-
- internal sealed class CMakeFileApiIndexReply
- {
- [JsonPropertyName("client-Microsoft.DotNet.CMake.Sdk")]
- public CMakeFileApiClientReply ClientReply { get; set; }
- }
-
- internal sealed class CMakeFileApiClientReply
- {
- [JsonPropertyName("codemodel-v2")]
- public CMakeFileApiIndexCodeModel CodemodelV2 { get; set; }
- }
-
- internal sealed class CMakeFileApiIndexCodeModel
- {
- public string JsonFile { get; set; }
- }
-
- internal sealed class CMakeCodeModel
- {
- public CMakeCodeModelPaths Paths { get; set; }
- public List Configurations { get; set; }
- }
-
- internal sealed class CMakeCodeModelPaths
- {
- public string Source { get; set; }
- public string Build { get; set; }
- }
-
- internal sealed class CMakeConfiguration
- {
- public string Name { get; set; }
- public List Directories { get; set; }
- public List Targets { get; set; }
- }
-
- internal sealed class CMakeDirectory
- {
- public string Source { get; set; }
- public string Build { get; set; }
- public List TargetIndexes { get; set; }
- }
-
- internal sealed class CMakeTarget
- {
- public string Name { get; set; }
- public string JsonFile { get; set; }
- }
-
- internal sealed class CMakeTargetDetails
- {
- public List Artifacts { get; set; }
- }
-
- internal sealed class CMakeArtifact
- {
- public string Path { get; set; }
- }
-}
diff --git a/src/Microsoft.DotNet.CMake.Sdk/src/CreateCMakeFileApiQuery.cs b/src/Microsoft.DotNet.CMake.Sdk/src/CreateCMakeFileApiQuery.cs
deleted file mode 100644
index 56e6fe8abbc..00000000000
--- a/src/Microsoft.DotNet.CMake.Sdk/src/CreateCMakeFileApiQuery.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using Microsoft.DotNet.Build.Tasks;
-using System;
-using System.IO;
-
-namespace Microsoft.DotNet.CMake.Sdk
-{
- ///
- /// Creates a CMake File API query file to request codemodel information.
- ///
- public class CreateCMakeFileApiQuery : BuildTask
- {
- ///
- /// The CMake build output directory where the query should be created.
- ///
- [Required]
- public string CMakeOutputDir { get; set; }
-
- public override bool Execute()
- {
- try
- {
- // Create a client stateless query file with client name "Microsoft.DotNet.CMake.Sdk"
- string queryDir = Path.Combine(CMakeOutputDir, ".cmake", "api", "v1", "query", "client-Microsoft.DotNet.CMake.Sdk");
- Directory.CreateDirectory(queryDir);
-
- string queryFile = Path.Combine(queryDir, "codemodel-v2");
-
- // Create an empty file to request codemodel-v2 information
- File.WriteAllText(queryFile, string.Empty);
-
- Log.LogMessage(LogImportance.Low, "Created CMake File API query at: {0}", queryFile);
-
- return true;
- }
- catch (Exception ex)
- {
- Log.LogErrorFromException(ex, showStackTrace: false);
- return false;
- }
- }
- }
-}
diff --git a/src/Microsoft.DotNet.CMake.Sdk/src/GetCMakeArtifactsFromFileApi.cs b/src/Microsoft.DotNet.CMake.Sdk/src/GetCMakeArtifactsFromFileApi.cs
deleted file mode 100644
index 8baeea06470..00000000000
--- a/src/Microsoft.DotNet.CMake.Sdk/src/GetCMakeArtifactsFromFileApi.cs
+++ /dev/null
@@ -1,214 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using Microsoft.DotNet.Build.Tasks;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text.Json;
-
-namespace Microsoft.DotNet.CMake.Sdk
-{
- ///
- /// Reads CMake File API response to find artifacts for a specific source directory.
- ///
- public class GetCMakeArtifactsFromFileApi : BuildTask
- {
- ///
- /// The CMake build output directory containing the File API response.
- ///
- [Required]
- public string CMakeOutputDir { get; set; }
-
- ///
- /// The source directory of the CMakeLists.txt to find artifacts for.
- ///
- [Required]
- public string SourceDirectory { get; set; }
-
- ///
- /// The configuration name (e.g., Debug, Release).
- ///
- [Required]
- public string Configuration { get; set; }
-
- ///
- /// Output: The list of artifact file paths.
- ///
- [Output]
- public ITaskItem[] Artifacts { get; set; }
-
- public override bool Execute()
- {
- try
- {
- string replyDir = Path.Combine(CMakeOutputDir, ".cmake", "api", "v1", "reply");
-
- if (!Directory.Exists(replyDir))
- {
- Log.LogError("CMake File API reply directory does not exist: {0}", replyDir);
- return false;
- }
-
- // Find the latest index file
- var indexFiles = Directory.GetFiles(replyDir, "index-*.json");
- if (indexFiles.Length == 0)
- {
- Log.LogError("No CMake File API index files found.");
- return false;
- }
-
- string indexFile = indexFiles.OrderByDescending(f => f).First();
- Log.LogMessage(LogImportance.Low, "Reading CMake File API index: {0}", indexFile);
-
- string indexJson = File.ReadAllText(indexFile);
- var options = new JsonSerializerOptions
- {
- PropertyNameCaseInsensitive = true,
- PropertyNamingPolicy = JsonNamingPolicy.CamelCase
- };
-
- var index = JsonSerializer.Deserialize(indexJson, options);
-
- if (index?.Reply?.ClientReply?.CodemodelV2?.JsonFile == null)
- {
- Log.LogError("No 'codemodel-v2' found in File API index reply.");
- return false;
- }
-
- string codeModelFile = Path.Combine(replyDir, index.Reply.ClientReply.CodemodelV2.JsonFile);
- if (!File.Exists(codeModelFile))
- {
- Log.LogError("Codemodel file not found: {0}", codeModelFile);
- return false;
- }
-
- Log.LogMessage(LogImportance.Low, "Reading codemodel: {0}", codeModelFile);
-
- string codeModelJson = File.ReadAllText(codeModelFile);
- var codeModel = JsonSerializer.Deserialize(codeModelJson, options);
-
- if (codeModel == null)
- {
- Log.LogError("Failed to deserialize codemodel.");
- return false;
- }
-
- // Get the source root from the codemodel
- string sourceRoot = codeModel.Paths?.Source?.Replace('\\', '/').TrimEnd('/') ?? "";
-
- // Normalize source directory for comparison
- string normalizedSourceDir = Path.GetFullPath(SourceDirectory).Replace('\\', '/').TrimEnd('/');
-
- // Find the configuration using LINQ
- var config = codeModel.Configurations?.FirstOrDefault(c =>
- string.Equals(c.Name, Configuration, StringComparison.OrdinalIgnoreCase));
-
- if (config == null)
- {
- Log.LogError("Configuration '{0}' not found in CMake File API response.", Configuration);
- return false;
- }
-
- Log.LogMessage(LogImportance.Low, "Found configuration: {0}", Configuration);
-
- if (config.Directories == null || config.Targets == null)
- {
- Log.LogError("Configuration '{0}' has no directories or targets.", Configuration);
- return false;
- }
-
- // Find the matching directory using LINQ
- var directory = config.Directories.FirstOrDefault(d =>
- {
- string dirSource = d.Source?.Replace('\\', '/').TrimEnd('/') ?? "";
-
- // Make the directory source path absolute
- if (!Path.IsPathRooted(dirSource))
- {
- dirSource = Path.Combine(sourceRoot, dirSource);
- dirSource = Path.GetFullPath(dirSource).Replace('\\', '/').TrimEnd('/');
- }
-
- return string.Equals(dirSource, normalizedSourceDir, StringComparison.OrdinalIgnoreCase);
- });
-
- if (directory == null)
- {
- Log.LogError("Source directory '{0}' not found in CMake File API response.", SourceDirectory);
- return false;
- }
-
- Log.LogMessage(LogImportance.Low, "Found matching directory: {0}", SourceDirectory);
-
- // Get artifacts
- var artifacts = new List();
-
- if (directory.TargetIndexes != null)
- {
- foreach (int targetIndex in directory.TargetIndexes)
- {
- if (targetIndex < 0 || targetIndex >= config.Targets.Count)
- {
- continue;
- }
-
- var target = config.Targets[targetIndex];
- if (string.IsNullOrEmpty(target.JsonFile))
- {
- continue;
- }
-
- string targetFile = Path.Combine(replyDir, target.JsonFile);
- if (!File.Exists(targetFile))
- {
- continue;
- }
-
- Log.LogMessage(LogImportance.Low, "Reading target file: {0}", targetFile);
-
- // Read target details
- string targetJson = File.ReadAllText(targetFile);
- var targetDetails = JsonSerializer.Deserialize(targetJson, options);
-
- // Get artifacts
- if (targetDetails?.Artifacts != null)
- {
- foreach (var artifact in targetDetails.Artifacts)
- {
- if (!string.IsNullOrEmpty(artifact.Path))
- {
- string fullPath = Path.Combine(CMakeOutputDir, artifact.Path);
- fullPath = Path.GetFullPath(fullPath);
-
- var item = new TaskItem(fullPath);
- artifacts.Add(item);
-
- Log.LogMessage(LogImportance.Low, "Found artifact: {0}", fullPath);
- }
- }
- }
- }
- }
-
- if (artifacts.Count == 0)
- {
- Log.LogWarning("No artifacts found for source directory '{0}' in configuration '{1}'.", SourceDirectory, Configuration);
- }
-
- Artifacts = artifacts.ToArray();
- Log.LogMessage(LogImportance.Normal, "Found {0} artifact(s) for source directory '{1}' in configuration '{2}'", Artifacts.Length, SourceDirectory, Configuration);
-
- return true;
- }
- catch (Exception ex)
- {
- Log.LogErrorFromException(ex, showStackTrace: false);
- return false;
- }
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Deployment.Tasks.Links/Microsoft.DotNet.Deployment.Tasks.Links.csproj b/src/Microsoft.DotNet.Deployment.Tasks.Links/Microsoft.DotNet.Deployment.Tasks.Links.csproj
index 2c6e5be3b50..18ba7e8e323 100644
--- a/src/Microsoft.DotNet.Deployment.Tasks.Links/Microsoft.DotNet.Deployment.Tasks.Links.csproj
+++ b/src/Microsoft.DotNet.Deployment.Tasks.Links/Microsoft.DotNet.Deployment.Tasks.Links.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
true
true
Aka.ms link manager
@@ -20,4 +20,8 @@
+
+
+
+
diff --git a/src/Microsoft.DotNet.Deployment.Tasks.Links/build/Microsoft.DotNet.Deployment.Tasks.Links.props b/src/Microsoft.DotNet.Deployment.Tasks.Links/build/Microsoft.DotNet.Deployment.Tasks.Links.props
index 5a0d42049fa..50e5224cdb5 100644
--- a/src/Microsoft.DotNet.Deployment.Tasks.Links/build/Microsoft.DotNet.Deployment.Tasks.Links.props
+++ b/src/Microsoft.DotNet.Deployment.Tasks.Links/build/Microsoft.DotNet.Deployment.Tasks.Links.props
@@ -2,9 +2,11 @@
- $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.Deployment.Tasks.Links.dll
+ $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.Deployment.Tasks.Links.dll
+ $(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.DotNet.Deployment.Tasks.Links.dll
-
-
+
+
+
diff --git a/src/Microsoft.DotNet.Deployment.Tasks.Links/src/AkaMSLinksBase.cs b/src/Microsoft.DotNet.Deployment.Tasks.Links/src/AkaMSLinksBase.cs
index 704a968428d..77a64125333 100644
--- a/src/Microsoft.DotNet.Deployment.Tasks.Links/src/AkaMSLinksBase.cs
+++ b/src/Microsoft.DotNet.Deployment.Tasks.Links/src/AkaMSLinksBase.cs
@@ -24,7 +24,11 @@ protected AkaMSLinkManager CreateAkaMSLinksManager()
AkaMSLinkManager manager;
if (!string.IsNullOrEmpty(ClientCertificate))
{
+#if NET9_0_OR_GREATER
manager = new AkaMSLinkManager(ClientId, X509CertificateLoader.LoadPkcs12(Convert.FromBase64String(File.ReadAllText(ClientCertificate)), password: null), Tenant, Log);
+#else
+ manager = new AkaMSLinkManager(ClientId, new X509Certificate2(Convert.FromBase64String(File.ReadAllText(ClientCertificate))), Tenant, Log);
+#endif
}
else if (!string.IsNullOrEmpty(ClientSecret))
{
diff --git a/src/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj b/src/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj
index 1fd26013eb6..841055a6823 100644
--- a/src/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj
+++ b/src/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
true
MSBuildSdk
true
diff --git a/src/Microsoft.DotNet.GenAPI/build/Microsoft.DotNet.GenAPI.targets b/src/Microsoft.DotNet.GenAPI/build/Microsoft.DotNet.GenAPI.targets
index dd8968a723a..38560453f49 100644
--- a/src/Microsoft.DotNet.GenAPI/build/Microsoft.DotNet.GenAPI.targets
+++ b/src/Microsoft.DotNet.GenAPI/build/Microsoft.DotNet.GenAPI.targets
@@ -2,7 +2,8 @@
- $(MSBuildThisFileDirectory)\..\tools\net\Microsoft.DotNet.GenAPI.dll
+ $(MSBuildThisFileDirectory)\..\tools\net\Microsoft.DotNet.GenAPI.dll
+ $(MSBuildThisFileDirectory)\..\tools\netframework\Microsoft.DotNet.GenAPI.dll
@@ -24,7 +25,7 @@
-
+
diff --git a/src/Microsoft.DotNet.GenFacades/Microsoft.DotNet.GenFacades.csproj b/src/Microsoft.DotNet.GenFacades/Microsoft.DotNet.GenFacades.csproj
index f4166824922..119fce5fc77 100644
--- a/src/Microsoft.DotNet.GenFacades/Microsoft.DotNet.GenFacades.csproj
+++ b/src/Microsoft.DotNet.GenFacades/Microsoft.DotNet.GenFacades.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
MSBuildSdk
true
true
@@ -16,4 +16,9 @@
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.GenFacades/RoslynBuildTask.cs b/src/Microsoft.DotNet.GenFacades/RoslynBuildTask.cs
index c96e5c37b26..42b61be4397 100644
--- a/src/Microsoft.DotNet.GenFacades/RoslynBuildTask.cs
+++ b/src/Microsoft.DotNet.GenFacades/RoslynBuildTask.cs
@@ -6,7 +6,9 @@
using System;
using System.IO;
using System.Reflection;
+#if NETCOREAPP
using System.Runtime.Loader;
+#endif
namespace Microsoft.DotNet.Build.Tasks
{
@@ -17,24 +19,40 @@ public abstract partial class RoslynBuildTask : BuildTask
public override bool Execute()
{
+#if NETCOREAPP
AssemblyLoadContext currentContext = AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly())!;
currentContext.Resolving += ResolverForRoslyn;
+#else
+ AppDomain.CurrentDomain.AssemblyResolve += ResolverForRoslyn;
+#endif
try
{
return ExecuteCore();
}
finally
{
+#if NETCOREAPP
currentContext.Resolving -= ResolverForRoslyn;
+#else
+ AppDomain.CurrentDomain.AssemblyResolve -= ResolverForRoslyn;
+#endif
}
}
public abstract bool ExecuteCore();
+#if NETCOREAPP
private Assembly ResolverForRoslyn(AssemblyLoadContext context, AssemblyName assemblyName)
{
return LoadRoslyn(assemblyName, path => context.LoadFromAssemblyPath(path));
}
+#else
+ private Assembly ResolverForRoslyn(object sender, ResolveEventArgs args)
+ {
+ AssemblyName name = new(args.Name);
+ return LoadRoslyn(name, path => Assembly.LoadFrom(path));
+ }
+#endif
private Assembly LoadRoslyn(AssemblyName name, Func loadFromPath)
{
diff --git a/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.ClearVersion.targets b/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.ClearVersion.targets
index 22620a07d9f..34b4f7787b4 100644
--- a/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.ClearVersion.targets
+++ b/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.ClearVersion.targets
@@ -1,7 +1,7 @@
-
+
diff --git a/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.NotSupported.targets b/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.NotSupported.targets
index 46a061c0f5a..86ead85a490 100644
--- a/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.NotSupported.targets
+++ b/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.NotSupported.targets
@@ -1,7 +1,7 @@
-
+
AddGenFacadeNotSupportedCompileItem;$(CoreCompileDependsOn)
diff --git a/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.PartialFacadeSource.targets b/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.PartialFacadeSource.targets
index df655759d85..5a1c6439a83 100644
--- a/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.PartialFacadeSource.targets
+++ b/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.PartialFacadeSource.targets
@@ -1,7 +1,7 @@
-
+
ReferencePath
diff --git a/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.targets b/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.targets
index 20656c4312b..0d0215d40ac 100644
--- a/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.targets
+++ b/src/Microsoft.DotNet.GenFacades/build/Microsoft.DotNet.GenFacades.targets
@@ -2,7 +2,8 @@
- $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.GenFacades.dll
+ $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.GenFacades.dll
+ $(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.DotNet.GenFacades.dll
diff --git a/src/Microsoft.DotNet.Git.IssueManager/src/Clients/AzureDevOpsClient.cs b/src/Microsoft.DotNet.Git.IssueManager/src/Clients/AzureDevOpsClient.cs
new file mode 100644
index 00000000000..69261ed743b
--- /dev/null
+++ b/src/Microsoft.DotNet.Git.IssueManager/src/Clients/AzureDevOpsClient.cs
@@ -0,0 +1,86 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using Newtonsoft.Json;
+using System;
+using System.Linq;
+using System.Net.Http;
+using System.Net.Http.Headers;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading.Tasks;
+
+namespace Microsoft.DotNet.Git.IssueManager.Clients
+{
+ static class AzureDevOpsClient
+ {
+ private static readonly Regex RepositoryUriPattern = new Regex(
+ @"^https://dev\.azure\.com\/(?[a-zA-Z0-9]+)/(?[a-zA-Z0-9-]+)/_git/(?[a-zA-Z0-9-\\.]+)");
+
+ private static readonly Regex LegacyRepositoryUriPattern = new Regex(
+ @"^https://(?[a-zA-Z0-9]+)\.visualstudio\.com/(?[a-zA-Z0-9-]+)/_git/(?[a-zA-Z0-9-\.]+)");
+
+ private const string DefaultApiVersion = "5.0";
+
+ public static async Task GetCommitAuthorAsync(
+ string repositoryUrl,
+ string commit,
+ string personalAccessToken)
+ {
+ (string accountName, string projectName, string repoName) = ParseRepoUri(repositoryUrl);
+
+ using (HttpClient httpClient = GetHttpClient(accountName, projectName, personalAccessToken))
+ {
+ HttpRequestMessage getMessage = new HttpRequestMessage(HttpMethod.Get, $"_apis/git/repositories/{repoName}/commits?searchCriteria.ids={commit}");
+ HttpResponseMessage response = await httpClient.SendAsync(getMessage);
+
+ response.EnsureSuccessStatusCode();
+
+ AzureDevOpsCommit commitResponse = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync());
+
+ if (commitResponse == null)
+ {
+ throw new Exception($"No commit with id {commit} found in '{repositoryUrl}'");
+ }
+
+ return $"Azure DevOps user: {commitResponse.Value.First().Author.Name}";
+ }
+ }
+
+ private static HttpClient GetHttpClient(string accountName, string projectName, string personalAccessToken)
+ {
+ HttpClient client = new HttpClient(new HttpClientHandler { CheckCertificateRevocationList = true })
+ {
+ BaseAddress = new Uri($"https://dev.azure.com/{accountName}/{projectName}/")
+ };
+
+ client.DefaultRequestHeaders.Add(
+ "Accept",
+ $"application/json;api-version={DefaultApiVersion}");
+ client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
+ "Basic",
+ Convert.ToBase64String(Encoding.ASCII.GetBytes(string.Format("{0}:{1}", "", personalAccessToken))));
+
+ return client;
+ }
+
+ private static (string accountName, string projectName, string repoName) ParseRepoUri(string repositoryUri)
+ {
+ Match m = RepositoryUriPattern.Match(repositoryUri);
+ if (!m.Success)
+ {
+ m = LegacyRepositoryUriPattern.Match(repositoryUri);
+ if (!m.Success)
+ {
+ throw new ArgumentException(
+ "Repository URI should be in the form https://dev.azure.com/:account/:project/_git/:repo or " +
+ "https://:account.visualstudio.com/:project/_git/:repo");
+ }
+ }
+
+ return (m.Groups["account"].Value,
+ m.Groups["project"].Value,
+ m.Groups["repo"].Value);
+ }
+ }
+}
diff --git a/src/Microsoft.DotNet.Git.IssueManager/src/Clients/GitHubClient.cs b/src/Microsoft.DotNet.Git.IssueManager/src/Clients/GitHubClient.cs
new file mode 100644
index 00000000000..438eb49763e
--- /dev/null
+++ b/src/Microsoft.DotNet.Git.IssueManager/src/Clients/GitHubClient.cs
@@ -0,0 +1,112 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using Octokit;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.RegularExpressions;
+using System.Threading.Tasks;
+using Microsoft.DotNet.Git.IssueManager.Helpers;
+
+namespace Microsoft.DotNet.Git.IssueManager.Clients
+{
+ static class GitHubClient
+ {
+ public static async Task GetCommitAuthorAsync(
+ string repositoryUrl,
+ string commit,
+ string personalAccessToken)
+ {
+ (string owner, string repoName) = ParseRepoUri(repositoryUrl);
+
+ Octokit.GitHubClient client = new Octokit.GitHubClient(new ProductHeaderValue("assets-publisher"));
+ Credentials tokenAuth = new Credentials(personalAccessToken);
+ client.Credentials = tokenAuth;
+
+ GitHubCommit commitInfo = await client.Repository.Commit.Get(owner, repoName, commit);
+
+ while (commitInfo.Author.Type == "Bot")
+ {
+ if (!commitInfo.Parents.Any()) break;
+ commit = commitInfo.Parents.First().Sha;
+ commitInfo = await client.Repository.Commit.Get(owner, repoName, commit);
+ }
+
+ return $"@{commitInfo.Author.Login}";
+ }
+
+ public static async Task CreateNewIssueAsync(
+ string repositoryUrl,
+ string issueTitle,
+ string issueDescription,
+ string personalAccessToken,
+ int? milestone = null,
+ IEnumerable labels = null,
+ IEnumerable assignees = null)
+ {
+ (string owner, string repoName) = ParseRepoUri(repositoryUrl);
+
+ Octokit.GitHubClient client = new Octokit.GitHubClient(new ProductHeaderValue("assets-publisher"));
+ Credentials tokenAuth = new Credentials(personalAccessToken);
+ client.Credentials = tokenAuth;
+
+ NewIssue issueToBeCreated = new NewIssue(issueTitle)
+ {
+ Body = issueDescription,
+ Milestone = milestone
+ };
+
+ if (labels is not null)
+ {
+ issueToBeCreated.Labels.AddRange(labels);
+ }
+
+ if (assignees is not null)
+ {
+ issueToBeCreated.Assignees.AddRange(assignees);
+ }
+
+ Issue createdIssue = await client.Issue.Create(owner, repoName, issueToBeCreated);
+
+ return createdIssue.Number;
+ }
+
+ public static async Task CreateNewIssueCommentAsync(
+ string repositoryUrl,
+ int issueNumber,
+ string comment,
+ string personalAccessToken)
+ {
+ (string owner, string repoName) = ParseRepoUri(repositoryUrl);
+
+ Octokit.GitHubClient client = new Octokit.GitHubClient(new ProductHeaderValue("assets-publisher"));
+ Credentials tokenAuth = new Credentials(personalAccessToken);
+ client.Credentials = tokenAuth;
+
+ IssueComment createdComment = await client.Issue.Comment.Create(owner, repoName, issueNumber, comment);
+
+ return createdComment.HtmlUrl;
+ }
+
+ ///
+ /// Extracts the owner and repository name from .
+ ///
+ /// The repository URI.
+ /// The owner and the repository name
+ private static (string owner, string repositoryName) ParseRepoUri(string repositoryUri)
+ {
+ Regex repositoryUriPattern = new Regex(@"^/(?[^/]+)/(?[^/]+)/?$");
+ Uri uri = new Uri(repositoryUri);
+
+ Match match = repositoryUriPattern.Match(uri.AbsolutePath);
+
+ if (!match.Success)
+ {
+ return default;
+ }
+
+ return (match.Groups["owner"].Value, match.Groups["repo"].Value);
+ }
+ }
+}
diff --git a/src/Microsoft.DotNet.Git.IssueManager/src/Helpers/CollectionExtensions.cs b/src/Microsoft.DotNet.Git.IssueManager/src/Helpers/CollectionExtensions.cs
new file mode 100644
index 00000000000..dfe6aa27d6e
--- /dev/null
+++ b/src/Microsoft.DotNet.Git.IssueManager/src/Helpers/CollectionExtensions.cs
@@ -0,0 +1,19 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+
+namespace Microsoft.DotNet.Git.IssueManager.Helpers
+{
+ internal static class CollectionExtensions
+ {
+ public static void AddRange(this Collection collection, IEnumerable items)
+ {
+ foreach (T item in items)
+ {
+ collection.Add(item);
+ }
+ }
+ }
+}
diff --git a/src/Microsoft.DotNet.Git.IssueManager/src/Helpers/RepositoryHelper.cs b/src/Microsoft.DotNet.Git.IssueManager/src/Helpers/RepositoryHelper.cs
new file mode 100644
index 00000000000..aeb18c58877
--- /dev/null
+++ b/src/Microsoft.DotNet.Git.IssueManager/src/Helpers/RepositoryHelper.cs
@@ -0,0 +1,104 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using Microsoft.DotNet.Git.IssueManager.Clients;
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Microsoft.DotNet.Git.IssueManager.Helpers
+{
+ static class RepositoryHelper
+ {
+ public static async Task GetCommitAuthorAsync(
+ string repositoryUrl,
+ string commit,
+ string gitHubPersonalAccessToken,
+ string azureDevOpsPersonalAccessToken)
+ {
+ if (Uri.TryCreate(repositoryUrl, UriKind.Absolute, out Uri parsedUri))
+ {
+ if (parsedUri.Host == "github.com")
+ {
+ if (string.IsNullOrEmpty(gitHubPersonalAccessToken))
+ {
+ throw new ArgumentException("A GitHub personal access token is needed for this operation.");
+ }
+
+ return await GitHubClient.GetCommitAuthorAsync(repositoryUrl, commit, gitHubPersonalAccessToken);
+ }
+
+ if (string.IsNullOrEmpty(azureDevOpsPersonalAccessToken))
+ {
+ throw new ArgumentException("An Azure DevOps personal access token is needed for this operation.");
+ }
+
+ return await AzureDevOpsClient.GetCommitAuthorAsync(repositoryUrl, commit, azureDevOpsPersonalAccessToken);
+ }
+
+ throw new InvalidCastException($"'{parsedUri}' is not a valid URI");
+ }
+
+ public static async Task CreateNewIssueAsync(
+ string repositoryUrl,
+ string issueTitle,
+ string issueDescription,
+ string gitHubPersonalAccessToken,
+ int? milestone = null,
+ IEnumerable labels = null,
+ IEnumerable assignees = null)
+ {
+ if (Uri.TryCreate(repositoryUrl, UriKind.Absolute, out Uri parsedUri))
+ {
+ if (parsedUri.Host == "github.com")
+ {
+ if (string.IsNullOrEmpty(gitHubPersonalAccessToken))
+ {
+ throw new ArgumentException("A GitHub personal access token is needed for this operation.");
+ }
+
+ return await GitHubClient.CreateNewIssueAsync(
+ repositoryUrl,
+ issueTitle,
+ issueDescription,
+ gitHubPersonalAccessToken,
+ milestone,
+ labels,
+ assignees);
+ }
+
+ throw new NotImplementedException("Creating issues is not currently supported for an Azure DevOps repo.");
+ }
+
+ throw new InvalidCastException($"'{parsedUri}' is not a valid URI");
+ }
+
+ public static async Task CreateNewIssueCommentAsync(
+ string repositoryUrl,
+ int issueNumber,
+ string comment,
+ string gitHubPersonalAccessToken)
+ {
+ if (Uri.TryCreate(repositoryUrl, UriKind.Absolute, out Uri parsedUri))
+ {
+ if (parsedUri.Host == "github.com")
+ {
+ if (string.IsNullOrEmpty(gitHubPersonalAccessToken))
+ {
+ throw new ArgumentException("A GitHub personal access token is needed for this operation.");
+ }
+
+ return await GitHubClient.CreateNewIssueCommentAsync(
+ repositoryUrl,
+ issueNumber,
+ comment,
+ gitHubPersonalAccessToken);
+ }
+
+ throw new NotImplementedException("Creating comments is not currently supported for an Azure DevOps repo.");
+ }
+
+ throw new InvalidCastException($"'{parsedUri}' is not a valid URI");
+ }
+ }
+}
diff --git a/src/Microsoft.DotNet.Git.IssueManager/src/IssueManager.cs b/src/Microsoft.DotNet.Git.IssueManager/src/IssueManager.cs
new file mode 100644
index 00000000000..f0bfce1ea7b
--- /dev/null
+++ b/src/Microsoft.DotNet.Git.IssueManager/src/IssueManager.cs
@@ -0,0 +1,91 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using Microsoft.DotNet.Git.IssueManager.Helpers;
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Microsoft.DotNet.Git.IssueManager
+{
+ public class IssueManager
+ {
+ public string GitHubPersonalAccessToken { get; set; }
+
+ public string AzureDevOpsPersonalAccessToken { get; set; }
+
+ public IssueManager(
+ string gitHubPersonalAccessToken = null,
+ string azureDevOpsPersonalAccessToken = null)
+ {
+ GitHubPersonalAccessToken = gitHubPersonalAccessToken;
+ AzureDevOpsPersonalAccessToken = azureDevOpsPersonalAccessToken;
+ }
+
+ ///
+ /// Gets the author of a commit from a repo+commit
+ ///
+ /// The repository URL
+ /// The commit SHA.
+ /// In GitHub returns the handle, in AzDO returns the full name.
+ public async Task GetCommitAuthorAsync(string repositoryUrl, string commit)
+ {
+ if (string.IsNullOrEmpty(repositoryUrl))
+ {
+ throw new ArgumentException(nameof(repositoryUrl));
+ }
+
+ if (string.IsNullOrEmpty(commit))
+ {
+ throw new ArgumentException(nameof(commit));
+ }
+
+ return await RepositoryHelper.GetCommitAuthorAsync(repositoryUrl, commit, GitHubPersonalAccessToken, AzureDevOpsPersonalAccessToken);
+
+ }
+
+ ///
+ /// Creates a new GitHub issue.
+ ///
+ /// Repository URL where to create the issue.
+ /// Title of the issue.
+ /// Description of the issue.
+ ///
+ public async Task CreateNewIssueAsync(
+ string repositoryUrl,
+ string issueTitle,
+ string issueDescription,
+ int? milestone = null,
+ IEnumerable labels = null,
+ IEnumerable assignees = null)
+ {
+ return await RepositoryHelper.CreateNewIssueAsync(
+ repositoryUrl,
+ issueTitle,
+ issueDescription,
+ GitHubPersonalAccessToken,
+ milestone,
+ labels,
+ assignees);
+ }
+
+ ///
+ /// Creates a new comment on a GitHub issue.
+ ///
+ /// Repository URL where to create the issue.
+ /// Title of the issue.
+ /// Description of the issue.
+ ///
+ public async Task CreateNewIssueCommentAsync(
+ string repositoryUrl,
+ int issueNumber,
+ string comment)
+ {
+ return await RepositoryHelper.CreateNewIssueCommentAsync(
+ repositoryUrl,
+ issueNumber,
+ comment,
+ GitHubPersonalAccessToken);
+ }
+ }
+}
diff --git a/src/Microsoft.DotNet.Git.IssueManager/src/Microsoft.DotNet.Git.IssueManager.csproj b/src/Microsoft.DotNet.Git.IssueManager/src/Microsoft.DotNet.Git.IssueManager.csproj
new file mode 100644
index 00000000000..07472d5b491
--- /dev/null
+++ b/src/Microsoft.DotNet.Git.IssueManager/src/Microsoft.DotNet.Git.IssueManager.csproj
@@ -0,0 +1,19 @@
+
+
+
+ $(NetMinimum);$(NetFrameworkMinimum)
+ false
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Git.IssueManager/src/Models/AzureDevOpsCommit.cs b/src/Microsoft.DotNet.Git.IssueManager/src/Models/AzureDevOpsCommit.cs
new file mode 100644
index 00000000000..5180373b656
--- /dev/null
+++ b/src/Microsoft.DotNet.Git.IssueManager/src/Models/AzureDevOpsCommit.cs
@@ -0,0 +1,27 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.DotNet.Git.IssueManager
+{
+ public class AzureDevOpsCommit
+ {
+ public List Value { get; set; }
+ }
+
+ public class Value
+ {
+ public Author Author { get; set; }
+ }
+
+ public class Author
+ {
+ public string Name { get; set; }
+
+ public string Email { get; set; }
+
+ public DateTime Date { get; set; }
+ }
+}
diff --git a/src/Microsoft.DotNet.Helix/Client/CSharp/Microsoft.DotNet.Helix.Client.csproj b/src/Microsoft.DotNet.Helix/Client/CSharp/Microsoft.DotNet.Helix.Client.csproj
index 061f83a5238..e0e56b3ae1c 100644
--- a/src/Microsoft.DotNet.Helix/Client/CSharp/Microsoft.DotNet.Helix.Client.csproj
+++ b/src/Microsoft.DotNet.Helix/Client/CSharp/Microsoft.DotNet.Helix.Client.csproj
@@ -2,7 +2,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);netstandard2.0;$(NetFrameworkToolCurrent)
true
This package provides access to the Helix Api located at https://helix.dot.net/
https://helix.dot.net/api/openapi.json
@@ -17,8 +17,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Helix/Client/CSharp/generated-code/HelixApi.cs b/src/Microsoft.DotNet.Helix/Client/CSharp/generated-code/HelixApi.cs
index e03da99984b..3739b4d5d67 100644
--- a/src/Microsoft.DotNet.Helix/Client/CSharp/generated-code/HelixApi.cs
+++ b/src/Microsoft.DotNet.Helix/Client/CSharp/generated-code/HelixApi.cs
@@ -333,7 +333,9 @@ public RestApiException(Request request, Response response, string responseConte
Response = new ResponseWrapper(response, responseContent);
}
+#if NET
[Obsolete]
+#endif
protected RestApiException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
@@ -343,7 +345,9 @@ protected RestApiException(SerializationInfo info, StreamingContext context)
Response = JsonConvert.DeserializeObject(responseString, SerializerSettings);
}
+#if NET
[Obsolete]
+#endif
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (info == null)
@@ -371,14 +375,18 @@ public RestApiException(Request request, Response response, string responseConte
Body = body;
}
+#if NET
[Obsolete]
+#endif
protected RestApiException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Body = JsonConvert.DeserializeObject(info.GetString("Body"));
}
+#if NET
[Obsolete]
+#endif
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (info == null)
diff --git a/src/Microsoft.DotNet.Helix/JobSender.Tests/Microsoft.DotNet.Helix.JobSender.Tests.csproj b/src/Microsoft.DotNet.Helix/JobSender.Tests/Microsoft.DotNet.Helix.JobSender.Tests.csproj
index 9bfe75e833c..63f357bd05a 100644
--- a/src/Microsoft.DotNet.Helix/JobSender.Tests/Microsoft.DotNet.Helix.JobSender.Tests.csproj
+++ b/src/Microsoft.DotNet.Helix/JobSender.Tests/Microsoft.DotNet.Helix.JobSender.Tests.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
diff --git a/src/Microsoft.DotNet.Helix/JobSender/Microsoft.DotNet.Helix.JobSender.csproj b/src/Microsoft.DotNet.Helix/JobSender/Microsoft.DotNet.Helix.JobSender.csproj
index acb482b56fa..e6886316066 100644
--- a/src/Microsoft.DotNet.Helix/JobSender/Microsoft.DotNet.Helix.JobSender.csproj
+++ b/src/Microsoft.DotNet.Helix/JobSender/Microsoft.DotNet.Helix.JobSender.csproj
@@ -1,7 +1,8 @@
- $(BundledNETCoreAppTargetFramework)
+
+ $(NetToolCurrent);netstandard2.0;$(NetFrameworkToolCurrent)
true
Microsoft.DotNet.Helix.Client
This package provides a simple API for constructing and sending jobs to the Helix Api
@@ -17,8 +18,15 @@
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/CreateXHarnessAndroidWorkItemsTests.cs b/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/CreateXHarnessAndroidWorkItemsTests.cs
index 6880c3ee589..3a583af2cf4 100644
--- a/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/CreateXHarnessAndroidWorkItemsTests.cs
+++ b/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/CreateXHarnessAndroidWorkItemsTests.cs
@@ -3,7 +3,7 @@
using System.Linq;
using System.Threading.Tasks;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Common;
using Microsoft.Arcade.Test.Common;
using Microsoft.Build.Framework;
diff --git a/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/CreateXHarnessAppleWorkItemsTests.cs b/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/CreateXHarnessAppleWorkItemsTests.cs
index 7a4df6ffb1a..afc04b2181c 100644
--- a/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/CreateXHarnessAppleWorkItemsTests.cs
+++ b/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/CreateXHarnessAppleWorkItemsTests.cs
@@ -3,7 +3,7 @@
using System.Linq;
using System.Threading.Tasks;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Common;
using Microsoft.Arcade.Test.Common;
using Microsoft.Build.Framework;
diff --git a/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/FindDotNetCliPackageTests.cs b/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/FindDotNetCliPackageTests.cs
index d07e4c67bb8..b5eca9d6bb1 100644
--- a/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/FindDotNetCliPackageTests.cs
+++ b/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/FindDotNetCliPackageTests.cs
@@ -5,7 +5,7 @@
using System.Net;
using System.Net.Http;
using System.Text.RegularExpressions;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Common;
using Microsoft.Arcade.Test.Common;
using Microsoft.Build.Framework;
diff --git a/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/InstallDotNetToolTests.cs b/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/InstallDotNetToolTests.cs
index 204c09e1d9d..66eb52cca63 100644
--- a/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/InstallDotNetToolTests.cs
+++ b/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/InstallDotNetToolTests.cs
@@ -7,7 +7,7 @@
using System.IO;
using System.Linq;
using System.Threading.Tasks;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Common;
using Microsoft.Arcade.Test.Common;
using Microsoft.DotNet.Internal.DependencyInjection.Testing;
@@ -174,7 +174,7 @@ public void InstallsToolWithExtraParamsSuccessfully()
"net6.0",
"--arch",
"arm64",
- "--source",
+ "--add-source",
"https://dev.azure.com/some/feed",
ToolName,
};
diff --git a/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests.csproj b/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests.csproj
index 7fd8f7231cf..970d2627c6f 100644
--- a/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests.csproj
+++ b/src/Microsoft.DotNet.Helix/Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests/Microsoft.DotNet.Helix.Sdk.Tests.csproj
@@ -1,11 +1,11 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
-
+
diff --git a/src/Microsoft.DotNet.Helix/Sdk/AzureDevOpsTask.cs b/src/Microsoft.DotNet.Helix/Sdk/AzureDevOpsTask.cs
index e6e2b759a9c..a102acb64dc 100644
--- a/src/Microsoft.DotNet.Helix/Sdk/AzureDevOpsTask.cs
+++ b/src/Microsoft.DotNet.Helix/Sdk/AzureDevOpsTask.cs
@@ -62,6 +62,7 @@ private async Task ExecuteAsync()
// observed on Mac anyway.
// https://github.com/dotnet/dnceng/issues/6410
+#if NET
using SocketsHttpHandler handler = new SocketsHttpHandler
{
AllowAutoRedirect = false,
@@ -87,6 +88,13 @@ private async Task ExecuteAsync()
};
using (var client = new HttpClient(handler)
+#else
+ using (var client = new HttpClient(new HttpClientHandler
+ {
+ AllowAutoRedirect = false,
+ CheckCertificateRevocationList = true,
+ })
+#endif
{
DefaultRequestHeaders =
{
diff --git a/src/Microsoft.DotNet.Helix/Sdk/BaseTask.Desktop.cs b/src/Microsoft.DotNet.Helix/Sdk/BaseTask.Desktop.cs
new file mode 100644
index 00000000000..9d6c80c8af3
--- /dev/null
+++ b/src/Microsoft.DotNet.Helix/Sdk/BaseTask.Desktop.cs
@@ -0,0 +1,15 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using Microsoft.Arcade.Common.Desktop;
+
+namespace Microsoft.DotNet.Helix
+{
+ public partial class BaseTask
+ {
+ static BaseTask()
+ {
+ AssemblyResolver.Enable();
+ }
+ }
+}
diff --git a/src/Microsoft.DotNet.Helix/Sdk/CreateXHarnessAndroidWorkItems.cs b/src/Microsoft.DotNet.Helix/Sdk/CreateXHarnessAndroidWorkItems.cs
index e8f00390894..fa0544c68a5 100644
--- a/src/Microsoft.DotNet.Helix/Sdk/CreateXHarnessAndroidWorkItems.cs
+++ b/src/Microsoft.DotNet.Helix/Sdk/CreateXHarnessAndroidWorkItems.cs
@@ -157,9 +157,7 @@ private string GetDefaultCommand(ITaskItem appPackage, int expectedExitCode)
"--timeout \"$timeout\" " +
"--package-name \"$package_name\" " +
" -v " +
- $"{ devOutArg } { instrumentationArg } { exitCodeArg } { extraArguments } " +
- "--arg env:DOTNET_CI=true " +
- $"{ passthroughArgs }";
+ $"{ devOutArg } { instrumentationArg } { exitCodeArg } { extraArguments } { passthroughArgs }";
}
private string GetHelixCommand(
diff --git a/src/Microsoft.DotNet.Helix/Sdk/CreateXHarnessAppleWorkItems.cs b/src/Microsoft.DotNet.Helix/Sdk/CreateXHarnessAppleWorkItems.cs
index a1d7c943d8c..0eb88de121b 100644
--- a/src/Microsoft.DotNet.Helix/Sdk/CreateXHarnessAppleWorkItems.cs
+++ b/src/Microsoft.DotNet.Helix/Sdk/CreateXHarnessAppleWorkItems.cs
@@ -213,7 +213,6 @@ private string GetDefaultCommand(bool includesTestRunner, bool resetSimulator) =
"-v " +
(!includesTestRunner ? "--expected-exit-code $expected_exit_code " : string.Empty) +
(resetSimulator ? $"--reset-simulator " : string.Empty) +
- "--set-env=DOTNET_CI=true " +
(!string.IsNullOrEmpty(AppArguments) ? "-- " + AppArguments : string.Empty);
private string GetHelixCommand(
diff --git a/src/Microsoft.DotNet.Helix/Sdk/CreateXUnitV3WorkItems.cs b/src/Microsoft.DotNet.Helix/Sdk/CreateXUnitV3WorkItems.cs
deleted file mode 100644
index 1cad75467b1..00000000000
--- a/src/Microsoft.DotNet.Helix/Sdk/CreateXUnitV3WorkItems.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.Build.Framework;
-
-namespace Microsoft.DotNet.Helix.Sdk
-{
- ///
- /// MSBuild custom task to create HelixWorkItems for XUnit v3 test projects.
- /// Unlike v2 tests which need an external console runner, v3 tests are
- /// self-hosting executables that can be run directly with 'dotnet exec'.
- ///
- public class CreateXUnitV3WorkItems : BaseTask
- {
- ///
- /// An array of XUnit v3 project workitems containing the following metadata:
- /// - [Required] PublishDirectory: the publish output directory of the test project
- /// - [Required] TargetPath: the output dll path
- /// - [Optional] Arguments: a string of arguments to be passed to the test executable
- /// The two required parameters will be automatically created if XUnitV3Project.Identity is set to the path of the XUnit v3 csproj file
- ///
- [Required]
- public ITaskItem[] XUnitV3Projects { get; set; }
-
- ///
- /// The path to the dotnet executable on the Helix agent. Defaults to "dotnet"
- ///
- public string PathToDotnet { get; set; } = "dotnet";
-
- ///
- /// Boolean true if this is a posix shell, false if not.
- /// This does not need to be set by a user; it is automatically determined in Microsoft.DotNet.Helix.Sdk.MonoQueue.targets
- ///
- [Required]
- public bool IsPosixShell { get; set; }
-
- ///
- /// Optional timeout for all created workitems.
- /// Defaults to 300s.
- ///
- public string XUnitWorkItemTimeout { get; set; }
-
- ///
- /// Whether to use Microsoft Testing Platform (MTP) command-line arguments.
- /// When true, uses --report-xunit/--auto-reporters off style arguments.
- /// When false, uses legacy -xml/-noAutoReporters style arguments.
- ///
- public bool UseMicrosoftTestingPlatformRunner { get; set; }
-
- ///
- /// An array of ITaskItems of type HelixWorkItem
- ///
- [Output]
- public ITaskItem[] XUnitV3WorkItems { get; set; }
-
- ///
- /// The main method of this MSBuild task which calls the asynchronous execution method and
- /// collates logged errors in order to determine the success of HelixWorkItem creation per
- /// provided XUnit v3 project data.
- ///
- /// A boolean value indicating the success of HelixWorkItem creation per provided XUnit v3 project data.
- public override bool Execute()
- {
- ExecuteAsync().GetAwaiter().GetResult();
- return !Log.HasLoggedErrors;
- }
-
- ///
- /// The asynchronous execution method for this MSBuild task which verifies the integrity of required properties
- /// and validates their formatting, specifically determining whether the provided XUnit v3 project data have a
- /// one-to-one mapping. It then creates this mapping before asynchronously preparing the HelixWorkItem TaskItem
- /// objects via the PrepareWorkItem method.
- ///
- private async Task ExecuteAsync()
- {
- XUnitV3WorkItems = (await Task.WhenAll(XUnitV3Projects.Select(PrepareWorkItem))).Where(wi => wi != null).ToArray();
- }
-
- ///
- /// Prepares HelixWorkItem given XUnit v3 project information.
- ///
- /// An ITaskItem instance representing the prepared HelixWorkItem.
- private async Task PrepareWorkItem(ITaskItem xunitV3Project)
- {
- // Forces this task to run asynchronously
- await Task.Yield();
-
- if (!xunitV3Project.GetRequiredMetadata(Log, "PublishDirectory", out string publishDirectory))
- {
- return null;
- }
- if (!xunitV3Project.GetRequiredMetadata(Log, "TargetPath", out string targetPath))
- {
- return null;
- }
-
- xunitV3Project.TryGetMetadata("Arguments", out string arguments);
-
- string assemblyName = Path.GetFileName(targetPath);
- string assemblyBaseName = assemblyName;
- if (assemblyBaseName.EndsWith(".dll"))
- {
- assemblyBaseName = assemblyBaseName.Substring(0, assemblyBaseName.Length - 4);
- }
-
- // XUnit v3 tests are self-hosting - run the assembly directly with dotnet exec
- string resultArgs = UseMicrosoftTestingPlatformRunner
- ? "--results-directory . --report-xunit --report-xunit-filename testResults.xml --auto-reporters off"
- : "-xml testResults.xml -noAutoReporters";
-
- string command = $"{PathToDotnet} exec --roll-forward Major " +
- $"--runtimeconfig {assemblyBaseName}.runtimeconfig.json " +
- $"--depsfile {assemblyBaseName}.deps.json " +
- $"{assemblyName} {resultArgs}" +
- (string.IsNullOrEmpty(arguments) ? "" : " " + arguments);
-
- Log.LogMessage($"Creating XUnit v3 work item with properties Identity: {assemblyName}, PayloadDirectory: {publishDirectory}, Command: {command}");
-
- TimeSpan timeout = TimeSpan.FromMinutes(5);
- if (!string.IsNullOrEmpty(XUnitWorkItemTimeout))
- {
- if (!TimeSpan.TryParse(XUnitWorkItemTimeout, out timeout))
- {
- Log.LogWarning($"Invalid value \"{XUnitWorkItemTimeout}\" provided for XUnitWorkItemTimeout; falling back to default value of \"00:05:00\" (5 minutes)");
- }
- }
-
- var result = new Microsoft.Build.Utilities.TaskItem(assemblyName, new Dictionary()
- {
- { "Identity", assemblyName },
- { "PayloadDirectory", publishDirectory },
- { "Command", command },
- { "Timeout", timeout.ToString() },
- });
- xunitV3Project.CopyMetadataTo(result);
- return result;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Helix/Sdk/FindDotNetCliPackage.cs b/src/Microsoft.DotNet.Helix/Sdk/FindDotNetCliPackage.cs
index 59723ce43c2..76a6faa1848 100644
--- a/src/Microsoft.DotNet.Helix/Sdk/FindDotNetCliPackage.cs
+++ b/src/Microsoft.DotNet.Helix/Sdk/FindDotNetCliPackage.cs
@@ -60,6 +60,7 @@ public class FindDotNetCliPackage : MSBuildTaskBase
public override void ConfigureServices(IServiceCollection collection)
{
+#if NET
var socketsHandler = new SocketsHttpHandler
{
AllowAutoRedirect = true,
@@ -84,7 +85,9 @@ public override void ConfigureServices(IServiceCollection collection)
VerificationTimeIgnored = true,
};
_httpMessageHandler = socketsHandler;
-
+#else
+ _httpMessageHandler = new HttpClientHandler { CheckCertificateRevocationList = true };
+#endif
collection.TryAddSingleton(_httpMessageHandler);
collection.TryAddSingleton(Log);
}
diff --git a/src/Microsoft.DotNet.Helix/Sdk/InstallDotNetTool.cs b/src/Microsoft.DotNet.Helix/Sdk/InstallDotNetTool.cs
index 5e636785c46..12dd11c595a 100644
--- a/src/Microsoft.DotNet.Helix/Sdk/InstallDotNetTool.cs
+++ b/src/Microsoft.DotNet.Helix/Sdk/InstallDotNetTool.cs
@@ -145,7 +145,7 @@ private bool InstallTool(ICommandFactory commandFactory)
if (!string.IsNullOrEmpty(Source))
{
- args.Add("--source");
+ args.Add("--add-source");
args.Add(Source);
}
diff --git a/src/Microsoft.DotNet.Helix/Sdk/Microsoft.DotNet.Helix.Sdk.csproj b/src/Microsoft.DotNet.Helix/Sdk/Microsoft.DotNet.Helix.Sdk.csproj
index bb3d2d3ea8b..6e1b0a8cf9c 100644
--- a/src/Microsoft.DotNet.Helix/Sdk/Microsoft.DotNet.Helix.Sdk.csproj
+++ b/src/Microsoft.DotNet.Helix/Sdk/Microsoft.DotNet.Helix.Sdk.csproj
@@ -1,11 +1,10 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
MSBuildSdk
true
- false
- true
+ **/*.Desktop.*
@@ -15,8 +14,13 @@
+
-
+
+
+
@@ -25,6 +29,12 @@
+
+
+
+
+
+
-
-
-
-
-
-
- true
-
-
-
-
-
+
+
-
-
- $(BundledRuntimeIdentifierGraphFile)
+
+ $(MSBuildThisFileDirectory)net/Microsoft.DotNet.Helix.Sdk.dll
+ $(MSBuildThisFileDirectory)netframework/Microsoft.DotNet.Helix.Sdk.dll
- $(MSBuildThisFileDirectory)net/Microsoft.DotNet.Helix.Sdk.dll
- AssemblyTaskFactory
Helix
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/Microsoft.DotNet.Helix.Sdk.targets b/src/Microsoft.DotNet.Helix/Sdk/tools/Microsoft.DotNet.Helix.Sdk.targets
index 3e8fc6f81d7..f4e34394a37 100644
--- a/src/Microsoft.DotNet.Helix/Sdk/tools/Microsoft.DotNet.Helix.Sdk.targets
+++ b/src/Microsoft.DotNet.Helix/Sdk/tools/Microsoft.DotNet.Helix.Sdk.targets
@@ -1,9 +1,64 @@
-
-
-
+
+
+
+
+
+
+ BuildOnlySettings;
+ PrepareForBuild;
+ PreBuildEvent;
+ ResolveReferences;
+ PostBuildEvent
+
+
+
+
+
+ BeforeResolveReferences;
+ AssignProjectConfiguration;
+ ResolveProjectReferences;
+ FindInvalidProjectReferences;
+ AfterResolveReferences
+
+
+
+ BeforeClean;
+ UnmanagedUnregistration;
+ CoreClean;
+ PrepareProjectReferences;
+ CleanPublishFolder;
+ AfterClean
+
+
+
+
+
+
+
+
+
+ Build;
+ BeforeTest;
+ CoreTest;
+ AfterTest;
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/NoBuild.targets b/src/Microsoft.DotNet.Helix/Sdk/tools/NoBuild.targets
deleted file mode 100644
index d8385a64845..00000000000
--- a/src/Microsoft.DotNet.Helix/Sdk/tools/NoBuild.targets
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
- BuildOnlySettings;
- PrepareForBuild;
- PreBuildEvent;
- ResolveReferences;
- PostBuildEvent
-
-
-
-
-
- BeforeResolveReferences;
- AssignProjectConfiguration;
- ResolveProjectReferences;
- FindInvalidProjectReferences;
- AfterResolveReferences
-
-
-
- BeforeClean;
- UnmanagedUnregistration;
- CoreClean;
- PrepareProjectReferences;
- CleanPublishFolder;
- AfterClean
-
-
-
-
-
-
-
-
-
- Build;
- BeforeTest;
- CoreTest;
- AfterTest;
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/azure-pipelines/reporter/formats/trx.py b/src/Microsoft.DotNet.Helix/Sdk/tools/azure-pipelines/reporter/formats/trx.py
index 850da8658c6..cb2afbec916 100644
--- a/src/Microsoft.DotNet.Helix/Sdk/tools/azure-pipelines/reporter/formats/trx.py
+++ b/src/Microsoft.DotNet.Helix/Sdk/tools/azure-pipelines/reporter/formats/trx.py
@@ -45,13 +45,7 @@ def read_results(self, path):
classname = test_classes[test_id]
method = test_methods[test_id]
- # xunit reports testName as the fully qualified name
- # (ClassName.MethodName), while MSTest uses just the method name.
- # Avoid duplicating the class prefix when it's already present.
- if test_name.startswith(classname + '.'):
- name = test_name
- else:
- name = classname + '.' + test_name
+ name = classname + '.' + test_name
type_name = classname
duration = 0.0
result = "Pass"
diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-helix-job.android.sh b/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-helix-job.android.sh
index 68f943d56d3..c6a5c4023ea 100644
--- a/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-helix-job.android.sh
+++ b/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-helix-job.android.sh
@@ -78,15 +78,6 @@ function report_infrastructure_failure() {
}
# Act out the actual commands (and time constrain them to create buffer for the end of this script)
-# shellcheck disable=SC1091
-source command.sh &
-COMMAND_PID=$!
-sleep "$command_timeout" && kill -s 0 $COMMAND_PID > /dev/null 2>&1 && echo "ERROR: WORKLOAD TIMED OUT - Killing user command.." && kill $COMMAND_PID 2> /dev/null &
-WATCHDOG_PID=$!
-wait $COMMAND_PID
-exit_code=$?
-# Kill the watchdog process (and its sleeping child) now that the command has finished
-kill $WATCHDOG_PID 2> /dev/null
-wait $WATCHDOG_PID 2> /dev/null
+source command.sh & PID=$! ; (sleep "$command_timeout" && kill -s 0 $PID > /dev/null 2>&1 && echo "ERROR: WORKLOAD TIMED OUT - Killing user command.." && kill $PID 2> /dev/null & ) ; wait $PID
-exit $exit_code
+exit $?
diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-runner.apple.sh b/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-runner.apple.sh
index df05d3dab70..d9a19177447 100644
--- a/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-runner.apple.sh
+++ b/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-runner.apple.sh
@@ -184,15 +184,8 @@ start_time="$(date '+%Y-%m-%d %H:%M:%S')"
# Act out the actual commands (and time constrain them to create buffer for the end of this script)
# shellcheck disable=SC1091
-source command.sh &
-COMMAND_PID=$!
-sleep "$command_timeout" && kill -s 0 $COMMAND_PID > /dev/null 2>&1 && echo "ERROR: WORKLOAD TIMED OUT - Killing user command.." && kill $COMMAND_PID 2> /dev/null &
-WATCHDOG_PID=$!
-wait $COMMAND_PID
+source command.sh & PID=$! ; (sleep "$command_timeout" && kill -s 0 $PID > /dev/null 2>&1 && echo "ERROR: WORKLOAD TIMED OUT - Killing user command.." && kill $PID 2> /dev/null & ) ; wait $PID
exit_code=$?
-# Kill the watchdog process (and its sleeping child) now that the command has finished
-kill $WATCHDOG_PID 2> /dev/null
-wait $WATCHDOG_PID 2> /dev/null
# In case of issues, include the syslog (last 2 MB from the time this work item has been running)
if [ $exit_code -ne 0 ]; then
diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/xunit-runner/XUnitRunner.targets b/src/Microsoft.DotNet.Helix/Sdk/tools/xunit-runner/XUnitRunner.targets
index 5c2f250360e..93d1cc833a2 100644
--- a/src/Microsoft.DotNet.Helix/Sdk/tools/xunit-runner/XUnitRunner.targets
+++ b/src/Microsoft.DotNet.Helix/Sdk/tools/xunit-runner/XUnitRunner.targets
@@ -2,7 +2,7 @@
- net11.0
+ net10.0
netcoreapp2.0
2.9.3
diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/xunitv3-runner/XUnitV3Runner.props b/src/Microsoft.DotNet.Helix/Sdk/tools/xunitv3-runner/XUnitV3Runner.props
deleted file mode 100644
index 448853fb587..00000000000
--- a/src/Microsoft.DotNet.Helix/Sdk/tools/xunitv3-runner/XUnitV3Runner.props
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- <_HelixMonoQueueTargets>$(_HelixMonoQueueTargets);$(MSBuildThisFileDirectory)XUnitV3Runner.targets
-
-
-
diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/xunitv3-runner/XUnitV3Runner.targets b/src/Microsoft.DotNet.Helix/Sdk/tools/xunitv3-runner/XUnitV3Runner.targets
deleted file mode 100644
index 95b55816a0f..00000000000
--- a/src/Microsoft.DotNet.Helix/Sdk/tools/xunitv3-runner/XUnitV3Runner.targets
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
- <_XUnitV3PublishTargetsPath>$(MSBuildThisFileDirectory)../xunit-runner/XUnitPublish.targets
-
-
- true
-
-
-
-
-
-
-
-
-
- <_CurrentXUnitV3Project>%(XUnitV3Project.Identity)
- <_CurrentXUnitV3AdditionalProperties>%(XUnitV3Project.AdditionalProperties)
-
-
-
-
-
-
-
-
-
-
- $(_XUnitV3PublishOutputDir)
- $(_XUnitV3TargetPath)
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Microsoft.DotNet.Internal.DependencyInjection.Testing/Microsoft.DotNet.Internal.DependencyInjection.Testing.csproj b/src/Microsoft.DotNet.Internal.DependencyInjection.Testing/Microsoft.DotNet.Internal.DependencyInjection.Testing.csproj
index 00ee17d4f1b..61cf5eb57df 100644
--- a/src/Microsoft.DotNet.Internal.DependencyInjection.Testing/Microsoft.DotNet.Internal.DependencyInjection.Testing.csproj
+++ b/src/Microsoft.DotNet.Internal.DependencyInjection.Testing/Microsoft.DotNet.Internal.DependencyInjection.Testing.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
diff --git a/src/Microsoft.DotNet.Internal.SymbolHelper/Microsoft.DotNet.Internal.SymbolHelper.csproj b/src/Microsoft.DotNet.Internal.SymbolHelper/Microsoft.DotNet.Internal.SymbolHelper.csproj
index 517a3da0038..9b2bc487369 100644
--- a/src/Microsoft.DotNet.Internal.SymbolHelper/Microsoft.DotNet.Internal.SymbolHelper.csproj
+++ b/src/Microsoft.DotNet.Internal.SymbolHelper/Microsoft.DotNet.Internal.SymbolHelper.csproj
@@ -1,12 +1,20 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
true
true
+
+
+
diff --git a/src/Microsoft.DotNet.MacOsPkg.Tests/Microsoft.DotNet.MacOsPkg.Tests.csproj b/src/Microsoft.DotNet.MacOsPkg.Tests/Microsoft.DotNet.MacOsPkg.Tests.csproj
index c315fe4f2fd..bf8fa2ea936 100644
--- a/src/Microsoft.DotNet.MacOsPkg.Tests/Microsoft.DotNet.MacOsPkg.Tests.csproj
+++ b/src/Microsoft.DotNet.MacOsPkg.Tests/Microsoft.DotNet.MacOsPkg.Tests.csproj
@@ -1,12 +1,12 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
enable
-
+
@@ -20,15 +20,16 @@
-
-
+
<_MacOSPkgToolPattern>@(_MacOsPkgToolPath->'%(RootDir)%(Directory)')**\*.*
diff --git a/src/Microsoft.DotNet.MacOsPkg.Tests/UnpackPackTests.cs b/src/Microsoft.DotNet.MacOsPkg.Tests/UnpackPackTests.cs
index 5a38af10d1a..743cb881934 100644
--- a/src/Microsoft.DotNet.MacOsPkg.Tests/UnpackPackTests.cs
+++ b/src/Microsoft.DotNet.MacOsPkg.Tests/UnpackPackTests.cs
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using AwesomeAssertions;
+using FluentAssertions;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -24,7 +24,7 @@ public class UnpackPackTests
Path.GetDirectoryName(typeof(UnpackPackTests).Assembly.Location)!,
"tools",
"macospkg",
- "Microsoft.DotNet.MacOsPkg.Cli.dll");
+ "Microsoft.Dotnet.MacOsPkg.dll");
const UnixFileMode nonExecutableFileMode = UnixFileMode.OtherRead |
UnixFileMode.GroupRead |
@@ -216,7 +216,7 @@ private bool RunPkgProcess(string inputPath, string outputPath, string action)
var process = Process.Start(new ProcessStartInfo()
{
FileName = "dotnet",
- Arguments = $@"exec ""{pkgToolPath}"" {action} ""{inputPath}"" ""{outputPath}""",
+ Arguments = $@"exec ""{pkgToolPath}"" ""{inputPath}"" ""{outputPath}"" {action}",
UseShellExecute = false,
RedirectStandardError = true,
});
diff --git a/src/Microsoft.DotNet.MacOsPkg/Cli/Microsoft.DotNet.MacOsPkg.Cli.csproj b/src/Microsoft.DotNet.MacOsPkg/Cli/Microsoft.DotNet.MacOsPkg.Cli.csproj
index 4491fe5ef78..c5ac6d05aea 100644
--- a/src/Microsoft.DotNet.MacOsPkg/Cli/Microsoft.DotNet.MacOsPkg.Cli.csproj
+++ b/src/Microsoft.DotNet.MacOsPkg/Cli/Microsoft.DotNet.MacOsPkg.Cli.csproj
@@ -1,21 +1,25 @@
- $(BundledNETCoreAppTargetFramework)
+
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
Exe
enable
true
The MacOsPkg CLI tool is used for unpacking, packing, and validating MacOS .pkg files and nested .app bundles.
Arcade Build Tool MacOS Pkg
false
- false
- true
- dotnet-macos-pkg
-
-
+
+
+
+ true
+ dotnet-macos-pkg
+
+
diff --git a/src/Microsoft.DotNet.MacOsPkg/Core/Microsoft.DotNet.MacOsPkg.Core.csproj b/src/Microsoft.DotNet.MacOsPkg/Core/Microsoft.DotNet.MacOsPkg.Core.csproj
index 6cbf9db68cd..dc9776f9fe8 100644
--- a/src/Microsoft.DotNet.MacOsPkg/Core/Microsoft.DotNet.MacOsPkg.Core.csproj
+++ b/src/Microsoft.DotNet.MacOsPkg/Core/Microsoft.DotNet.MacOsPkg.Core.csproj
@@ -1,7 +1,8 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
+ Library
enable
true
The MacOsPkg Library is used for unpacking, packing, and validating MacOS .pkg files and nested .app bundles.
diff --git a/src/Microsoft.DotNet.NuGetRepack/tasks/Microsoft.DotNet.NuGetRepack.Tasks.csproj b/src/Microsoft.DotNet.NuGetRepack/tasks/Microsoft.DotNet.NuGetRepack.Tasks.csproj
index 28543282f6c..64d4a8c22a0 100644
--- a/src/Microsoft.DotNet.NuGetRepack/tasks/Microsoft.DotNet.NuGetRepack.Tasks.csproj
+++ b/src/Microsoft.DotNet.NuGetRepack/tasks/Microsoft.DotNet.NuGetRepack.Tasks.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
true
true
MSBuildSdk
@@ -13,9 +13,17 @@
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.NuGetRepack/tasks/src/AssemblyResolution.cs b/src/Microsoft.DotNet.NuGetRepack/tasks/src/AssemblyResolution.cs
new file mode 100644
index 00000000000..07d6a5d2fa6
--- /dev/null
+++ b/src/Microsoft.DotNet.NuGetRepack/tasks/src/AssemblyResolution.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#if NET472
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Microsoft.DotNet.Tools
+{
+ internal static class AssemblyResolution
+ {
+ internal static TaskLoggingHelper Log;
+
+ public static void Initialize()
+ {
+ AppDomain.CurrentDomain.AssemblyResolve += AssemblyResolve;
+ }
+
+ private static Assembly AssemblyResolve(object sender, ResolveEventArgs args)
+ {
+ var name = new AssemblyName(args.Name);
+
+ if (!name.Name.Equals("System.Collections.Immutable", StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
+
+ var fullPath = Path.Combine(Path.GetDirectoryName(typeof(AssemblyResolution).Assembly.Location), "System.Collections.Immutable.dll");
+
+ Assembly sci;
+ try
+ {
+ sci = Assembly.LoadFile(fullPath);
+ }
+ catch (Exception e)
+ {
+ Log?.LogWarning($"AssemblyResolve: exception while loading '{fullPath}': {e.Message}");
+ return null;
+ }
+
+ if (name.Version <= sci.GetName().Version)
+ {
+ Log?.LogMessage(MessageImportance.Low, $"AssemblyResolve: loaded '{fullPath}' to {AppDomain.CurrentDomain.FriendlyName}");
+ return sci;
+ }
+
+ return null;
+ }
+ }
+}
+
+#endif
diff --git a/src/Microsoft.DotNet.NuGetRepack/tasks/src/ReplacePackageParts.cs b/src/Microsoft.DotNet.NuGetRepack/tasks/src/ReplacePackageParts.cs
index e715f80a5d4..0d9d22ec6a5 100644
--- a/src/Microsoft.DotNet.NuGetRepack/tasks/src/ReplacePackageParts.cs
+++ b/src/Microsoft.DotNet.NuGetRepack/tasks/src/ReplacePackageParts.cs
@@ -17,8 +17,15 @@ namespace Microsoft.DotNet.Tools
///
/// Replaces content of files in specified package with new content and updates version of the package.
///
+#if NET472
+ [LoadInSeparateAppDomain]
+ public sealed class ReplacePackageParts : AppDomainIsolatedTask
+ {
+ static ReplacePackageParts() => AssemblyResolution.Initialize();
+#else
public sealed class ReplacePackageParts : Microsoft.Build.Utilities.Task
{
+#endif
///
/// Full path to the package to process.
///
@@ -60,6 +67,9 @@ public sealed class ReplacePackageParts : Microsoft.Build.Utilities.Task
public override bool Execute()
{
+#if NET472
+ AssemblyResolution.Log = Log;
+#endif
try
{
ExecuteImpl();
@@ -67,6 +77,9 @@ public override bool Execute()
}
finally
{
+#if NET472
+ AssemblyResolution.Log = null;
+#endif
}
}
diff --git a/src/Microsoft.DotNet.NuGetRepack/tasks/src/UpdatePackageVersionTask.cs b/src/Microsoft.DotNet.NuGetRepack/tasks/src/UpdatePackageVersionTask.cs
index 751c56330df..8f922025d15 100644
--- a/src/Microsoft.DotNet.NuGetRepack/tasks/src/UpdatePackageVersionTask.cs
+++ b/src/Microsoft.DotNet.NuGetRepack/tasks/src/UpdatePackageVersionTask.cs
@@ -10,8 +10,15 @@
namespace Microsoft.DotNet.Tools
{
+#if NET472
+ [LoadInSeparateAppDomain]
+ public sealed class UpdatePackageVersionTask : AppDomainIsolatedTask
+ {
+ static UpdatePackageVersionTask() => AssemblyResolution.Initialize();
+#else
public class UpdatePackageVersionTask : Microsoft.Build.Utilities.Task
{
+#endif
public string VersionKind { get; set; }
[Required]
@@ -26,6 +33,9 @@ public class UpdatePackageVersionTask : Microsoft.Build.Utilities.Task
public override bool Execute()
{
+#if NET472
+ AssemblyResolution.Log = Log;
+#endif
try
{
ExecuteImpl();
@@ -33,6 +43,9 @@ public override bool Execute()
}
finally
{
+#if NET472
+ AssemblyResolution.Log = null;
+#endif
}
}
diff --git a/src/Microsoft.DotNet.NuGetRepack/tests/Microsoft.DotNet.NuGetRepack.Tests.csproj b/src/Microsoft.DotNet.NuGetRepack/tests/Microsoft.DotNet.NuGetRepack.Tests.csproj
index 1fa17785aa7..c202f2e3d6a 100644
--- a/src/Microsoft.DotNet.NuGetRepack/tests/Microsoft.DotNet.NuGetRepack.Tests.csproj
+++ b/src/Microsoft.DotNet.NuGetRepack/tests/Microsoft.DotNet.NuGetRepack.Tests.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
$(DefaultExcludesInProjectFolder);Resources\*.cs
diff --git a/src/Microsoft.DotNet.PackageTesting.Tests/Microsoft.DotNet.PackageTesting.Tests.csproj b/src/Microsoft.DotNet.PackageTesting.Tests/Microsoft.DotNet.PackageTesting.Tests.csproj
index 6adcf914d2d..ed72ff9eaf6 100644
--- a/src/Microsoft.DotNet.PackageTesting.Tests/Microsoft.DotNet.PackageTesting.Tests.csproj
+++ b/src/Microsoft.DotNet.PackageTesting.Tests/Microsoft.DotNet.PackageTesting.Tests.csproj
@@ -1,12 +1,16 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
+
+
+
+
diff --git a/src/Microsoft.DotNet.PackageTesting/Microsoft.DotNet.PackageTesting.csproj b/src/Microsoft.DotNet.PackageTesting/Microsoft.DotNet.PackageTesting.csproj
index 92fbc5f27c6..74b80da5bfe 100644
--- a/src/Microsoft.DotNet.PackageTesting/Microsoft.DotNet.PackageTesting.csproj
+++ b/src/Microsoft.DotNet.PackageTesting/Microsoft.DotNet.PackageTesting.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
MSBuildSdk
true
true
@@ -13,6 +13,10 @@
+
+
+
+
diff --git a/src/Microsoft.DotNet.PackageTesting/build/Microsoft.DotNet.PackageTesting.props b/src/Microsoft.DotNet.PackageTesting/build/Microsoft.DotNet.PackageTesting.props
index b59d540b0fb..9eabfb1d4c4 100644
--- a/src/Microsoft.DotNet.PackageTesting/build/Microsoft.DotNet.PackageTesting.props
+++ b/src/Microsoft.DotNet.PackageTesting/build/Microsoft.DotNet.PackageTesting.props
@@ -2,11 +2,12 @@
- $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.PackageTesting.dll
+ $(MSBuildThisFileDirectory)..\tools\netframework\Microsoft.DotNet.PackageTesting.dll
+ $(MSBuildThisFileDirectory)..\tools\net\Microsoft.DotNet.PackageTesting.dll
-
-
-
+
+
+
diff --git a/src/Microsoft.DotNet.RemoteExecutor/tests/Microsoft.DotNet.RemoteExecutor.Tests.csproj b/src/Microsoft.DotNet.RemoteExecutor/tests/Microsoft.DotNet.RemoteExecutor.Tests.csproj
index e7e45e6574c..0db92001071 100644
--- a/src/Microsoft.DotNet.RemoteExecutor/tests/Microsoft.DotNet.RemoteExecutor.Tests.csproj
+++ b/src/Microsoft.DotNet.RemoteExecutor/tests/Microsoft.DotNet.RemoteExecutor.Tests.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
true
diff --git a/src/Microsoft.DotNet.SetupNugetSources.Tests/BoundaryConditionTests.cs b/src/Microsoft.DotNet.SetupNugetSources.Tests/BoundaryConditionTests.cs
index 2ed009d5620..96366159bed 100644
--- a/src/Microsoft.DotNet.SetupNugetSources.Tests/BoundaryConditionTests.cs
+++ b/src/Microsoft.DotNet.SetupNugetSources.Tests/BoundaryConditionTests.cs
@@ -4,7 +4,7 @@
using System;
using System.IO;
using System.Threading.Tasks;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.DotNet.XUnitExtensions;
using Xunit;
diff --git a/src/Microsoft.DotNet.SetupNugetSources.Tests/CredentialHandlingTests.cs b/src/Microsoft.DotNet.SetupNugetSources.Tests/CredentialHandlingTests.cs
index accb4518aaf..a9cf811728b 100644
--- a/src/Microsoft.DotNet.SetupNugetSources.Tests/CredentialHandlingTests.cs
+++ b/src/Microsoft.DotNet.SetupNugetSources.Tests/CredentialHandlingTests.cs
@@ -4,7 +4,7 @@
using System;
using System.IO;
using System.Threading.Tasks;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.DotNet.XUnitExtensions;
using Xunit;
diff --git a/src/Microsoft.DotNet.SetupNugetSources.Tests/FeedEnablingTests.cs b/src/Microsoft.DotNet.SetupNugetSources.Tests/FeedEnablingTests.cs
index dcbbcc161cc..d38cab4887b 100644
--- a/src/Microsoft.DotNet.SetupNugetSources.Tests/FeedEnablingTests.cs
+++ b/src/Microsoft.DotNet.SetupNugetSources.Tests/FeedEnablingTests.cs
@@ -4,7 +4,7 @@
using System;
using System.IO;
using System.Threading.Tasks;
-using AwesomeAssertions;
+using FluentAssertions;
using Xunit;
namespace Microsoft.DotNet.SetupNugetSources.Tests
diff --git a/src/Microsoft.DotNet.SetupNugetSources.Tests/InternalFeedAdditionTests.cs b/src/Microsoft.DotNet.SetupNugetSources.Tests/InternalFeedAdditionTests.cs
index e205d494cf7..3427526ae02 100644
--- a/src/Microsoft.DotNet.SetupNugetSources.Tests/InternalFeedAdditionTests.cs
+++ b/src/Microsoft.DotNet.SetupNugetSources.Tests/InternalFeedAdditionTests.cs
@@ -4,7 +4,7 @@
using System;
using System.IO;
using System.Threading.Tasks;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.DotNet.XUnitExtensions;
using Xunit;
@@ -143,6 +143,129 @@ public async Task ConfigWithExistingInternalFeed_DoesNotDuplicate()
// Should have 4 total sources (3 original + 1 added transport)
modifiedConfig.GetPackageSourceCount().Should().Be(4, "should not duplicate existing sources");
}
+
+ [Fact]
+ public async Task ConfigWithDotNetEng_AddsDotNetEngInternal()
+ {
+ // Arrange
+ var originalConfig = @"
+
+
+
+
+
+";
+ var configPath = Path.Combine(_testOutputDirectory, "nuget.config");
+ await Task.Run(() => File.WriteAllText(configPath, originalConfig));
+
+ // Act
+ var result = await _scriptRunner.RunScript(configPath);
+
+ // Assert
+ result.exitCode.Should().Be(0, "Script should succeed, but got error: {0}", result.error);
+ var modifiedConfig = await Task.Run(() => File.ReadAllText(configPath));
+
+ modifiedConfig.ShouldContainPackageSource("dotnet-eng-internal",
+ "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-eng-internal/nuget/v3/index.json",
+ "should add dotnet-eng-internal feed");
+
+ // Should have 3 total sources (2 original + 1 added internal)
+ modifiedConfig.GetPackageSourceCount().Should().Be(3, "should add internal feed");
+ }
+
+ [Fact]
+ public async Task ConfigWithDotNetTools_AddsDotNetToolsInternal()
+ {
+ // Arrange
+ var originalConfig = @"
+
+
+
+
+
+";
+ var configPath = Path.Combine(_testOutputDirectory, "nuget.config");
+ await Task.Run(() => File.WriteAllText(configPath, originalConfig));
+
+ // Act
+ var result = await _scriptRunner.RunScript(configPath);
+
+ // Assert
+ result.exitCode.Should().Be(0, "Script should succeed, but got error: {0}", result.error);
+ var modifiedConfig = await Task.Run(() => File.ReadAllText(configPath));
+
+ modifiedConfig.ShouldContainPackageSource("dotnet-tools-internal",
+ "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json",
+ "should add dotnet-tools-internal feed");
+
+ // Should have 3 total sources (2 original + 1 added internal)
+ modifiedConfig.GetPackageSourceCount().Should().Be(3, "should add internal feed");
+ }
+
+ [Fact]
+ public async Task ConfigWithDotNetEngAndTools_AddsBothInternalFeeds()
+ {
+ // Arrange
+ var originalConfig = @"
+
+
+
+
+
+
+";
+ var configPath = Path.Combine(_testOutputDirectory, "nuget.config");
+ await Task.Run(() => File.WriteAllText(configPath, originalConfig));
+
+ // Act
+ var result = await _scriptRunner.RunScript(configPath);
+
+ // Assert
+ result.exitCode.Should().Be(0, "Script should succeed, but got error: {0}", result.error);
+ var modifiedConfig = await Task.Run(() => File.ReadAllText(configPath));
+
+ modifiedConfig.ShouldContainPackageSource("dotnet-eng-internal",
+ "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-eng-internal/nuget/v3/index.json",
+ "should add dotnet-eng-internal feed");
+
+ modifiedConfig.ShouldContainPackageSource("dotnet-tools-internal",
+ "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json",
+ "should add dotnet-tools-internal feed");
+
+ // Should have 5 total sources (3 original + 2 added internal)
+ modifiedConfig.GetPackageSourceCount().Should().Be(5, "should add both internal feeds");
+ }
+
+ [Fact]
+ public async Task ConfigWithoutDotNetEngOrTools_DoesNotAddInternalFeeds()
+ {
+ // Arrange
+ var originalConfig = @"
+
+
+
+
+
+";
+ var configPath = Path.Combine(_testOutputDirectory, "nuget.config");
+ await Task.Run(() => File.WriteAllText(configPath, originalConfig));
+
+ // Act
+ var result = await _scriptRunner.RunScript(configPath);
+
+ // Assert
+ result.exitCode.Should().Be(0, "Script should succeed, but got error: {0}", result.error);
+ var modifiedConfig = await Task.Run(() => File.ReadAllText(configPath));
+
+ modifiedConfig.ShouldNotContainPackageSource("dotnet-eng-internal",
+ "should not add dotnet-eng-internal when dotnet-eng is not present");
+ modifiedConfig.ShouldNotContainPackageSource("dotnet-tools-internal",
+ "should not add dotnet-tools-internal when dotnet-tools is not present");
+
+ // Should add dotnet9 internal feeds
+ modifiedConfig.ShouldContainPackageSource("dotnet9-internal");
+ modifiedConfig.ShouldContainPackageSource("dotnet9-internal-transport");
+ }
}
}
diff --git a/src/Microsoft.DotNet.SetupNugetSources.Tests/Microsoft.DotNet.SetupNugetSources.Tests.csproj b/src/Microsoft.DotNet.SetupNugetSources.Tests/Microsoft.DotNet.SetupNugetSources.Tests.csproj
index b337ab7e629..83d868c3bdc 100644
--- a/src/Microsoft.DotNet.SetupNugetSources.Tests/Microsoft.DotNet.SetupNugetSources.Tests.csproj
+++ b/src/Microsoft.DotNet.SetupNugetSources.Tests/Microsoft.DotNet.SetupNugetSources.Tests.csproj
@@ -1,12 +1,12 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent)
true
-
+
diff --git a/src/Microsoft.DotNet.SetupNugetSources.Tests/NoChangeScenarioTests.cs b/src/Microsoft.DotNet.SetupNugetSources.Tests/NoChangeScenarioTests.cs
index 40aa7c29759..632511d3441 100644
--- a/src/Microsoft.DotNet.SetupNugetSources.Tests/NoChangeScenarioTests.cs
+++ b/src/Microsoft.DotNet.SetupNugetSources.Tests/NoChangeScenarioTests.cs
@@ -4,7 +4,7 @@
using System;
using System.IO;
using System.Threading.Tasks;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.DotNet.XUnitExtensions;
using Xunit;
diff --git a/src/Microsoft.DotNet.SetupNugetSources.Tests/NuGetConfigAssertions.cs b/src/Microsoft.DotNet.SetupNugetSources.Tests/NuGetConfigAssertions.cs
index c4ba85f5c23..0bd0f5b5dfd 100644
--- a/src/Microsoft.DotNet.SetupNugetSources.Tests/NuGetConfigAssertions.cs
+++ b/src/Microsoft.DotNet.SetupNugetSources.Tests/NuGetConfigAssertions.cs
@@ -7,7 +7,7 @@
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
-using AwesomeAssertions;
+using FluentAssertions;
namespace Microsoft.DotNet.SetupNugetSources.Tests
{
diff --git a/src/Microsoft.DotNet.SharedFramework.Sdk/Microsoft.DotNet.SharedFramework.Sdk.csproj b/src/Microsoft.DotNet.SharedFramework.Sdk/Microsoft.DotNet.SharedFramework.Sdk.csproj
index a0d9eca3837..ab867e7a4a4 100644
--- a/src/Microsoft.DotNet.SharedFramework.Sdk/Microsoft.DotNet.SharedFramework.Sdk.csproj
+++ b/src/Microsoft.DotNet.SharedFramework.Sdk/Microsoft.DotNet.SharedFramework.Sdk.csproj
@@ -1,7 +1,7 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
true
true
Common toolset for building shared frameworks and framework packs.
@@ -30,5 +30,12 @@
+
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.SharedFramework.Sdk/sdk/BuildTask.props b/src/Microsoft.DotNet.SharedFramework.Sdk/sdk/BuildTask.props
index 1d595945de5..3314587321b 100644
--- a/src/Microsoft.DotNet.SharedFramework.Sdk/sdk/BuildTask.props
+++ b/src/Microsoft.DotNet.SharedFramework.Sdk/sdk/BuildTask.props
@@ -4,17 +4,13 @@
+
+ $(MSBuildThisFileDirectory)../tools/net/
+ $(MSBuildThisFileDirectory)../tools/netframework/
+
+
- $(MSBuildThisFileDirectory)../tools/net/
$(DotNetSharedFrameworkTaskDir)Microsoft.DotNet.SharedFramework.Sdk.dll
-
-
-
-
-
-
-
-
diff --git a/src/Microsoft.DotNet.SharedFramework.Sdk/targets/sharedfx.targets b/src/Microsoft.DotNet.SharedFramework.Sdk/targets/sharedfx.targets
index 58f1d207ad2..ba044812766 100644
--- a/src/Microsoft.DotNet.SharedFramework.Sdk/targets/sharedfx.targets
+++ b/src/Microsoft.DotNet.SharedFramework.Sdk/targets/sharedfx.targets
@@ -7,7 +7,7 @@
true
true
- true
+ true
true
$(AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder);.map;.r2rmap;.dbg;.debug;.dwarf
<_DefaultHostJsonTargetPath>runtimes/$(RuntimeIdentifier)/lib/$(TargetFramework)
@@ -62,10 +62,11 @@
-
+
@@ -181,6 +182,7 @@
+
@@ -304,6 +306,7 @@
Text="The following files are missing entries in the templated manifest:
@(_FilesMissingInManifestEntries, '
'). Add these file names with extensions to the 'PlatformManifestFileEntry' item group for the runtime pack and corresponding ref pack to include them in the platform manifest." />
+
@@ -333,6 +336,7 @@
If the chosen RID doesn't have a superset of files for all shipping platforms,
then you may have unexpected behavior when using the produced targeting pack.
-->
+
@@ -390,6 +394,7 @@
+
@@ -462,6 +467,7 @@
+
@@ -490,6 +496,7 @@
DependencyGraphFilePath="$(IntermediateOutputPath)assembly-graph.dgml" />
+
@@ -510,6 +517,7 @@
IgnoredTypes="@(IgnoredDuplicateType)" />
+
diff --git a/src/Microsoft.DotNet.SignTool.Tests/FakeSignTool.cs b/src/Microsoft.DotNet.SignTool.Tests/FakeSignTool.cs
index bbe40913f7e..74fc9d120ad 100644
--- a/src/Microsoft.DotNet.SignTool.Tests/FakeSignTool.cs
+++ b/src/Microsoft.DotNet.SignTool.Tests/FakeSignTool.cs
@@ -34,7 +34,7 @@ public override SigningStatus VerifySignedPEFile(Stream stream)
public override SigningStatus VerifyStrongNameSign(string fileFullPath) => SigningStatus.Signed;
- public override bool RunMSBuild(IBuildEngine buildEngine, string projectFilePath, string binLogPath, string logPath, string errorLogPath, bool suppressErrors = false)
+ public override bool RunMSBuild(IBuildEngine buildEngine, string projectFilePath, string binLogPath, string logPath, string errorLogPath)
=> buildEngine.BuildProjectFile(projectFilePath, null, null, null);
internal static void SignFile(string path)
diff --git a/src/Microsoft.DotNet.SignTool.Tests/Microsoft.DotNet.SignTool.Tests.csproj b/src/Microsoft.DotNet.SignTool.Tests/Microsoft.DotNet.SignTool.Tests.csproj
index 590f52be7b7..d5266900d99 100644
--- a/src/Microsoft.DotNet.SignTool.Tests/Microsoft.DotNet.SignTool.Tests.csproj
+++ b/src/Microsoft.DotNet.SignTool.Tests/Microsoft.DotNet.SignTool.Tests.csproj
@@ -1,11 +1,11 @@
- $(BundledNETCoreAppTargetFramework)
+ $(NetToolCurrent);$(NetFrameworkToolCurrent)
-
+
@@ -16,9 +16,16 @@
+
+
@@ -48,6 +55,18 @@
Link="tools\sn\1033\%(RecursiveDir)%(Filename)%(Extension)" />
+
+
+ <_TarToolPattern>@(_TarToolPath->'%(RootDir)%(Directory)')**\*.*
+
+
+ <_TarToolFiles Include="$(_TarToolPattern)" />
+
+
+
+
+
+
@@ -61,5 +80,4 @@
-
diff --git a/src/Microsoft.DotNet.SignTool.Tests/Resources/test.deb b/src/Microsoft.DotNet.SignTool.Tests/Resources/test.deb
index 6540f194a86..33b084d5bb4 100644
Binary files a/src/Microsoft.DotNet.SignTool.Tests/Resources/test.deb and b/src/Microsoft.DotNet.SignTool.Tests/Resources/test.deb differ
diff --git a/src/Microsoft.DotNet.SignTool.Tests/Resources/test.rpm b/src/Microsoft.DotNet.SignTool.Tests/Resources/test.rpm
index c076c99e8d7..25f662be03a 100644
Binary files a/src/Microsoft.DotNet.SignTool.Tests/Resources/test.rpm and b/src/Microsoft.DotNet.SignTool.Tests/Resources/test.rpm differ
diff --git a/src/Microsoft.DotNet.SignTool.Tests/Resources/test.tgz b/src/Microsoft.DotNet.SignTool.Tests/Resources/test.tgz
index 94f01e350df..20ac2fdbd5c 100644
Binary files a/src/Microsoft.DotNet.SignTool.Tests/Resources/test.tgz and b/src/Microsoft.DotNet.SignTool.Tests/Resources/test.tgz differ
diff --git a/src/Microsoft.DotNet.SignTool.Tests/Resources/testHardlinks.tgz b/src/Microsoft.DotNet.SignTool.Tests/Resources/testHardlinks.tgz
deleted file mode 100644
index b458840f848..00000000000
Binary files a/src/Microsoft.DotNet.SignTool.Tests/Resources/testHardlinks.tgz and /dev/null differ
diff --git a/src/Microsoft.DotNet.SignTool.Tests/Resources/testSymlinks.tgz b/src/Microsoft.DotNet.SignTool.Tests/Resources/testSymlinks.tgz
deleted file mode 100644
index 675a155771c..00000000000
Binary files a/src/Microsoft.DotNet.SignTool.Tests/Resources/testSymlinks.tgz and /dev/null differ
diff --git a/src/Microsoft.DotNet.SignTool.Tests/SignToolTests.cs b/src/Microsoft.DotNet.SignTool.Tests/SignToolTests.cs
index bb25bde1135..1e53899ba88 100644
--- a/src/Microsoft.DotNet.SignTool.Tests/SignToolTests.cs
+++ b/src/Microsoft.DotNet.SignTool.Tests/SignToolTests.cs
@@ -9,7 +9,7 @@
using System.Reflection.PortableExecutable;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
-using AwesomeAssertions;
+using FluentAssertions;
using Microsoft.Arcade.Test.Common;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
@@ -246,7 +246,9 @@ public class SignToolTests : IDisposable
".py",
".pyd",
+#if !NETFRAMEWORK
".deb",
+#endif
};
public static IEnumerable