Compare commits

...

No commits in common. "ci" and "main" have entirely different histories.
ci ... main

517 changed files with 35534 additions and 120 deletions

View file

@ -0,0 +1,32 @@
## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details.
pipelines:
286:
retail:
binary:
credscan:
lastModifiedDate: 2024-03-15
binskim:
lastModifiedDate: 2024-03-15
spotbugs:
lastModifiedDate: 2024-03-15
source:
credscan:
lastModifiedDate: 2024-03-15
eslint:
lastModifiedDate: 2024-03-15
psscriptanalyzer:
lastModifiedDate: 2024-03-15
armory:
lastModifiedDate: 2024-03-15
1226:
retail:
source:
credscan:
lastModifiedDate: 2024-03-25
eslint:
lastModifiedDate: 2024-03-25
psscriptanalyzer:
lastModifiedDate: 2024-03-25
armory:
lastModifiedDate: 2024-03-25

12
.config/dotnet-tools.json Normal file
View file

@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"microsoft.dotnet.darc": {
"version": "1.1.0-beta.24256.1",
"commands": [
"darc"
]
}
}
}

View file

@ -0,0 +1,225 @@
{
"properties": {
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/baselines"
},
"version": "1.0.0",
"baselines": {
"default": {
"name": "default",
"createdDate": "2024-03-15 21:07:20Z",
"lastUpdatedDate": "2024-03-15 21:07:20Z"
}
},
"results": {
"9fcdc81730d500a234ad1fcd1a18108502b8c50c48567b91176c8e26f6bc5d34": {
"signature": "9fcdc81730d500a234ad1fcd1a18108502b8c50c48567b91176c8e26f6bc5d34",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/nuget.config",
"line": 9,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0060",
"createdDate": "2024-03-15 21:07:20Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"8814a931c03f7ee625e291e19f2f5671357142600639b0143a3c46631b864e93": {
"signature": "8814a931c03f7ee625e291e19f2f5671357142600639b0143a3c46631b864e93",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/dlabnugetcert.pfx",
"line": 1,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0020",
"createdDate": "2024-03-15 21:10:36Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"29ef09fbcdcda70063644424ad6a64c7aaae97e31b89c31c89b631eab56252e9": {
"signature": "29ef09fbcdcda70063644424ad6a64c7aaae97e31b89c31c89b631eab56252e9",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/dynamicsha1.pfx",
"line": 1,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0020",
"createdDate": "2024-03-15 21:10:36Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"5801a584cc6df8c732f18f7abc1b1ccf64ab2a6ddbb05f9bbdde8beb5a67fe3a": {
"signature": "5801a584cc6df8c732f18f7abc1b1ccf64ab2a6ddbb05f9bbdde8beb5a67fe3a",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/dynamicsha2.pfx",
"line": 1,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0020",
"createdDate": "2024-03-15 21:10:36Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"cab715138e57370e027c311bdcfcd828aef2e813338eb9b6db44c222132dcc43": {
"signature": "cab715138e57370e027c311bdcfcd828aef2e813338eb9b6db44c222132dcc43",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/testdlab.pfx",
"line": 1,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0020",
"createdDate": "2024-03-15 21:10:36Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"69fdade2005d4c82978110367d00ff0b563d127022c89cc13d9130ff08811249": {
"signature": "69fdade2005d4c82978110367d00ff0b563d127022c89cc13d9130ff08811249",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/testdlabsha2.pfx",
"line": 1,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0020",
"createdDate": "2024-03-15 21:10:36Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"efe01799a8cef937301b58208e2b347b9f5c534d89815d9843d75be7b2e2fb43": {
"signature": "efe01799a8cef937301b58208e2b347b9f5c534d89815d9843d75be7b2e2fb43",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/vsmsappx.pfx",
"line": 1,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0020",
"createdDate": "2024-03-15 21:10:36Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"f5eed94d081284181a2cd78b47b336ece0fcf2c0eafd462ffe6a88ff913d8184": {
"signature": "f5eed94d081284181a2cd78b47b336ece0fcf2c0eafd462ffe6a88ff913d8184",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/WinBlue.pfx",
"line": 1,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0020",
"createdDate": "2024-03-15 21:10:36Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"3aa029a27ef41acb56bd41ac97412078144ad5e722c21c325333f3af37b51d8a": {
"signature": "3aa029a27ef41acb56bd41ac97412078144ad5e722c21c325333f3af37b51d8a",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/WP223.pfx",
"line": 1,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0020",
"createdDate": "2024-03-15 21:10:36Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"624055be3115da111704bd2823e64fb78862b3650767e571aef8a9b7a127c6d8": {
"signature": "624055be3115da111704bd2823e64fb78862b3650767e571aef8a9b7a127c6d8",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/MicroBuild.Plugins.Signing.1.1.902/build/tools/MobileTools/7Sign/tcb.pfx",
"line": 1,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0020",
"createdDate": "2024-03-15 21:10:36Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"1d4ee8b341d5f1ef56c8e517759511e55556866f0a6fbabf23440798da1f05d5": {
"signature": "1d4ee8b341d5f1ef56c8e517759511e55556866f0a6fbabf23440798da1f05d5",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/nuget.config",
"line": 9,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0060",
"createdDate": "2024-03-15 21:10:23Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"4fdcce44747d67552fa68a352060f50d85431c0c7ea4215b395bdb360db739a7": {
"signature": "4fdcce44747d67552fa68a352060f50d85431c0c7ea4215b395bdb360db739a7",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/nuget.config",
"line": 9,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0060",
"createdDate": "2024-03-15 21:10:36Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"62685d821fc38b8db7ddb0a07decba2a1be29c26ce13b5cb75fcc123ad048783": {
"signature": "62685d821fc38b8db7ddb0a07decba2a1be29c26ce13b5cb75fcc123ad048783",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/nuget.config",
"line": 9,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0060",
"createdDate": "2024-03-15 21:10:55Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"0ecc3cb201b58b5026eef9239d3a888de6188f974948d8c2d76ea5f22dd12fd2": {
"signature": "0ecc3cb201b58b5026eef9239d3a888de6188f974948d8c2d76ea5f22dd12fd2",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/nuget.config",
"line": 9,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0060",
"createdDate": "2024-03-15 21:10:23Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
},
"e4e0934b769d92960066e0db46b39bcb24f69fb478779b630d2d8581f384a95c": {
"signature": "e4e0934b769d92960066e0db46b39bcb24f69fb478779b630d2d8581f384a95c",
"alternativeSignatures": [],
"target": "MicroBuild/Plugins/nuget.config",
"line": 9,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0060",
"createdDate": "2024-03-15 21:10:36Z",
"expirationDate": "2024-09-01 21:43:51Z",
"justification": "This error is baselined with an expiration date of 180 days from 2024-03-15 21:43:51Z"
}
}
}

149
.editorconfig Normal file
View file

@ -0,0 +1,149 @@
# editorconfig.org
# top-most EditorConfig file
root = true
# Default settings:
# A newline ending every file
# Use 4 spaces as indentation
[*]
insert_final_newline = true
indent_style = space
indent_size = 4
[project.json]
indent_size = 2
# C# files
[*.cs]
# New line preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_within_query_expression_clauses = true
# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left
# avoid this. unless absolutely necessary
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
# only use var when it's obvious what the variable type is
csharp_style_var_for_built_in_types = false:none
csharp_style_var_when_type_is_apparent = false:none
csharp_style_var_elsewhere = false:none
# use language keywords instead of BCL types
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
# name all constant fields using PascalCase
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# internal and private fields should be _camelCase
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
# Code style defaults
dotnet_sort_system_directives_first = true
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = false
# Expression-level preferences
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
# Expression-bodied members
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_operators = false:none
csharp_style_expression_bodied_properties = true:none
csharp_style_expression_bodied_indexers = true:none
csharp_style_expression_bodied_accessors = true:none
# Pattern matching
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
# Null checking preferences
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# C++ Files
[*.{cpp,h,in}]
curly_bracket_next_line = true
indent_brace_style = Allman
# Xml project files
[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
indent_size = 2
# Xml build files
[*.builds]
indent_size = 2
# Xml files
[*.{xml,stylecop,resx,ruleset}]
indent_size = 2
# Xml config files
[*.{props,targets,config,nuspec}]
indent_size = 2
# Shell scripts
[*.sh]
end_of_line = lf
[*.{cmd, bat}]
end_of_line = crlf

View file

@ -1,70 +0,0 @@
on:
workflow_dispatch:
inputs:
ref_name:
description: 'Tag or commit'
required: true
type: string
push:
tags:
- '*'
jobs:
build-tarball:
name: Build tarball
runs-on: x86_64
container:
image: alpine:3.19
steps:
- name: Environment setup
run: apk add nodejs git xz gzip dotnet6-sdk dotnet7-sdk sed bash
- name: Repo pull
uses: actions/checkout@v4
with:
fetch-depth: 500
ref: ${{ inputs.ref_name }}
- name: Package build
run: |
if test $GITHUB_REF_NAME == "ci" ; then
CI_REF_NAME=${{ inputs.ref_name }}
else
CI_REF_NAME=$GITHUB_REF_NAME
fi
sed 's|<Exec Command="tar.*|<Exec Command="tar -cf $(TarballFilePath) -C $(TarballDir)/.. $([MSBuild]::MakeRelative($([System.IO.Path]::GetDirectoryName($(TarballDir))), $(TarballDir)))" />|' -i src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets
export _cli_root=/usr/lib/dotnet
echo "Building dotnet-$CI_REF_NAME tarball"
_InitializeDotNetCli="$_cli_root" DOTNET_INSTALL_DIR="$_cli_root" DotNetBuildFromSource=true ./build.sh /p:ArcadeBuildTarball=true /p:EnableSourceLink=false /p:CheckEolTargetFramework=false /p:TarballDir=$(pwd)/dotnet-$CI_REF_NAME /p:TarballFilePath=$(pwd)/dotnet-$CI_REF_NAME.tar
echo "Compressing dotnet-$CI_REF_NAME.tar.xz"
xz -T0 -9 -vv -e -c > ./dotnet-$CI_REF_NAME.tar.xz < ./dotnet-$CI_REF_NAME.tar
echo "Generating sha512sum and sha256sum"
sha512sum dotnet-$CI_REF_NAME.tar.xz > dotnet-$CI_REF_NAME.tar.xz.sha512sum
sha256sum dotnet-$CI_REF_NAME.tar.xz > dotnet-$CI_REF_NAME.tar.xz.sha256sum
- name: Package upload
uses: forgejo/upload-artifact@v3
with:
name: tarball
path: dotnet*.tar.*
retention-days: 1 day
upload-tarball:
name: Upload to generic repo
runs-on: x86_64
needs: [build-tarball]
container:
image: alpine:latest
steps:
- name: Environment setup
run: apk add nodejs curl findutils
- name: Package download
uses: forgejo/download-artifact@v3
- name: Package deployment
run: |
if test $GITHUB_REF_NAME == "ci" ; then
CI_REF_NAME=${{ inputs.ref_name }}
else
CI_REF_NAME=$GITHUB_REF_NAME
fi
echo "Uploading to ${{ github.server.url }}/api/packages/mirrors/generic/dotnet/$CI_REF_NAME/dotnet-$CI_REF_NAME.tar.xz"
curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/dotnet-*.tar.xz ${{ github.server_url }}/api/packages/mirrors/generic/dotnet/$CI_REF_NAME/dotnet-$CI_REF_NAME.tar.xz
curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/dotnet-*.tar.xz.sha512sum ${{ github.server_url }}/api/packages/mirrors/generic/dotnet/$CI_REF_NAME/dotnet-$CI_REF_NAME.tar.xz.sha512sum
curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/dotnet-*.tar.xz.sha256sum ${{ github.server_url }}/api/packages/mirrors/generic/dotnet/$CI_REF_NAME/dotnet-$CI_REF_NAME.tar.xz.sha256sum

View file

@ -1,50 +0,0 @@
on:
workflow_dispatch:
schedule:
- cron: '@hourly'
jobs:
mirror:
name: Pull from upstream
runs-on: x86_64
container:
image: alpine:latest
env:
upstream: https://github.com/dotnet/installer
tags: 'v6.0.1*'
steps:
- name: Environment setup
run: apk add grep git sed coreutils bash nodejs
- name: Fetch destination
uses: actions/checkout@v4
with:
fetch_depth: 1
ref: ci
token: ${{ secrets.CODE_FORGEJO_TOKEN }}
- name: Missing tag detecting
run: |
git ls-remote $upstream "refs/tags/$tags" | grep -v '{' | sed 's|.*/||' > upstream_tags
git ls-remote ${{ github.server_url}}/${{ github.repository }} "refs/tags/$tags" | grep -v '{' | sed 's|.*/||' > destination_tags
cat upstream_tags destination_tags | tr ' ' '\n' | sort | uniq -u > missing_tags
echo "Missing tags:"
cat missing_tags
- name: Missing tag fetch
run: |
git remote add upstream $upstream
while read tag; do
git fetch upstream tag $tag --no-tags
done < missing_tags
- name: Packaging workflow injection
run: |
while read tag; do
git checkout $tag
git tag -d $tag
git checkout ci -- ./.forgejo
git config user.name "forgejo-actions[bot]"
git config user.email "dev@ayakael.net"
git commit -m 'Inject custom workflow'
git tag -a $tag -m $tag
done < missing_tags
- name: Push to destination
run: git push --force origin refs/tags/*:refs/tags/* --tags

55
.gitattributes vendored Normal file
View file

@ -0,0 +1,55 @@
*.doc binary
*.DOC binary
*.docx binary
*.DOCX binary
*.dot binary
*.DOT binary
*.pdf binary
*.PDF binary
*.rtf binary
*.RTF binary
*.jpg binary
*.png binary
*.gif binary
*.sh eol=lf
*.cs text=auto diff=csharp
*.vb text=auto
*.resx text=auto
*.c text=auto
*.cpp text=auto
*.cxx text=auto
*.h text=auto
*.hxx text=auto
*.py text=auto
*.rb text=auto
*.java text=auto
*.html text=auto
*.htm text=auto
*.css text=auto
*.scss text=auto
*.sass text=auto
*.less text=auto
*.js text=auto
*.lisp text=auto
*.clj text=auto
*.sql text=auto
*.php text=auto
*.lua text=auto
*.m text=auto
*.asm text=auto
*.erl text=auto
*.fs text=auto
*.fsx text=auto
*.hs text=auto
*.props text=auto
*.targets text=auto
*.csproj text=auto
*.vbproj text=auto
*.fsproj text=auto
*.dbproj text=auto
*.xlf text=auto
*.sln text=auto eol=crlf

17
.github/workflows/backport.yml vendored Normal file
View file

@ -0,0 +1,17 @@
name: Backport PR to branch
on:
issue_comment:
types: [created]
schedule:
# once a day at 13:00 UTC to cleanup old runs
- cron: '0 13 * * *'
permissions:
contents: write
issues: write
pull-requests: write
actions: write
jobs:
backport:
uses: dotnet/arcade/.github/workflows/backport-base.yml@main

312
.gitignore vendored Normal file
View file

@ -0,0 +1,312 @@
### Repo-specific things ###
# Test results
*-testResults.xml
# Multicore JIT Optimization profiles
**/optimizationdata/dotnet
# Test Asset Manager files
.tam/
# NuGet keeps dropping
Library/
# local nuget cache
.nuget/
# NuGet v3 restore drops these even though we don't use MSBuild :(
*.nuget.targets
*.nuget.props
# Debian and python stuff
*.dsc
*.tar.gz
*.build
*.changes
*.deb
*.pyc
*.pyo
# OSX Packaging temp files
*.pkg
# OS X Device Services Store
.DS_Store
# CMake generated files
cmake/
# stage0 install directory
.dotnet_stage0
# build tools directory
build_tools
# `dotnet new` template zip files are generated by a pre-build step.
/src/dotnet/commands/dotnet-new/*.zip
### VisualStudio.gitignore from https://raw.githubusercontent.com/github/gitignore/master/VisualStudio.gitignore ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
# Visual Studio 2015 cache/options directory
.vs/
# Visual Studio Code cache/options directory
.vscode/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Build artifacts
artifacts/
artifacts-*/
bin/
.dotnet/
.dotnet-*/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.binlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# BinLog artifacts
msbuild*ProjectImports.zip
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
.idea/
*.iml
*.DotSettings
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Azure Emulator
ecf/
rcf/
# Windows Store app package directory
AppPackages/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
# FAKE - F# Make
.fake/
# Exceptions
# Build Scripts
!scripts/build/
test/PackagedCommands/Consumers/*/project.json
# Vim swp files
*.swp
*.*~
# VS generated files
launchSettings.json
# user files used in tests
!TestAssets/TestProjects/TestAppWithLibrary/TestLibrary/TestLibrary.xproj.user
!TestAssets/TestProjects/TestAppWithLibrary/TestApp/TestApp.xproj.user
!TestAssets/TestProjects/PJTestAppSimple/PJTestAppSimple.xproj.user
# Local nuget cache when the build is run as CI
.packages

387
.vsts-ci.yml Normal file
View file

@ -0,0 +1,387 @@
# Pipeline: https://dnceng.visualstudio.com/internal/_build?definitionId=286
trigger:
batch: true
branches:
include:
- main
- master
- release/*
- internal/release/*
variables:
- name: _PublishUsingPipelines
value: false
- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}:
- name: PostBuildSign
value: false
- ${{ else }}:
- name: PostBuildSign
value: true
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- name: Codeql.Enabled
value: true
- group: DotNet-DotNetCli-Storage
- group: DotNet-Installer-SDLValidation-Params
- name: _PublishUsingPipelines
value: true
- name: _InternalRuntimeDownloadArgs
value: ''
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: DotNetBuilds storage account read tokens
- name: _InternalRuntimeDownloadArgs
value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
/p:dotnetbuilds-internal-container-read-token-base64=$(dotnetbuilds-internal-container-read-token-base64)
- template: /eng/common/templates-official/variables/pool-providers.yml
# Set the MicroBuild plugin installation directory to the agent temp directory to avoid SDL tool scanning.
- name: MicroBuildOutputFolderOverride
value: $(Agent.TempDirectory)
resources:
repositories:
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
${{ else }}:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
parameters:
containers:
alpine319WithNode:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode
cblMariner20Fpm:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm
centosStream9:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
debian11Amd64:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-amd64
fedora39:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
ubuntu2204:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04
mariner20CrossArm:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine
ubuntu2204DebPkg:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg
sdl:
sourceAnalysisPool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
stages:
- stage: Build
jobs:
# Build Retry Configuration
- job: Publish_Build_Configuration
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: $(DncEngPublicBuildPool)
image: 1es-windows-2022-open
os: windows
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
steps:
- task: 1ES.PublishPipelineArtifact@1
displayName: Publish Build Config
inputs:
targetPath: $(Build.SourcesDirectory)\eng\buildConfiguration
artifactName: buildConfiguration
# PR-only jobs
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
# Windows
- template: eng/build.yml@self
parameters:
agentOs: Windows_NT
jobName: Build_Debug_x64
buildConfiguration: Debug
buildArchitecture: x64
additionalBuildParameters: '/p:PublishInternalAsset=true'
runTests: true
# Linux
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Ubuntu_22_04_Debug_x64
container: ubuntu2204
buildConfiguration: Debug
buildArchitecture: x64
linuxPortable: true
runTests: true
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Fedora_39_Debug_x64
container: fedora39
buildConfiguration: Debug
buildArchitecture: x64
linuxPortable: true
runTests: true
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_CentOS_9_Stream_Debug_x64
container: centosStream9
buildConfiguration: Debug
buildArchitecture: x64
linuxPortable: false
runTests: true
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Debian_11_Debug_x64
container: debian11Amd64
buildConfiguration: Debug
buildArchitecture: x64
additionalBuildParameters: '/p:BuildSdkDeb=true'
linuxPortable: false
runTests: true
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Arm64_Debug
buildConfiguration: Debug
buildArchitecture: arm64
runtimeIdentifier: 'linux-arm64'
linuxPortable: true
# Never run tests on arm64
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Linux_musl_Debug_x64
container: alpine319WithNode
buildConfiguration: Debug
buildArchitecture: x64
runtimeIdentifier: 'linux-musl-x64'
# Pass in HostOSName when running on alpine
additionalBuildParameters: '/p:HostOSName="linux-musl"'
linuxPortable: false
runTests: true
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_LinuxPortable_Release_x64
buildConfiguration: Release
buildArchitecture: x64
linuxPortable: true
runTests: true
# MacOS
- template: eng/build.yml@self
parameters:
agentOs: Darwin
jobName: Build_Release_x64
buildConfiguration: Release
buildArchitecture: x64
runTests: true
# Official/PGO instrumentation Builds
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
# Windows
- template: eng/build.yml@self
parameters:
agentOs: Windows_NT
jobName: Build_Release_x64
buildConfiguration: Release
buildArchitecture: x64
additionalBuildParameters: '/p:PublishInternalAsset=true'
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Windows_NT
jobName: Build_Release_x86
buildConfiguration: Release
buildArchitecture: x86
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Windows_NT
jobName: Build_Release_arm64
buildConfiguration: Release
buildArchitecture: arm64
runTests: false
# Linux
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Arm_Release
buildConfiguration: Release
buildArchitecture: arm
runtimeIdentifier: 'linux-arm'
linuxPortable: true
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Arm64_Release
buildConfiguration: Release
buildArchitecture: arm64
runtimeIdentifier: 'linux-arm64'
linuxPortable: true
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Linux_musl_Release_arm
container: mariner20CrossArm
buildConfiguration: Release
buildArchitecture: arm
runtimeIdentifier: 'linux-musl-arm'
additionalBuildParameters: '/p:OSName="linux-musl"'
linuxPortable: false
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Linux_musl_Release_arm64
buildConfiguration: Release
buildArchitecture: arm64
runtimeIdentifier: 'linux-musl-arm64'
additionalBuildParameters: '/p:OSName="linux-musl"'
linuxPortable: false
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Linux_musl_Release_x64
container: alpine319WithNode
buildConfiguration: Release
buildArchitecture: x64
runtimeIdentifier: 'linux-musl-x64'
# Pass in HostOSName when running on alpine
additionalBuildParameters: '/p:HostOSName="linux-musl"'
linuxPortable: false
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Linux_Portable_Deb_Release_x64
container: ubuntu2204DebPkg
buildConfiguration: Release
buildArchitecture: x64
# Do not publish zips and tarballs. The linux-x64 binaries are
# already published by Build_LinuxPortable_Release_x64
additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:BuildSdkDeb=true'
linuxPortable: true
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Linux_Portable_Rpm_Release_x64
container: cblMariner20Fpm
buildConfiguration: Release
buildArchitecture: x64
# Do not publish zips and tarballs. The linux-x64 binaries are
# already published by Build_LinuxPortable_Release_x64
additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:IsRPMBasedDistro=true'
linuxPortable: true
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_Linux_Portable_Rpm_Release_Arm64
container: cblMariner20Fpm
buildConfiguration: Release
buildArchitecture: arm64
runtimeIdentifier: 'linux-arm64'
# Do not publish zips and tarballs. The linux-x64 binaries are
# already published by Build_LinuxPortable_Release_x64
additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true /p:IsRPMBasedDistro=true'
linuxPortable: true
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Linux
jobName: Build_LinuxPortable_Release_x64
buildConfiguration: Release
buildArchitecture: x64
linuxPortable: true
runTests: false
# MacOS
- template: eng/build.yml@self
parameters:
agentOs: Darwin
jobName: Build_Release_x64
buildConfiguration: Release
buildArchitecture: x64
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Darwin
jobName: Build_Release_arm64
runtimeIdentifier: 'osx-arm64'
buildConfiguration: Release
buildArchitecture: arm64
runTests: false
# Windows PGO Instrumentation
- template: eng/build.yml@self
parameters:
agentOs: Windows_NT
pgoInstrument: true
jobName: Build_Release_x64
buildConfiguration: Release
buildArchitecture: x64
additionalBuildParameters: '/p:PublishInternalAsset=true'
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Windows_NT
pgoInstrument: true
jobName: Build_Release_x86
buildConfiguration: Release
buildArchitecture: x86
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Windows_NT
pgoInstrument: true
jobName: Build_Release_arm64
buildConfiguration: Release
buildArchitecture: arm64
runTests: false
# Linux PGO Instrumentation
- template: eng/build.yml@self
parameters:
agentOs: Linux
pgoInstrument: true
jobName: Build_LinuxPortable_Release_x64
buildConfiguration: Release
buildArchitecture: x64
linuxPortable: true
runTests: false
- template: eng/build.yml@self
parameters:
agentOs: Linux
pgoInstrument: true
jobName: Build_Release_arm64
buildConfiguration: Release
buildArchitecture: arm64
linuxPortable: true
runTests: false
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- stage: Publish
dependsOn:
- Build
jobs:
- template: /eng/common/templates-official/job/publish-build-assets.yml@self
parameters:
publishUsingPipelines: true
publishAssetsImmediately: true
pool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows

361
.vsts-pr.yml Normal file
View file

@ -0,0 +1,361 @@
# Pipeline: https://dev.azure.com/dnceng-public/public/_build?definitionId=20
trigger:
batch: true
branches:
include:
- main
- master
- release/*
- internal/release/*
variables:
- name: _PublishUsingPipelines
value: false
- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}:
- name: PostBuildSign
value: false
- ${{ else }}:
- name: PostBuildSign
value: true
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- name: Codeql.Enabled
value: true
- group: DotNet-DotNetCli-Storage
- group: DotNet-Installer-SDLValidation-Params
- name: _PublishUsingPipelines
value: true
- name: _InternalRuntimeDownloadArgs
value: ''
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: DotNetBuilds storage account read tokens
- name: _InternalRuntimeDownloadArgs
value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
/p:dotnetbuilds-internal-container-read-token-base64=$(dotnetbuilds-internal-container-read-token-base64)
- template: /eng/common/templates/variables/pool-providers.yml
stages:
- stage: Build
jobs:
# This job is for build retry configuration.
- job: Publish_Build_Configuration
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals windows.vs2022preview.amd64.open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2022preview.amd64
steps:
- publish: $(Build.SourcesDirectory)\eng\buildConfiguration
artifact: buildConfiguration
displayName: Publish Build Config
## PR-only jobs
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
## Windows
- template: eng/build-pr.yml
parameters:
agentOs: Windows_NT
jobName: Build_Debug_x64
buildConfiguration: Debug
buildArchitecture: x64
additionalBuildParameters: '/p:PublishInternalAsset=true'
runTests: true
## Linux
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Ubuntu_22_04_Debug_x64
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04'
buildConfiguration: Debug
buildArchitecture: x64
linuxPortable: true
runTests: true
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Fedora_39_Debug_x64
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39'
buildConfiguration: Debug
buildArchitecture: x64
linuxPortable: true
runTests: true
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_CentOS_8_Stream_Debug_x64
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8'
buildConfiguration: Debug
buildArchitecture: x64
linuxPortable: false
runTests: true
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Debian_11_Debug_x64
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-amd64'
buildConfiguration: Debug
buildArchitecture: x64
additionalBuildParameters: '/p:BuildSdkDeb=true'
linuxPortable: false
runTests: true
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Arm64_Debug
buildConfiguration: Debug
buildArchitecture: arm64
runtimeIdentifier: 'linux-arm64'
linuxPortable: true
# Never run tests on arm64
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Linux_musl_Debug_x64
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode'
buildConfiguration: Debug
buildArchitecture: x64
runtimeIdentifier: 'linux-musl-x64'
# Pass in HostOSName when running on alpine
additionalBuildParameters: '/p:HostOSName="linux-musl"'
linuxPortable: false
runTests: true
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_LinuxPortable_Release_x64
buildConfiguration: Release
buildArchitecture: x64
linuxPortable: true
runTests: true
# MacOS
- template: eng/build-pr.yml
parameters:
agentOs: Darwin
jobName: Build_Release_x64
buildConfiguration: Release
buildArchitecture: x64
runTests: true
## Official/PGO instrumentation Builds
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
## Windows
- template: eng/build-pr.yml
parameters:
agentOs: Windows_NT
jobName: Build_Release_x64
buildConfiguration: Release
buildArchitecture: x64
additionalBuildParameters: '/p:PublishInternalAsset=true'
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Windows_NT
jobName: Build_Release_x86
buildConfiguration: Release
buildArchitecture: x86
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Windows_NT
jobName: Build_Release_arm64
buildConfiguration: Release
buildArchitecture: arm64
runTests: false
## Linux
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Arm_Release
buildConfiguration: Release
buildArchitecture: arm
runtimeIdentifier: 'linux-arm'
linuxPortable: true
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Arm64_Release
buildConfiguration: Release
buildArchitecture: arm64
runtimeIdentifier: 'linux-arm64'
linuxPortable: true
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Linux_musl_Release_arm
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine'
buildConfiguration: Release
buildArchitecture: arm
runtimeIdentifier: 'linux-musl-arm'
additionalBuildParameters: '/p:OSName="linux-musl"'
linuxPortable: false
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Linux_musl_Release_arm64
buildConfiguration: Release
buildArchitecture: arm64
runtimeIdentifier: 'linux-musl-arm64'
additionalBuildParameters: '/p:OSName="linux-musl"'
linuxPortable: false
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Linux_musl_Release_x64
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode'
buildConfiguration: Release
buildArchitecture: x64
runtimeIdentifier: 'linux-musl-x64'
# Pass in HostOSName when running on alpine
additionalBuildParameters: '/p:HostOSName="linux-musl"'
linuxPortable: false
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Linux_Portable_Deb_Release_x64
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg'
buildConfiguration: Release
buildArchitecture: x64
# Do not publish zips and tarballs. The linux-x64 binaries are
# already published by Build_LinuxPortable_Release_x64
additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:BuildSdkDeb=true'
linuxPortable: true
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Linux_Portable_Rpm_Release_x64
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm'
buildConfiguration: Release
buildArchitecture: x64
# Do not publish zips and tarballs. The linux-x64 binaries are
# already published by Build_LinuxPortable_Release_x64
additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:IsRPMBasedDistro=true'
linuxPortable: true
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_Linux_Portable_Rpm_Release_Arm64
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm'
buildConfiguration: Release
buildArchitecture: arm64
runtimeIdentifier: 'linux-arm64'
# Do not publish zips and tarballs. The linux-x64 binaries are
# already published by Build_LinuxPortable_Release_x64
additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true /p:IsRPMBasedDistro=true'
linuxPortable: true
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Linux
jobName: Build_LinuxPortable_Release_x64
buildConfiguration: Release
buildArchitecture: x64
linuxPortable: true
runTests: false
# MacOS
- template: eng/build-pr.yml
parameters:
agentOs: Darwin
jobName: Build_Release_x64
buildConfiguration: Release
buildArchitecture: x64
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Darwin
jobName: Build_Release_arm64
runtimeIdentifier: 'osx-arm64'
buildConfiguration: Release
buildArchitecture: arm64
runTests: false
## Windows PGO Instrumentation builds
- template: eng/build-pr.yml
parameters:
agentOs: Windows_NT
pgoInstrument: true
jobName: Build_Release_x64
buildConfiguration: Release
buildArchitecture: x64
additionalBuildParameters: '/p:PublishInternalAsset=true'
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Windows_NT
pgoInstrument: true
jobName: Build_Release_x86
buildConfiguration: Release
buildArchitecture: x86
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Windows_NT
pgoInstrument: true
jobName: Build_Release_arm64
buildConfiguration: Release
buildArchitecture: arm64
runTests: false
## Linux PGO Instrumentation builds
- template: eng/build-pr.yml
parameters:
agentOs: Linux
pgoInstrument: true
jobName: Build_LinuxPortable_Release_x64
buildConfiguration: Release
buildArchitecture: x64
linuxPortable: true
runTests: false
- template: eng/build-pr.yml
parameters:
agentOs: Linux
pgoInstrument: true
jobName: Build_Release_arm64
buildConfiguration: Release
buildArchitecture: arm64
linuxPortable: true
runTests: false
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- stage: Publish
dependsOn:
- Build
jobs:
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
publishUsingPipelines: true
publishAssetsImmediately: true
pool:
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2022.amd64

6
CODE-OF-CONDUCT.md Normal file
View file

@ -0,0 +1,6 @@
# Code of Conduct
This project has adopted the code of conduct defined by the Contributor Covenant
to clarify expected behavior in our community.
For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).

4
CODEOWNERS Normal file
View file

@ -0,0 +1,4 @@
# Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths.
# See https://help.github.com/articles/about-code-owners/
/src/snaps/ @rbhanda

9
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,9 @@
Contributing
============
See [Contributing](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/contributing.md) for information about coding styles, source structure, making pull requests, and more.
Developers
==========
If you are looking to contribute to the verbs that ship with the SDK, please go to the [CLI Repo](https://github.com/dotnet/cli).

56
Directory.Build.props Normal file
View file

@ -0,0 +1,56 @@
<!-- Platform needs to be set with TreatAsLocalProperty since it is a global property and cannot be overridden otherwise. -->
<Project TreatAsLocalProperty="Platform">
<PropertyGroup>
<BuildArchitecture Condition="'$(BuildArchitecture)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
<Architecture Condition="'$(Architecture)' == '' AND ('$(BuildArchitecture)' == 'arm64' OR '$(BuildArchitecture)' == 'arm')">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 's390x'">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'ppc64le'">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'loongarch64'">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'riscv64'">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == ''">x64</Architecture>
<!--
The finalizer project needs to have Platform set to build for the correct architecture.
Platform needs to be set prior to calling the Arcade SDK, which sets PlatformName in RepoDefaults.props and modifies the OutputPath in ProjectLayout.props to include a PlatformName folder in the path.
Currently, build.cmd calls run-build.ps1, which always sets the Architecture.
However, if you wanted to build the finalizer project directly, the Architecture will use the logic above to be set properly, and thus maintain the correct OutputPath.
Note: The redist project does use Architecture. The Arcade SDK does not use either BuildArchitecture or Architecture.
-->
<Platform Condition="'$(SetPlatformFromArchitecture)' == 'true' And ('$(Platform)' == '' Or '$(Platform)' == 'AnyCPU')">$(Architecture)</Platform>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<PropertyGroup Condition="'$(CopyrightNetFoundation)' != ''">
<Copyright>$(CopyrightNetFoundation)</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
<PropertyGroup Condition="'$(PgoInstrument)' == 'true'">
<SkipBuildingInstallers>true</SkipBuildingInstallers>
<PgoTerm>-pgo</PgoTerm>
</PropertyGroup>
<PropertyGroup>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<IsShipping>true</IsShipping>
<CoreSdkTargetFramework>net9.0</CoreSdkTargetFramework>
<!-- MSB3243 and MSB3247 fire when attempting to resolve references to the same assembly from different cultures.
This is a prevalent problem in building the precomputed assembly reference cache. Limiting the assemblies resolved
to those outside the culture folders would work, but that is a nontrivial problem. -->
<NoWarn>NU5125;NU5105;NU1701;MSB3243;MSB3247</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(DisableSourceLink)' == 'true'">
<EnableSourceLink>false</EnableSourceLink>
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
<DeterministicSourcePaths>false</DeterministicSourcePaths>
<!-- Normally set by sourcelink, and needed by the Pack targets -->
<RepositoryUrl>https://github.com/dotnet/core-sdk</RepositoryUrl>
</PropertyGroup>
</Project>

21
Directory.Build.targets Normal file
View file

@ -0,0 +1,21 @@
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<!-- Explicitly remove Android, iOS, and macCatalyst from CA1416 analyzer warnings -->
<!-- https://github.com/dotnet/sdk/pull/16489 -->
<ItemGroup>
<SupportedPlatform Remove="Android" />
<SupportedPlatform Remove="iOS" />
<SupportedPlatform Remove="macCatalyst" />
</ItemGroup>
<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
and '$(MSBuildProjectName)' != 'core-sdk-tasks'">
<FrameworkReference
Update="Microsoft.NETCore.App"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
</ItemGroup>
</Project>

24
LICENSE Normal file
View file

@ -0,0 +1,24 @@
The MIT License (MIT)
Copyright (c) .NET Foundation and Contributors
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

67
Microsoft.DotNet.Cli.sln Normal file
View file

@ -0,0 +1,67 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34112.27
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ED2FE3E2-F7E7-4389-8231-B65123F2076F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "redist", "src\redist\redist.csproj", "{098D9321-1201-4974-A75E-F58EBCD98ACF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EndToEnd.Tests", "test\EndToEnd\EndToEnd.Tests.csproj", "{1BFF54F9-4E35-49DB-893C-AF2047722FC6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "core-sdk-tasks", "src\core-sdk-tasks\core-sdk-tasks.csproj", "{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Tests.Utilities", "test\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj", "{78E15EC1-7732-41E3-8591-934E9F583254}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SdkTests", "test\SdkTests\SdkTests.csproj", "{CB1EE94E-CB83-4071-9DD0-9929AE2B7282}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "core-sdk-tasks.Tests", "test\core-sdk-tasks.Tests\core-sdk-tasks.Tests.csproj", "{658EF9BE-452C-4D31-AA24-B9E2235799A8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{098D9321-1201-4974-A75E-F58EBCD98ACF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{098D9321-1201-4974-A75E-F58EBCD98ACF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{098D9321-1201-4974-A75E-F58EBCD98ACF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{098D9321-1201-4974-A75E-F58EBCD98ACF}.Release|Any CPU.Build.0 = Release|Any CPU
{1BFF54F9-4E35-49DB-893C-AF2047722FC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1BFF54F9-4E35-49DB-893C-AF2047722FC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1BFF54F9-4E35-49DB-893C-AF2047722FC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1BFF54F9-4E35-49DB-893C-AF2047722FC6}.Release|Any CPU.Build.0 = Release|Any CPU
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C}.Release|Any CPU.Build.0 = Release|Any CPU
{78E15EC1-7732-41E3-8591-934E9F583254}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78E15EC1-7732-41E3-8591-934E9F583254}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78E15EC1-7732-41E3-8591-934E9F583254}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78E15EC1-7732-41E3-8591-934E9F583254}.Release|Any CPU.Build.0 = Release|Any CPU
{CB1EE94E-CB83-4071-9DD0-9929AE2B7282}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CB1EE94E-CB83-4071-9DD0-9929AE2B7282}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CB1EE94E-CB83-4071-9DD0-9929AE2B7282}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CB1EE94E-CB83-4071-9DD0-9929AE2B7282}.Release|Any CPU.Build.0 = Release|Any CPU
{658EF9BE-452C-4D31-AA24-B9E2235799A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{658EF9BE-452C-4D31-AA24-B9E2235799A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{658EF9BE-452C-4D31-AA24-B9E2235799A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{658EF9BE-452C-4D31-AA24-B9E2235799A8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{098D9321-1201-4974-A75E-F58EBCD98ACF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{1BFF54F9-4E35-49DB-893C-AF2047722FC6} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{53AF2D01-B69F-4CD0-86A7-8FD95967D23C} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{78E15EC1-7732-41E3-8591-934E9F583254} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{CB1EE94E-CB83-4071-9DD0-9929AE2B7282} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{658EF9BE-452C-4D31-AA24-B9E2235799A8} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B526D2CE-EE2D-4AD4-93EF-1867D90FF1F5}
EndGlobalSection
EndGlobal

40
NuGet.config Normal file
View file

@ -0,0 +1,40 @@
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageSources>
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from DotNet-msbuild-Trusted -->
<!-- End: Package sources from DotNet-msbuild-Trusted -->
<!-- Begin: Package sources from dotnet-sdk -->
<!-- End: Package sources from dotnet-sdk -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="dotnet6-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json" />
<add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
<add key="dotnet7-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7-transport/nuget/v3/index.json" />
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
<add key="dotnet8-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json" />
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
<add key="dotnet9-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
<add key="dotnet-libraries-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries-transport/nuget/v3/index.json" />
<add key="msbuild-prerelease-with-release-version" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-DotNet-msbuild-Trusted-8ffc3fe3/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-aspnetcore -->
<!-- End: Package sources from dotnet-aspnetcore -->
<!-- Begin: Package sources from dotnet-runtime -->
<!-- Begin: Package sources from dotnet-sdk -->
<!-- End: Package sources from dotnet-sdk -->
<!-- Begin: Package sources from dotnet-windowsdesktop -->
<!-- End: Package sources from dotnet-windowsdesktop -->
<!-- End: Package sources from dotnet-runtime -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
</disabledPackageSources>
</configuration>

2
PULL_REQUEST_TEMPLATE Normal file
View file

@ -0,0 +1,2 @@
- Please add description for changes you are making.
- If there is an issue related to this PR, please add the reference.

176
README.md Normal file
View file

@ -0,0 +1,176 @@
# .NET SDK Installers
[![GitHub release](https://img.shields.io/github/release/dotnet/installer.svg)](https://GitHub.com/dotnet/installer/releases/)
[![GitHub repo size](https://img.shields.io/github/repo-size/dotnet/installer)](https://github.com/dotnet/installer)
[![GitHub issues-opened](https://img.shields.io/github/issues/dotnet/installer.svg)](https://GitHub.com/dotnet/installer/issues?q=is%3Aissue+is%3Aopened)
[![GitHub issues-closed](https://img.shields.io/github/issues-closed/dotnet/installer.svg)](https://GitHub.com/dotnet/installer/issues?q=is%3Aissue+is%3Aclosed)
[![GitHub pulls-opened](https://img.shields.io/github/issues-pr/dotnet/installer.svg)](https://GitHub.com/dotnet/installer/pulls?q=is%3Aissue+is%3Aopened)
[![GitHub pulls-merged](https://img.shields.io/github/issues-search/dotnet/installer?label=merged%20pull%20requests&query=is%3Apr%20is%3Aclosed%20is%3Amerged&color=darkviolet)](https://github.com/dotnet/installer/pulls?q=is%3Apr+is%3Aclosed+is%3Amerged)
[![GitHub pulls-unmerged](https://img.shields.io/github/issues-search/dotnet/installer?label=unmerged%20pull%20requests&query=is%3Apr%20is%3Aclosed%20is%3Aunmerged&color=red)](https://github.com/dotnet/installer/pulls?q=is%3Apr+is%3Aclosed+is%3Aunmerged)
[![GitHub contributors](https://img.shields.io/github/contributors/dotnet/installer.svg)](https://GitHub.com/dotnet/installer/graphs/contributors/)
[![Commit Activity](https://img.shields.io/github/commit-activity/m/dotnet/installer)]()
This repo contains the source code for the cross-platform [.NET](http://github.com/dotnet/core) SDK. It aggregates the .NET toolchain, the .NET runtime, the templates, and the .NET Windows Desktop runtime. It produces zip, tarballs, and native packages for various supported platforms.
Looking for released versions of the .NET tooling?
----------------------------------------
The links below are for preview versions of .NET tooling. Prefer to use released versions of the .NET tools? Go to https://dot.net/download.
Looking for .NET Framework downloads?
----------------------------------------
.NET Framework is the product from which the .NET Core project originated. .NET Core (mostly just called ".NET" here) adds many features and improvements and supports many more platforms than .NET Framework. .NET Framework remains fully supported and you can find the downloads on the [.NET website](https://dotnet.microsoft.com/download/dotnet-framework). For new projects, we recommend you use .NET Core.
Want to contribute or find out more about the .NET project?
----------------------------------------
This repo is for the installers. Most of the implementation is in other repos, such as the [dotnet/runtime repo](https://github.com/dotnet/runtime) or the [dotnet/aspnetcore repo](https://github.com/dotnet/aspnetcore) and [many others](https://github.com/dotnet/core/blob/main/Documentation/core-repos.md). We welcome you to join us there!
Found an issue?
---------------
You can consult the [Documents Index for the SDK repo](https://github.com/dotnet/sdk/blob/main/documentation/README.md) to find out current issues, see workarounds, and to see how to file new issues.
This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/) to clarify expected behavior in our community. For more information, see the [.NET Foundation Code of Conduct](http://www.dotnetfoundation.org/code-of-conduct).
# Build .NET installer
The repository contains native code project required for the Windows installer. If you intend to build it locally on Windows, you will need to ensure that you have the following items installed.
- Install CMAKE 3.21.0 is required if you're building VS 17.0. Make sure to add CMAKE to your PATH (the installer will prompt you).
- Install MSVC Build tools for x86/x64/arm64, v14.28-16.9
- `build` for basic build
- `build -pack` to build the installer
- To build in VS, run a command line build first, then run `artifacts\core-sdk-build-env.bat` from a VS command prompt and then `devenv Microsoft.DotNet.Cli.sln`
- To test different languages of the installer, run `artifacts\packages\Debug\Shipping>dotnet-sdk-3.1.412-win-x64.exe /lang 1046` using the LCID of the language you want to test
# Build .NET from source (source-build)
Please see the [dotnet/source-build](https://github.com/dotnet/source-build) repo for more information.
## Support
.NET Source-Build is supported on the oldest available .NET SDK feature update for each major release, and on Linux only.
For example, if .NET 6.0.1xx, 6.0.2xx, and 7.0.1xx feature updates are available from [dotnet.microsoft.com](https://dotnet.microsoft.com/en-us/download/dotnet/6.0), Source-Build will support 6.0.1xx and 7.0.1xx.
For the latest information about Source-Build support for new .NET versions, please check our [GitHub Discussions page](https://github.com/dotnet/source-build/discussions) for announcements.
## Building .NET 8.0
.NET 8.0 (currently in prerelease) and newer will be built from the [dotnet/dotnet](https://github.com/dotnet/dotnet) repo.
Clone the dotnet/dotnet repo and check out the tag for the desired release.
Then, follow the instructions in [dotnet/dotnet's README](https://github.com/dotnet/dotnet/blob/main/README.md#dev-instructions) to build .NET from source.
## Building .NET 7.0 and .NET 6.0
1. Create a .NET source tarball.
```bash
./build.sh /p:ArcadeBuildTarball=true /p:TarballDir=/path/to/place/complete/dotnet/sources
```
This fetches the complete .NET source code and creates a tarball at `artifacts/packages/<Release|Debug>/Shipping/`.
The extracted source code is also placed at `/path/to/place/complete/dotnet/sources`.
The source directory should be outside (and not somewhere under) the installer directory.
2. Prep the source to build on your distro. This downloads a .NET SDK and a number of .NET packages needed to build .NET from source.
```bash
cd /path/to/complete/dotnet/sources
./prep.sh --bootstrap
```
3. Build the .NET SDK
```bash
./build.sh --clean-while-building
```
This builds the entire .NET SDK from source.
The resulting SDK is placed at `artifacts/x64/Release/dotnet-sdk-7.0.100-your-RID.tar.gz`.
Optionally add the `--online` flag to add online NuGet restore sources to the build.
This is useful for testing unsupported releases that don't yet build without downloading pre-built binaries from the internet.
Run `./build.sh --help` to see more information about supported build options.
4. (Optional) Unpack and install the .NET SDK
```bash
mkdir -p $HOME/dotnet
tar zxf artifacts/x64/Release/dotnet-sdk-7.0.100-your-RID.tar.gz -C $HOME/dotnet
ln -s $HOME/dotnet/dotnet /usr/bin/dotnet
```
To test your source-built SDK, run the following:
```bash
dotnet --info
```
# Build status
Visibility|All legs|
|:------|:------|
|Public|[![Status](https://dev.azure.com/dnceng-public/public/_apis/build/status%2Fdotnet%2Finstaller%2Finstaller?branchName=main)](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=20&branchName=main)|
|Microsoft Internal|[![Status](https://dev.azure.com/dnceng/internal/_apis/build/status/286)](https://dev.azure.com/dnceng/internal/_build?definitionId=286)|
## Installers and Binaries
You can download the .NET SDK as either an installer (MSI, PKG) or a zip (zip, tar.gz). The .NET SDK contains both the .NET runtime and CLI tools.
**Note:** Be aware that the following installers are the **latest bits**. If you
want to install the latest released versions, check out the [preceding section](#looking-for-released-versions-of-the-net-core-tooling).
With development builds, internal NuGet feeds are necessary for some scenarios (for example, to acquire the runtime pack for self-contained apps). You can use the following NuGet.config to configure these feeds. See the following document [Configuring NuGet behavior](https://docs.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior) for more information on where to modify your NuGet.config to apply the changes.
**For .NET 9 builds**
```xml
<configuration>
<packageSources>
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
</packageSources>
</configuration>
```
**For .NET 8 builds**
```xml
<configuration>
<packageSources>
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
</packageSources>
</configuration>
```
**For .NET 7 builds**
```xml
<configuration>
<packageSources>
<add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
</packageSources>
</configuration>
```
Do not directly edit the table below. Use https://github.com/dotnet/installer/tree/main/tools/sdk-readme-table-generator to help you generate it. Make sure to run the table generator test and make any changes to the generator along with your changes to the table. Daily servicing builds aren't shown here because they may contain upcoming security fixes. All public servicing builds can be downloaded at http://aka.ms/dotnet-download.
### Table
Latest builds table is in [here](https://github.com/dotnet/sdk/blob/main/documentation/package-table.md#table).
Looking for dotnet-install sources?
-----------------------------------
Sources for dotnet-install.sh and dotnet-install.ps1 are in the [install-scripts repo](https://github.com/dotnet/install-scripts).
Questions & Comments
--------------------
For all feedback, use the Issues on the [.NET SDK](https://github.com/dotnet/sdk) repository.
License
-------
The .NET project uses the [MIT license](LICENSE).
The LICENSE and ThirdPartyNotices in any downloaded archives are authoritative.

15
SECURITY.md Normal file
View file

@ -0,0 +1,15 @@
# Security Policy
## Supported Versions
The .NET Core and ASP.NET Core support policy, including supported versions can be found at the [.NET Core Support Policy Page](https://dotnet.microsoft.com/platform/support/policy/dotnet-core).
## Reporting a Vulnerability
Security issues and bugs should be reported privately to the Microsoft Security Response Center (MSRC), either by emailing secure@microsoft.com or via the portal at https://msrc.microsoft.com.
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your
original message. Further information, including the MSRC PGP key, can be found in the [MSRC Report an Issue FAQ](https://www.microsoft.com/en-us/msrc/faqs-report-an-issue).
Reports via MSRC may qualify for the .NET Core Bug Bounty. Details of the .NET Core Bug Bounty including terms and conditions are at [https://aka.ms/corebounty](https://aka.ms/corebounty).
Please do not open issues for anything you think might have a security implication.

112
THIRD-PARTY-NOTICES Normal file
View file

@ -0,0 +1,112 @@
.NET Core uses third-party libraries or other resources that may be
distributed under licenses different than the .NET Core software.
Attributions and licence notices for test cases originally authored by
third parties can be found in the respective test directories.
In the event that we accidentally failed to list a required notice, please
bring it to our attention. Post an issue or email us:
dotnet@microsoft.com
The attached notices are provided for information only.
License notice for Nuget.Client
-------------------------------
Copyright (c) .NET Foundation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
these files except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
License notice for LZMA SDK
---------------------------
http://7-zip.org/sdk.html
LZMA SDK is placed in the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute the
original LZMA SDK code, either in source code form or as a compiled binary,
for any purpose, commercial or non-commercial, and by any means.
License notice for RFC 3492
---------------------------
Copyright (C) The Internet Society (2003). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
License notice for MonoDevelop
------------------------------
Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Copyright (c) 2011 Novell, Inc (http://www.novell.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.2;net461</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\TestLibrary\TestLibrary.csproj" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,15 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace TestApp
{
class Program
{
public static void Main(string[] args)
{
Console.WriteLine(TestLibrary.Helper.GetMessage());
}
}
}

View file

@ -0,0 +1,15 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace TestApp
{
class Program
{
public static void Main(string[] args)
{
Console.WriteLine(TestLibrary.Helper.GetMessage());
}
}
}

View file

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\TestLibrary\TestLibrary.csproj" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,24 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace TestLibrary
{
public static class Helper
{
/// <summary>
/// Gets the message from the helper. This comment is here to help test XML documentation file generation, please do not remove it.
/// </summary>
/// <returns>A message</returns>
public static string GetMessage()
{
return "This string came from the test library!";
}
public static void SayHi()
{
Console.WriteLine("Hello there!");
}
}
}

View file

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,3 @@
<Project>
<!-- Empty Directory.Build.props file to prevent test asset projects from picking up the repo's Directory.Build.props' -->
</Project>

View file

@ -0,0 +1,3 @@
<Project>
<!-- Empty Directory.Build.targets file to prevent test asset projects from picking up the repo's Directory.Build.props' -->
</Project>

View file

@ -0,0 +1,2 @@
This directory is intentionally empty.

View file

@ -0,0 +1,22 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.IO;
using System.Reflection;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello Portable World!");
var depsFile = new FileInfo(AppContext.GetData("FX_DEPS_FILE") as string);
string frameworkVersion = depsFile.Directory.Name;
Console.WriteLine($"I'm running on shared framework version {frameworkVersion}!");
}
}
}

View file

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- netcoreapp2.2 is the maximum TFM project tools support -->
<TargetFramework>netcoreapp2.2</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,15 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello I prefer the cli runtime World!");
}
}
}

View file

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- netcoreapp2.2 is the maximum TFM project tools support -->
<TargetFramework>netcoreapp2.2</TargetFramework>
<OutputType>Exe</OutputType>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
<ItemGroup>
<Content Include="prefercliruntime">
<Pack>true</Pack>
<PackagePath>/</PackagePath>
</Content>
</ItemGroup>
</Project>

View file

@ -0,0 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,16 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace MSBuildTestApp
{
public class Program
{
public static void Main(string[] args)
{
var message = Environment.GetEnvironmentVariable("ASPNETCORE_URLS");
Console.WriteLine(message);
}
}
}

View file

@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:49850/",
"sslPort": 0
}
},
"profiles": {
"First": {
"commandName": "Project",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_URLS": "http://localhost:12345/"
},
"applicationUrl": "http://localhost:67890/"
},
"Second": {
"commandName": "Project",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:54321/"
}
}
}

View file

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,19 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace MSBuildTestApp
{
public class Program
{
public static void Main(string[] args)
{
if (args.Length > 0)
{
Console.WriteLine("echo args:" + string.Join(";", args));
}
Console.WriteLine("Hello World!");
}
}
}

View file

@ -0,0 +1,18 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26006.2
MinimumVisualStudioVersion = 10.0.40219.1
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,2 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View file

@ -0,0 +1,23 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
if (args.Length > 0)
{
for (int i = 0; i < args.Length; i++)
{
Console.WriteLine($"{i} = {args[i]}");
}
}
}
}
}

View file

@ -0,0 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,2 @@
This directory is intentionally empty.

View file

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,2 @@
This directory is intentionally empty.

View file

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,21 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26006.2
MinimumVisualStudioVersion = 10.0.40219.1
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
Foo Bar|Any CPU = Foo Bar|Any CPU
Foo Bar|x64 = Foo Bar|x64
Foo Bar|x86 = Foo Bar|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,15 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace ProjectWithAdditionalConfigs
{
public static class Library
{
public static string GetMessage()
{
return "Hello World!";
}
}
}

View file

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProjectGuid>{A302325B-D680-4C0E-8680-7AE283981624}</ProjectGuid>
<Platforms>AnyCPU;x64;x86;AdditionalPlatform</Platforms>
<Configurations>Debug;Release;FooBar;AdditionalConfiguration</Configurations>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,15 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace ProjectWithMatchingConfigs
{
public static class Library
{
public static string GetMessage()
{
return "Hello World!";
}
}
}

View file

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProjectGuid>{C9601CA2-DB64-4FB6-B463-368C7764BF0D}</ProjectGuid>
<Platforms>AnyCPU;x64;x86</Platforms>
<Configurations>Debug;Release;FooBar</Configurations>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,15 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace ProjectWithoutMatchingConfigs
{
public static class Library
{
public static string GetMessage()
{
return "Hello World!";
}
}
}

View file

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProjectGuid>{C49B64DE-4401-4825-8A88-10DCB5950E57}</ProjectGuid>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,44 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27110.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "App\App.csproj", "{BB02B949-F6BD-4872-95CB-96A05B1FE026}"
ProjectSection(ProjectDependencies) = postProject
{4E952B56-841D-461D-89A9-7977DDCC0625} = {4E952B56-841D-461D-89A9-7977DDCC0625}
{D53E177A-8ECF-43D5-A01E-98B884D53CA6} = {D53E177A-8ECF-43D5-A01E-98B884D53CA6}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "First", "First\First.csproj", "{D53E177A-8ECF-43D5-A01E-98B884D53CA6}"
ProjectSection(ProjectDependencies) = postProject
{4E952B56-841D-461D-89A9-7977DDCC0625} = {4E952B56-841D-461D-89A9-7977DDCC0625}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Second", "Second\Second.csproj", "{4E952B56-841D-461D-89A9-7977DDCC0625}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BB02B949-F6BD-4872-95CB-96A05B1FE026}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB02B949-F6BD-4872-95CB-96A05B1FE026}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB02B949-F6BD-4872-95CB-96A05B1FE026}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BB02B949-F6BD-4872-95CB-96A05B1FE026}.Release|Any CPU.Build.0 = Release|Any CPU
{D53E177A-8ECF-43D5-A01E-98B884D53CA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D53E177A-8ECF-43D5-A01E-98B884D53CA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D53E177A-8ECF-43D5-A01E-98B884D53CA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D53E177A-8ECF-43D5-A01E-98B884D53CA6}.Release|Any CPU.Build.0 = Release|Any CPU
{4E952B56-841D-461D-89A9-7977DDCC0625}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E952B56-841D-461D-89A9-7977DDCC0625}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E952B56-841D-461D-89A9-7977DDCC0625}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E952B56-841D-461D-89A9-7977DDCC0625}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F6D9A973-1CFD-41C9-84F2-1471C0FE67DF}
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,12 @@
using System;
namespace App
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

View file

@ -0,0 +1,8 @@
using System;
namespace First
{
public class Class1
{
}
}

View file

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,8 @@
using System;
namespace Second
{
public class Class1
{
}
}

View file

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,16 @@
@page
@model TestRazorApp.MyFeature.Pages.Page1Model
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Page1</title>
</head>
<body>
</body>
</html>

View file

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace TestRazorApp.MyFeature.Pages
{
public class Page1Model : PageModel
{
public void OnGet()
{
}
}
}

View file

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace TestWebAppSimple
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}

View file

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace TestWebAppSimple
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.Run(async (context) =>
{
await context.Response.WriteAsync("Hello World!");
});
}
}
}

View file

@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<Target Name="WriteDefaultPatchVersionsFile" BeforeTargets="Restore">
<WriteLinesToFile
File="$(MSBuildThisFileDirectory)/.DefaultPatchVersionForAspNetCoreApp2_1"
Lines="$(DefaultPatchVersionForAspNetCoreApp2_1)"
Overwrite="true"/>
</Target>
<Target Name="WriteBundledVersionsFile" BeforeTargets="Restore">
<WriteLinesToFile
File="$(MSBuildThisFileDirectory)/.BundledAspNetCoreVersion"
Lines="$(MicrosoftAspNetCoreAppRuntimeX64PackageVersion)"
Overwrite="true"/>
</Target>
</Project>

View file

@ -0,0 +1,14 @@
using System;
using Windows.Data.Json;
namespace consolecswinrt
{
class Program
{
static void Main(string[] args)
{
var rootObject = JsonObject.Parse("{\"greet\": \"Hello\"}");
Console.WriteLine(rootObject["greet"]);
}
}
}

View file

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.Docker.Sdk">
<PropertyGroup Label="Globals">
<ProjectVersion>2.0</ProjectVersion>
<DockerTargetOS>Linux</DockerTargetOS>
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
<DockerServiceUrl>http://localhost:{ServicePort}</DockerServiceUrl>
<DockerServiceName>testwebapplication</DockerServiceName>
</PropertyGroup>
<ItemGroup>
<None Include="docker-compose.yml" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,8 @@
version: '3.0'
services:
testwebapplication:
image: testwebapplication
build:
context: .
dockerfile: testwebapplication/Dockerfile

7
build.cmd Normal file
View file

@ -0,0 +1,7 @@
@echo off
REM Copyright (c) .NET Foundation and contributors. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
powershell -ExecutionPolicy Bypass -NoProfile -NoLogo -Command "& \"%~dp0run-build.ps1\" %*; exit $LastExitCode;"
if %errorlevel% neq 0 exit /b %errorlevel%

42
build.sh Executable file
View file

@ -0,0 +1,42 @@
#!/usr/bin/env bash
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
# Set OFFLINE environment variable to build offline
set -e
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# Some things depend on HOME and it may not be set. We should fix those things, but until then, we just patch a value in
if [ -z "$HOME" ]; then
export HOME=$DIR/artifacts/home
[ ! -d "$HOME" ] || rm -Rf $HOME
mkdir -p $HOME
fi
args=
while [[ $# > 0 ]]; do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
--noprettyprint)
export DOTNET_CORESDK_NOPRETTYPRINT=1
;;
*)
args="$args $1"
;;
esac
shift
done
$DIR/run-build.sh $args

23
eng/AfterSigning.targets Normal file
View file

@ -0,0 +1,23 @@
<Project>
<PropertyGroup>
<_SuppressSdkImports>false</_SuppressSdkImports>
</PropertyGroup>
<Target Name="PopulateGenerateChecksumItems" AfterTargets="Build" BeforeTargets="GenerateChecksums">
<ItemGroup>
<InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.msi" />
<InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.exe" />
<InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.zip" Exclude="$(ArtifactsShippingPackagesDir)**\*.wixpack.zip" />
<InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.tar.gz" />
<InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.deb" />
<InstallerFiles Include="$(ArtifactsShippingPackagesDir)**\*.rpm" />
<GenerateChecksumItems Include="%(InstallerFiles.Identity)">
<DestinationPath>%(FullPath).sha512</DestinationPath>
</GenerateChecksumItems>
</ItemGroup>
</Target>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
</Project>

9
eng/Build.props Normal file
View file

@ -0,0 +1,9 @@
<Project>
<ItemGroup>
<ProjectToBuild Include="$(RepoRoot)Microsoft.DotNet.Cli.sln" />
<ProjectToBuild Condition="'$(OS)' == 'Windows_NT' And ('$(Architecture)' == 'x86' Or '$(Architecture)' == 'x64' Or '$(Architecture)' == 'arm64')"
Include="$(RepoRoot)src\finalizer\finalizer-build.csproj" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,10 @@
{
"RetryCountLimit":1,
"RetryByPipeline":{
"RetryStages":[
{
"StageName":"build"
}
]
}
}

7
eng/CopyToLatest.cmd Normal file
View file

@ -0,0 +1,7 @@
@echo off
REM Copyright (c) .NET Foundation and contributors. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
powershell -ExecutionPolicy Bypass -NoProfile -NoLogo -Command "& \"%~dp0common\build.ps1\" -restore -build /p:Projects=\"%~dp0..\src\CopyToLatest\CopyToLatest.csproj\" %*; exit $LastExitCode;"
if %errorlevel% neq 0 exit /b %errorlevel%

BIN
eng/Key.snk Normal file

Binary file not shown.

20
eng/ManualVersions.props Normal file
View file

@ -0,0 +1,20 @@
<Project>
<!--
The following properties (unlike those in version.props) are maintained manually. So
when there is a merge conflict, the highest version should generally be chosen, rather
than keeping what's in the branch, which is the usual strategy with version.props merge
conflicts.
Basically: In this file, choose the highest version when resolving merge conflicts.
-->
<PropertyGroup>
<MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>10.0.17763.31</MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>10.0.18362.31</MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>10.0.19041.31</MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_20348PackageVersion>10.0.20348.31</MicrosoftWindowsSDKNETRef10_0_20348PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>10.0.22000.31</MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_22621PackageVersion>10.0.22621.31</MicrosoftWindowsSDKNETRef10_0_22621PackageVersion>
</PropertyGroup>
</Project>

156
eng/Publishing.props Normal file
View file

@ -0,0 +1,156 @@
<Project>
<PropertyGroup>
<Product>Sdk</Product>
<BlobStoragePartialRelativePath>$(Product)</BlobStoragePartialRelativePath>
<PublishBinariesAndBadge Condition=" '$(PublishBinariesAndBadge)' == '' ">true</PublishBinariesAndBadge>
<!-- Installer doesn't produce any interesting binaries that need a symbol package generated in
parallel to the regular package. This avoids creating VS.*.symbols.nupkg packages that
are identical to the original package. -->
<AutoGenerateSymbolPackages>false</AutoGenerateSymbolPackages>
</PropertyGroup>
<!-- Pulled from arcade's publish.proj see https://github.com/dotnet/arcade/issues/5790 for
issue on making this common in arcade so it doesn't have to be duplicated here -->
<PropertyGroup>
<CollectionUri>$(SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)</CollectionUri>
<!-- When we have dev.azure.com/<account>/ -->
<AzureDevOpsAccount Condition="$(CollectionUri.IndexOf('dev.azure.com')) >= 0">$(CollectionUri.Split('/')[3])</AzureDevOpsAccount>
<!-- When we have <account>.visualstudio.com -->
<AzureDevOpsAccount Condition="$(CollectionUri.IndexOf('visualstudio.com')) >= 0">$(CollectionUri.Split('.')[0].Split('/')[2])</AzureDevOpsAccount>
</PropertyGroup>
<!--
The new Maestro/BAR build model keeps separate Azure DevOps and GitHub build information.
The GitHub information will be extracted based on the Azure DevOps repository.
-->
<ItemGroup>
<ManifestBuildData Include="InitialAssetsLocation=$(SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)$(SYSTEM_TEAMPROJECT)/_apis/build/builds/$(BUILD_BUILDID)/artifacts" />
<ManifestBuildData Include="AzureDevOpsBuildId=$(BUILD_BUILDID)" />
<ManifestBuildData Include="AzureDevOpsBuildDefinitionId=$(SYSTEM_DEFINITIONID)" />
<ManifestBuildData Include="AzureDevOpsAccount=$(AzureDevOpsAccount)" />
<ManifestBuildData Include="AzureDevOpsProject=$(SYSTEM_TEAMPROJECT)" />
<ManifestBuildData Include="AzureDevOpsBuildNumber=$(BUILD_BUILDNUMBER)" />
<ManifestBuildData Include="AzureDevOpsRepository=$(BUILD_REPOSITORY_URI)" />
<ManifestBuildData Include="AzureDevOpsBranch=$(BUILD_SOURCEBRANCH)" />
</ItemGroup>
<PropertyGroup>
<!-- Because we may be building in a container, we should use an asset manifest file path
that exists in the container. Disambiguate the manifests via available properties.
AGENT_OS and AGENT_JOBNAME are present on Azure DevOps agents. AssetManifestOS will also
be used by arcade to generate the name of the manifest file name for the built in publishing. -->
<AssetManifestOS Condition="'$(AGENT_OS)' != ''">$(AGENT_OS)</AssetManifestOS>
<AssetManifestOS Condition="'$(AGENT_OS)' == ''">$(OS)</AssetManifestOS>
<AssetManifestOS Condition="'$(AGENT_JOBNAME)' != ''">$(AssetManifestOS)-$(AGENT_JOBNAME)</AssetManifestOS>
<BaseAssetManifestFileName>$(AssetManifestOS)</BaseAssetManifestFileName>
<BaseAssetManifestFileName Condition="'$(AGENT_JOBNAME)' == '' and '$(Architecture)' != ''">$(AssetManifestOS)-$(Architecture)</BaseAssetManifestFileName>
<InstallersAssetManifestFileName>$(BaseAssetManifestFileName)-installers</InstallersAssetManifestFileName>
<!-- Property AssetManifestFilePath would be reassigned by the Arcade SDK, so use a different name (InstallersAssetManifestFilePath) -->
<InstallersAssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(InstallersAssetManifestFileName).xml</InstallersAssetManifestFilePath>
<DotnetTempWorkingDirectory>$(ArtifactsDir)..\DotnetAssetsTmpDir\$([System.Guid]::NewGuid())</DotnetTempWorkingDirectory>
<ChecksumTempWorkingDirectory>$(ArtifactsDir)..\ChecksumAssetsTmpDir\$([System.Guid]::NewGuid())</ChecksumTempWorkingDirectory>
</PropertyGroup>
<ItemGroup>
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.zip" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.tar.gz" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.pkg" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.exe" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.deb" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.rpm" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.msi" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.cab" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.svg" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
<!-- Only publish this file from windows x64 so that we don't end up with duplicates -->
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)productVersion.txt"
Condition=" '$(PublishBinariesAndBadge)' == 'true' and '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x64' and '$(PgoInstrument)' != 'true'" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)sdk-productVersion.txt"
Condition=" '$(PublishBinariesAndBadge)' == 'true' and '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x64' and '$(PgoInstrument)' != 'true'" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)productCommit-*.json" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)productCommit-*.txt" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.swr" />
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.msi" />
<SdkNonShippingAssetsToPublish Condition="'$(PublishBinariesAndBadge)' != 'false'" Include="$(ArtifactsNonShippingPackagesDir)*.tar.gz" />
<WixPacksToPublish Include="$(ArtifactsNonShippingPackagesDir)*.wixpack.zip" />
<SdkNonShippingAssetsToPublish Condition="'$(PublishBinariesAndBadge)' != 'false'" Include="$(ArtifactsNonShippingPackagesDir)*.zip" />
<!-- Remove wixpacks if not doing post-build signing, since they are not needed -->
<SdkNonShippingAssetsToPublish Remove="@(WixPacksToPublish)" Condition="'$(PostBuildSign)' != 'true'" />
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.pkg" />
<CheckSumsToPublish Include="$(ArtifactsShippingPackagesDir)*.sha512" />
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)productCommit-*.json.sha512" Condition=" '$(PublishBinariesAndBadge)' == 'false'" />
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)productCommit-*.txt.sha512" Condition=" '$(PublishBinariesAndBadge)' == 'false'" />
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)productVersion.txt.sha512" Condition=" '$(OS)' != 'Windows_NT' or '$(Architecture)' != 'x64'" />
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)sdk-productVersion.txt.sha512" Condition=" '$(OS)' != 'Windows_NT' or '$(Architecture)' != 'x64'" />
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)*.zip.sha512" Condition=" '$(PublishBinariesAndBadge)' == 'false' " />
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)*.tar.gz.sha512" Condition=" '$(PublishBinariesAndBadge)' == 'false' " />
</ItemGroup>
<Target Name="PublishSdkAssetsAndChecksums"
BeforeTargets="Publish"
Condition="$(DotNetPublishUsingPipelines)">
<ReadLinesFromFile File="$(ArtifactsTmpDir)FullNugetVersion.version">
<Output TaskParameter="Lines" PropertyName="FullNugetVersion" />
</ReadLinesFromFile>
<ItemGroup>
<!-- Always publish blobs to a suffixed directory. -->
<SdkAssetsToPushToBlobFeed Include="@(SdkAssetsToPublish)">
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)'))</RelativeBlobPath>
</SdkAssetsToPushToBlobFeed>
<SdkAssetsToPushToBlobFeed Include="@(SdkNonShippingAssetsToPublish)">
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)'))</RelativeBlobPath>
<ManifestArtifactData>NonShipping=true</ManifestArtifactData>
</SdkAssetsToPushToBlobFeed>
<ChecksumsToPushToBlobFeed Include="@(CheckSumsToPublish)">
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)'))</RelativeBlobPath>
</ChecksumsToPushToBlobFeed>
</ItemGroup>
<ItemGroup Condition="'$(PostBuildSign)' == 'true'">
<ItemsToSignPostBuildWithPaths Include="$(ArtifactsShippingPackagesDir)*.zip" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
<ItemsToSignPostBuildWithPaths Include="$(ArtifactsShippingPackagesDir)*.exe" />
<ItemsToSignPostBuildWithPaths Include="$(ArtifactsShippingPackagesDir)*.msi" />
<ItemsToSignPostBuildWithPaths Include="$(ArtifactsNonShippingPackagesDir)*.msi" />
<ItemsToSignPostBuildWithPaths Include="$(ArtifactsNonShippingPackagesDir)*.zip" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
<ItemsToSignPostBuild Remove="@(ItemsToSignPostBuild)" />
<ItemsToSignPostBuild Include="@(ItemsToSignPostBuildWithPaths->'%(Filename)%(Extension)')" />
</ItemGroup>
<PropertyGroup>
<IsStableBuild>false</IsStableBuild>
<IsStableBuild Condition="'$(DotNetFinalVersionKind)' == 'release'">true</IsStableBuild>
</PropertyGroup>
<PushToBuildStorage
AzureDevOpsCollectionUri="$(SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)"
AzureDevOpsProject="$(SYSTEM_TEAMPROJECT)"
AzureDevOpsBuildId="$(BUILD_BUILDID)"
ItemsToPush="@(SdkAssetsToPushToBlobFeed);@(ChecksumsToPushToBlobFeed)"
ItemsToSign="@(ItemsToSignPostBuild)"
CertificatesSignInfo="@(CertificatesSignInfo)"
StrongNameSignInfo="@(StrongNameSignInfo)"
FileSignInfo="@(FileSignInfo)"
FileExtensionSignInfo="@(FileExtensionSignInfo)"
ManifestBuildData="@(ManifestBuildData)"
ManifestRepoName="$(BUILD_REPOSITORY_NAME)"
ManifestBranch="$(BUILD_SOURCEBRANCH)"
ManifestBuildId="$(BUILD_BUILDNUMBER)"
ManifestCommit="$(BUILD_SOURCEVERSION)"
AssetManifestPath="$(InstallersAssetManifestFilePath)"
PublishFlatContainer="true"
IsStableBuild="$(IsStableBuild)"
PublishingVersion="3"
PushToLocalStorage="$(PushToLocalStorage)"
AssetsLocalStorageDir="$(SourceBuiltAssetsDir)"
ShippingPackagesLocalStorageDir="$(SourceBuiltShippingPackagesDir)"
NonShippingPackagesLocalStorageDir="$(SourceBuiltNonShippingPackagesDir)"
AssetManifestsLocalStorageDir="$(SourceBuiltAssetManifestsDir)" />
</Target>
</Project>

View file

@ -0,0 +1,8 @@
;; Exclusions for SignCheck.
;; Format: https://github.com/dotnet/arcade/blob/397316e195639450b6c76bfeb9823b40bee72d6d/src/SignCheck/Microsoft.SignCheck/Verification/Exclusion.cs#L23-L35
*.js;; We do not sign JavaScript files.
*apphost.exe;;Template, DO-NOT-SIGN, https://github.com/dotnet/core-setup/pull/7549
*singlefilehost.exe;;Template, DO-NOT-SIGN, https://github.com/dotnet/core-setup/pull/7549
*comhost.dll;;Template, DO-NOT-SIGN, https://github.com/dotnet/core-setup/pull/7549
*apphosttemplateapphostexe.exe;;Template, DO-NOT-SIGN, https://github.com/dotnet/core-setup/pull/7549

53
eng/Signing.props Normal file
View file

@ -0,0 +1,53 @@
<Project>
<ItemGroup>
<!-- Remove the wixpacks from items to sign post build. These will be added explicitly by the
custom publishing target. And should not be picked up by arcade's default publishing logic. -->
<ItemsToSignPostBuild Remove="*.wixpack.zip" />
</ItemGroup>
<ItemGroup Condition="'$(PostBuildSign)' != 'true'">
<ItemsToSign Remove="@(ItemsToSign)" />
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.exe" />
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.zip" />
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.msi" />
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.nupkg" />
</ItemGroup>
<PropertyGroup>
<ExternalCertificateId Condition="'$(ExternalCertificateId)' == ''">3PartySHA2</ExternalCertificateId>
<InternalCertificateId Condition="'$(InternalCertificateId)' == ''">MicrosoftDotNet500</InternalCertificateId>
<!-- Signing of shipping artifacts (layout, msi, bundle) are handled separately. It is therefore expected that <ItemsToSign> could be an empty set. -->
<AllowEmptySignList>true</AllowEmptySignList>
<AllowEmptySignPostBuildList>true</AllowEmptySignPostBuildList>
<UseDotNetCertificate>true</UseDotNetCertificate>
</PropertyGroup>
<ItemGroup>
<FileSignInfo Include="Newtonsoft.Json.dll" CertificateName="$(ExternalCertificateId)" />
<FileSignInfo Include="MessagePack.Annotations.dll" CertificateName="$(ExternalCertificateId)" />
<FileSignInfo Include="MessagePack.dll" CertificateName="$(ExternalCertificateId)" />
<FileSignInfo Include="Nerdbank.Streams.dll" CertificateName="$(ExternalCertificateId)" />
<FileSignInfo Include="StreamJsonRpc.dll" CertificateName="$(ExternalCertificateId)" />
<FileSignInfo Include="Valleysoft.DockerCredsProvider.dll" CertificateName="$(ExternalCertificateId)" />
<!-- Files in the layout that should not be signed -->
<FileSignInfo Include="apphost.exe" CertificateName="None" />
<FileSignInfo Include="comhost.dll" CertificateName="None" />
<FileSignInfo Include="singlefilehost.exe" CertificateName="None" />
<FileExtensionSignInfo Include=".msi" CertificateName="$(InternalCertificateId)" />
<!-- .ttf, .otf, and .js files come in from some older aspnetcore packages (e.g. 2.1).
These files in the 5.0 packages are NOT signed. When doing postbuild signing,
SignTool will recognize that the files in the installer zips came from the 5.0 packages
pulled in from aspnetcore, and aspnetcore said not to sign them. This info is not
available for the 2.1 packages, so we need to avoid signing these in this repo. -->
<FileExtensionSignInfo Include=".ttf" CertificateName="None" />
<FileExtensionSignInfo Include=".otf" CertificateName="None" />
<FileExtensionSignInfo Remove=".js" />
<FileExtensionSignInfo Include=".js" CertificateName="None" />
</ItemGroup>
</Project>

8
eng/TestVersions.props Normal file
View file

@ -0,0 +1,8 @@
<Project>
<PropertyGroup>
<NuGetFrameworksPackageVersion>5.3.0</NuGetFrameworksPackageVersion>
<MicrosoftDotNetCliUtilsPackageVersion>$(MicrosoftDotnetToolsetInternalPackageVersion)</MicrosoftDotNetCliUtilsPackageVersion>
<MicrosoftNETTestSdkPackageVersion>15.8.0</MicrosoftNETTestSdkPackageVersion>
<MicrosoftDotNetProjectJsonMigrationPackageVersion>1.3.1</MicrosoftDotNetProjectJsonMigrationPackageVersion>
</PropertyGroup>
</Project>

208
eng/Version.Details.xml Normal file
View file

@ -0,0 +1,208 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.WindowsDesktop.App.Ref" Version="9.0.0-preview.5.24270.18" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/windowsdesktop</Uri>
<Sha>c14643d9ce8c64868af61b776bb4768123bcc6c2</Sha>
</Dependency>
<Dependency Name="VS.Redist.Common.WindowsDesktop.SharedFramework.x64.9.0" Version="9.0.0-preview.5.24270.18" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/windowsdesktop</Uri>
<Sha>c14643d9ce8c64868af61b776bb4768123bcc6c2</Sha>
</Dependency>
<Dependency Name="VS.Redist.Common.WindowsDesktop.TargetingPack.x64.9.0" Version="9.0.0-preview.5.24270.18" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/windowsdesktop</Uri>
<Sha>c14643d9ce8c64868af61b776bb4768123bcc6c2</Sha>
</Dependency>
<Dependency Name="Microsoft.WindowsDesktop.App.Runtime.win-x64" Version="9.0.0-preview.5.24270.18" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/windowsdesktop</Uri>
<Sha>c14643d9ce8c64868af61b776bb4768123bcc6c2</Sha>
</Dependency>
<Dependency Name="VS.Redist.Common.NetCore.SharedFramework.x64.9.0" Version="9.0.0-preview.5.24268.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5474ab5c50fc639e780e0322cd500b2e43ee9b0d</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="9.0.0-preview.5.24268.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5474ab5c50fc639e780e0322cd500b2e43ee9b0d</Sha>
</Dependency>
<Dependency Name="VS.Redist.Common.NetCore.TargetingPack.x64.9.0" Version="9.0.0-preview.5.24268.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5474ab5c50fc639e780e0322cd500b2e43ee9b0d</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="9.0.0-preview.5.24268.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5474ab5c50fc639e780e0322cd500b2e43ee9b0d</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Host.win-x64" Version="9.0.0-preview.5.24268.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5474ab5c50fc639e780e0322cd500b2e43ee9b0d</Sha>
</Dependency>
<!-- Change blob version in GenerateLayout.targets if this is unpinned to service targeting pack -->
<!-- No new netstandard.library planned for 3.1 timeframe at this time. -->
<Dependency Name="NETStandard.Library.Ref" Version="2.1.0" Pinned="true">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>7d57652f33493fa022125b7f63aad0d70c52d810</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.Platforms" Version="9.0.0-preview.5.24268.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5474ab5c50fc639e780e0322cd500b2e43ee9b0d</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.App.Ref" Version="9.0.0-preview.5.24270.27" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>e577ff3a06b552e287fdf652b1cbaf04de3ba6f3</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.App.Ref.Internal" Version="9.0.0-preview.5.24270.27" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>e577ff3a06b552e287fdf652b1cbaf04de3ba6f3</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.App.Runtime.win-x64" Version="9.0.0-preview.5.24270.27" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>e577ff3a06b552e287fdf652b1cbaf04de3ba6f3</Sha>
</Dependency>
<Dependency Name="VS.Redist.Common.AspNetCore.SharedFramework.x64.9.0" Version="9.0.0-preview.5.24270.27" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>e577ff3a06b552e287fdf652b1cbaf04de3ba6f3</Sha>
</Dependency>
<Dependency Name="dotnet-dev-certs" Version="9.0.0-preview.5.24270.27" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>e577ff3a06b552e287fdf652b1cbaf04de3ba6f3</Sha>
</Dependency>
<Dependency Name="dotnet-user-jwts" Version="9.0.0-preview.5.24270.27" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>e577ff3a06b552e287fdf652b1cbaf04de3ba6f3</Sha>
</Dependency>
<Dependency Name="dotnet-user-secrets" Version="9.0.0-preview.5.24270.27" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/aspnetcore</Uri>
<Sha>e577ff3a06b552e287fdf652b1cbaf04de3ba6f3</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Common.ItemTemplates" Version="9.0.100-preview.5.24270.94">
<Uri>https://github.com/dotnet/sdk</Uri>
<Sha>ace21a69999eede779921900fca9420d37395aee</Sha>
</Dependency>
<Dependency Name="Microsoft.TemplateEngine.Cli" Version="9.0.100-preview.5.24270.94">
<Uri>https://github.com/dotnet/sdk</Uri>
<Sha>ace21a69999eede779921900fca9420d37395aee</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Sdk" Version="9.0.100-preview.5.24270.94">
<Uri>https://github.com/dotnet/sdk</Uri>
<Sha>ace21a69999eede779921900fca9420d37395aee</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.MSBuildSdkResolver" Version="9.0.100-preview.5.24270.94">
<Uri>https://github.com/dotnet/sdk</Uri>
<Sha>ace21a69999eede779921900fca9420d37395aee</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.2.1" Version="1.0.2-beta4.22406.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>0385265f4d0b6413d64aea0223172366a9b9858c</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.5.0" Version="1.1.0-rc.23558.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>307b8f538d83a955d8f6dd909eee41a5555f2f4d</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.6.0" Version="1.1.0-rc.24069.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>becc4bd157cd6608b51a5ffe414a5d2de6330272</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.7.0" Version="1.1.0-rc.24069.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>becc4bd157cd6608b51a5ffe414a5d2de6330272</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.8.0" Version="1.1.0-rc.24202.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>49c9ad01f057b3c6352bbec12b117acc2224493c</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.9.0" Version="1.1.0-rc.24270.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>f57e2c3eb78ac1033d410fde85509100b7512730</Sha>
</Dependency>
<!-- For coherency purposes, these versions should be gated by the versions of winforms and wpf routed via windowsdesktop -->
<Dependency Name="Microsoft.Dotnet.WinForms.ProjectTemplates" Version="9.0.0-preview.5.24268.1" CoherentParentDependency="Microsoft.WindowsDesktop.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/winforms</Uri>
<Sha>0aa3a4dfea1dad493ecbfe15cd513604468b3916</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Wpf.ProjectTemplates" Version="9.0.0-preview.5.24270.11" CoherentParentDependency="Microsoft.WindowsDesktop.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/wpf</Uri>
<Sha>d6b1f4560cb72806a9b55beae86ee5f769ec0960</Sha>
</Dependency>
<Dependency Name="Microsoft.FSharp.Compiler" Version="12.8.400-beta.24270.4" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/fsharp</Uri>
<Sha>7d176e9b00021c50338c69d93ba8d326c65db1f1</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Test.Sdk" Version="17.11.0-preview-24265-01" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/microsoft/vstest</Uri>
<Sha>2588f022c1c4a12e159e0ed07f5a5ea3f3c9eaa8</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="9.0.0-preview.5.24268.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5474ab5c50fc639e780e0322cd500b2e43ee9b0d</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.11.0-2.24270.11" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>8d7a17f545de7fe5e37dc0e754bab0fbee1e4713</Sha>
</Dependency>
<Dependency Name="Microsoft.Build" Version="17.11.0-preview-24270-02" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/msbuild</Uri>
<Sha>66e0371a64e08160e63000fc2ced8cb8bbc6739e</Sha>
</Dependency>
<Dependency Name="NuGet.Build.Tasks" Version="6.11.0-preview.2.55" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/nuget/nuget.client</Uri>
<Sha>f702fc3dc44e17a0666dea01e9aa18c5c1175b27</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport" Version="9.0.0-preview.5.24264.2" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>53c4a109e2abc0112996e2bc4a7f830f572f4efd</Sha>
</Dependency>
<Dependency Name="Microsoft.Deployment.DotNet.Releases" Version="2.0.0-preview.1.24176.3" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/deployment-tools</Uri>
<Sha>6b80783f6743ee9f18940eb6acb7135e5c111d4b</Sha>
</Dependency>
<Dependency Name="System.CommandLine" Version="2.0.0-beta4.24209.3" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/command-line-api</Uri>
<Sha>963d34b1fb712c673bfb198133d7e988182c9ef4</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24270.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1cf3eaa1f6ada43ab988145a3f3efddb1ffa3b10</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CMake.Sdk" Version="9.0.0-beta.24270.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1cf3eaa1f6ada43ab988145a3f3efddb1ffa3b10</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="9.0.0-beta.24270.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1cf3eaa1f6ada43ab988145a3f3efddb1ffa3b10</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Darc" Version="1.1.0-beta.24256.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/arcade-services</Uri>
<Sha>1d98f4c0a5b25b72465fe075dd5f24b45ef15c8e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.DarcLib" Version="1.1.0-beta.24256.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/arcade-services</Uri>
<Sha>1d98f4c0a5b25b72465fe075dd5f24b45ef15c8e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24270.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1cf3eaa1f6ada43ab988145a3f3efddb1ffa3b10</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="9.0.0-alpha.1.23612.13">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>ab1a8224cdf115b65e0db5dc88d11f205068f444</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.ScenarioTests.SdkTemplateTests" Version="9.0.0-preview.24257.1" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/scenario-tests</Uri>
<Sha>259edc6efe049ed49f9e37890be702a886ba5ed8</Sha>
</Dependency>
<!-- Aspire isn't really a toolset dependency. However, it only inserts a baseline manifest in installer,
and if you squint at it, this means we can say that its specific dependency versions don't matter to installer.
Avoiding this as a product dependency avoids a long coherency path (aspnetcore->extensions->aspire->installer).
**It is** of course possible that an incoherent aspire means that aspire depends on versions of extensions that
aren't shipping, or those extensions packages depend on aspnetcore packages that won't ship. However, given the cost
of maintaining this coherency path is high. This being toolset means that aspire is responsible for its own coherency.
-->
<Dependency Name="Microsoft.NET.Sdk.Aspire.Manifest-9.0.100-preview.1" Version="9.0.0-preview.4.24229.9" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/aspire</Uri>
<Sha>0514ea9e12ece4dd764824ce925ae0eae6fcbd86</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>

234
eng/Versions.props Normal file
View file

@ -0,0 +1,234 @@
<Project>
<PropertyGroup>
<VersionMajor>9</VersionMajor>
<VersionMinor>0</VersionMinor>
<VersionSDKMinor>1</VersionSDKMinor>
<VersionFeature>00</VersionFeature>
<!-- This property powers the SdkAnalysisLevel property in end-user MSBuild code.
It should always be the hundreds-value of the current SDK version, never any
preview version components or anything else. E.g. 8.0.100, 9.0.300, etc. -->
<SdkFeatureBand>$(VersionMajor).$(VersionMinor).$(VersionSDKMinor)00</SdkFeatureBand>
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature)</VersionPrefix>
<MajorMinorVersion>$(VersionMajor).$(VersionMinor)</MajorMinorVersion>
<CliProductBandVersion>$(MajorMinorVersion).$(VersionSDKMinor)</CliProductBandVersion>
<!-- Enable to remove prerelease label. -->
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
<!-- Calculate prerelease label -->
<PreReleaseVersionLabel Condition="'$(StabilizePackageVersion)' != 'true'">preview</PreReleaseVersionLabel>
<PreReleaseVersionLabel Condition="'$(StabilizePackageVersion)' == 'true' and '$(VersionFeature)' == '00'">rtm</PreReleaseVersionLabel>
<PreReleaseVersionLabel Condition="'$(StabilizePackageVersion)' == 'true' and '$(VersionFeature)' != '00'">servicing</PreReleaseVersionLabel>
<PreReleaseVersionIteration Condition="'$(StabilizePackageVersion)' != 'true'">5</PreReleaseVersionIteration>
</PropertyGroup>
<PropertyGroup>
<VersionFeature21>30</VersionFeature21>
<VersionFeature31>32</VersionFeature31>
<VersionFeature50>17</VersionFeature50>
<VersionFeature60>30</VersionFeature60>
<VersionFeature70>19</VersionFeature70>
<VersionFeature80>5</VersionFeature80>
<!-- Should be kept in sync with VersionFeature70. It should match the version of Microsoft.NET.ILLink.Tasks
referenced by the same 7.0 SDK that references the 7.0.VersionFeature70 runtime pack. -->
<_NET70ILLinkPackVersion>7.0.100-1.23401.1</_NET70ILLinkPackVersion>
</PropertyGroup>
<!-- Restore feeds -->
<PropertyGroup Label="Restore feeds">
<!-- In an orchestrated build, this may be overridden to other Azure feeds. -->
<DotNetAssetRootUrl Condition="'$(DotNetAssetRootUrl)'==''">https://dotnetbuilds.blob.core.windows.net/public/</DotNetAssetRootUrl>
<DotNetPrivateAssetRootUrl Condition="'$(DotNetPrivateAssetRootUrl)'==''">https://dotnetclimsrc.blob.core.windows.net/dotnet/</DotNetPrivateAssetRootUrl>
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersPackageVersion>9.0.0-beta.24270.3</MicrosoftDotNetBuildTasksInstallersPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/arcade-services -->
<MicrosoftDotNetDarcLibVersion>1.1.0-beta.24256.1</MicrosoftDotNetDarcLibVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/winforms -->
<MicrosoftDotnetWinFormsProjectTemplatesPackageVersion>9.0.0-preview.5.24268.1</MicrosoftDotnetWinFormsProjectTemplatesPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/wpf -->
<MicrosoftDotNetWpfProjectTemplatesPackageVersion>9.0.0-preview.5.24270.11</MicrosoftDotNetWpfProjectTemplatesPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/test-templates -->
<!-- Supported versions -->
<MicrosoftDotNetTestProjectTemplates60PackageVersion>1.1.0-rc.24069.1</MicrosoftDotNetTestProjectTemplates60PackageVersion>
<MicrosoftDotNetTestProjectTemplates80PackageVersion>1.1.0-rc.24202.1</MicrosoftDotNetTestProjectTemplates80PackageVersion>
<MicrosoftDotNetTestProjectTemplates90PackageVersion>1.1.0-rc.24270.2</MicrosoftDotNetTestProjectTemplates90PackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- NUnit3.DotNetNew.Template versions do not 'flow in' -->
<NUnit3DotNetNewTemplatePackageVersion>1.8.1</NUnit3DotNetNewTemplatePackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/aspnet/AspNetCore -->
<MicrosoftAspNetCoreAppRefPackageVersion>9.0.0-preview.5.24270.27</MicrosoftAspNetCoreAppRefPackageVersion>
<MicrosoftAspNetCoreAppRefInternalPackageVersion>9.0.0-preview.5.24270.27</MicrosoftAspNetCoreAppRefInternalPackageVersion>
<MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>9.0.0-preview.5.24270.27</MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>
<VSRedistCommonAspNetCoreSharedFrameworkx6490PackageVersion>9.0.0-preview.5.24270.27</VSRedistCommonAspNetCoreSharedFrameworkx6490PackageVersion>
<dotnetdevcertsPackageVersion>9.0.0-preview.5.24270.27</dotnetdevcertsPackageVersion>
<dotnetuserjwtsPackageVersion>9.0.0-preview.5.24270.27</dotnetuserjwtsPackageVersion>
<dotnetusersecretsPackageVersion>9.0.0-preview.5.24270.27</dotnetusersecretsPackageVersion>
</PropertyGroup>
<PropertyGroup>
<MicroBuildCorePackageVersion>0.2.0</MicroBuildCorePackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/sdk -->
<MicrosoftDotNetCommonItemTemplatesPackageVersion>9.0.100-preview.5.24270.94</MicrosoftDotNetCommonItemTemplatesPackageVersion>
<MicrosoftNETSdkPackageVersion>9.0.100-preview.5.24270.94</MicrosoftNETSdkPackageVersion>
<MicrosoftDotNetMSBuildSdkResolverPackageVersion>9.0.100-preview.5.24270.94</MicrosoftDotNetMSBuildSdkResolverPackageVersion>
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
<MicrosoftDotnetToolsetInternalPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftDotnetToolsetInternalPackageVersion>
<MicrosoftDotnetTemplateLocatorPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftDotnetTemplateLocatorPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/roslyn -->
<MicrosoftNetCompilersToolsetPackageVersion>4.11.0-2.24270.11</MicrosoftNetCompilersToolsetPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/corefx -->
<MicrosoftNETCorePlatformsPackageVersion>9.0.0-preview.5.24268.2</MicrosoftNETCorePlatformsPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/core-setup -->
<VSRedistCommonNetCoreSharedFrameworkx6490PackageVersion>9.0.0-preview.5.24268.2</VSRedistCommonNetCoreSharedFrameworkx6490PackageVersion>
<VSRedistCommonNetCoreTargetingPackx6490PackageVersion>9.0.0-preview.5.24268.2</VSRedistCommonNetCoreTargetingPackx6490PackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>9.0.0-preview.5.24268.2</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
<MicrosoftNETCoreAppHostwinx64PackageVersion>9.0.0-preview.5.24268.2</MicrosoftNETCoreAppHostwinx64PackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>9.0.0-preview.5.24268.2</MicrosoftNETCoreAppRefPackageVersion>
<NETStandardLibraryRefPackageVersion>2.1.0</NETStandardLibraryRefPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/windowsdesktop -->
<MicrosoftWindowsDesktopAppRefPackageVersion>9.0.0-preview.5.24270.18</MicrosoftWindowsDesktopAppRefPackageVersion>
<VSRedistCommonWindowsDesktopSharedFrameworkx6490PackageVersion>9.0.0-preview.5.24270.18</VSRedistCommonWindowsDesktopSharedFrameworkx6490PackageVersion>
<VSRedistCommonWindowsDesktopTargetingPackx6490PackageVersion>9.0.0-preview.5.24270.18</VSRedistCommonWindowsDesktopTargetingPackx6490PackageVersion>
<MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion>9.0.0-preview.5.24270.18</MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Runtime and Apphost pack versions are the same for all RIDs. We flow the x64 version above and create aliases without the winx64 here for clarity elsewhere. -->
<MicrosoftNETCoreAppHostPackageVersion>$(MicrosoftNETCoreAppHostwinx64PackageVersion)</MicrosoftNETCoreAppHostPackageVersion>
<MicrosoftNETCoreAppRuntimePackageVersion>$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</MicrosoftNETCoreAppRuntimePackageVersion>
<MicrosoftAspNetCoreAppRuntimePackageVersion>$(MicrosoftAspNetCoreAppRuntimewinx64PackageVersion)</MicrosoftAspNetCoreAppRuntimePackageVersion>
<MicrosoftWindowsDesktopAppRuntimePackageVersion>$(MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion)</MicrosoftWindowsDesktopAppRuntimePackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/NuGet/NuGet.Client -->
<NuGetBuildTasksPackageVersion>6.11.0-preview.2.55</NuGetBuildTasksPackageVersion>
</PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/deployment-tools -->
<PropertyGroup>
<MicrosoftDeploymentDotNetReleasesVersion>2.0.0-preview.1.24176.3</MicrosoftDeploymentDotNetReleasesVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Automated versions for asp.net templates -->
<!-- Grab just the patch version from MicrosoftNETSdkPackageVersion (7.0.103-servicing becomes 03) -->
<MicrosoftNETSdkFeatureAndPatchVersion>$(MicrosoftNETSdkPackageVersion.Split('.')[2])</MicrosoftNETSdkFeatureAndPatchVersion>
<MicrosoftNETSdkFeatureAndPatchVersion>$(MicrosoftNETSdkFeatureAndPatchVersion.Split('-')[0])</MicrosoftNETSdkFeatureAndPatchVersion>
<MicrosoftNETSdkPatchVersion>$(MicrosoftNETSdkFeatureAndPatchVersion.Substring(1))</MicrosoftNETSdkPatchVersion>
<!--
Between branding and shipping, the templates should stay at last month's version.
If the incoming SDK version is 2 versions behind us, we know we just branded but haven't done the internal -> public merge yet.
Therefore we stay at last month's version.
We also need to special case the 1st patch release, because the incoming SDK version will never be 2 versions behind us in that case.
Instead the indicator is that the incoming SDK version is not RTM or greater yet.
Preview releases already use -1 versionining so don't subtract one for that version.
In public builds, we always use the 2 month old version.
-->
<SubtractOneFromTemplateVersions Condition="'$(SYSTEM_TEAMPROJECT)' != 'internal'">true</SubtractOneFromTemplateVersions>
<SubtractOneFromTemplateVersions Condition="$([MSBuild]::Subtract($(VersionFeature), $(MicrosoftNETSdkPatchVersion))) &gt;= 2">true</SubtractOneFromTemplateVersions>
<SubtractOneFromTemplateVersions Condition="$(VersionFeature) &gt;= 1 AND ! $(MicrosoftNETSdkPackageVersion.Contains('rtm')) AND ! $(MicrosoftNETSdkPackageVersion.Contains('servicing'))">true</SubtractOneFromTemplateVersions>
<AspNetCoreTemplateFeature60>$([MSBuild]::Subtract($(VersionFeature60), 1))</AspNetCoreTemplateFeature60>
<AspNetCoreTemplateFeature80>$([MSBuild]::Subtract($(VersionFeature80), 1))</AspNetCoreTemplateFeature80>
<AspNetCoreTemplateFeature60 Condition="$(MicrosoftNETSdkPackageVersion.Contains('preview'))">$(VersionFeature60)</AspNetCoreTemplateFeature60>
<AspNetCoreTemplateFeature80 Condition="$(MicrosoftNETSdkPackageVersion.Contains('preview'))">$(VersionFeature80)</AspNetCoreTemplateFeature80>
<AspNetCoreTemplateFeature60 Condition="'$(SubtractOneFromTemplateVersions)' == 'true'">$([MSBuild]::Subtract($(AspNetCoreTemplateFeature60), 1))</AspNetCoreTemplateFeature60>
<AspNetCoreTemplateFeature80 Condition="'$(SubtractOneFromTemplateVersions)' == 'true'">$([MSBuild]::Subtract($(AspNetCoreTemplateFeature80), 1))</AspNetCoreTemplateFeature80>
<AspNetCoreTemplateFeature80 Condition="'$(VersionFeature80)' == '0'">$(VersionFeature80)</AspNetCoreTemplateFeature80>
</PropertyGroup>
<PropertyGroup>
<!-- Cross-release dependency versions -->
<MicrosoftAspNetCoreAppRuntime60PackageVersion>6.0.14</MicrosoftAspNetCoreAppRuntime60PackageVersion>
<MicrosoftDotNetCommonItemTemplates60PackageVersion>6.0.302</MicrosoftDotNetCommonItemTemplates60PackageVersion>
<MicrosoftDotNetCommonItemTemplates80PackageVersion>8.0.100</MicrosoftDotNetCommonItemTemplates80PackageVersion>
<MicrosoftWinFormsProjectTemplates60PackageVersion>6.0.7-servicing.22322.3</MicrosoftWinFormsProjectTemplates60PackageVersion>
<MicrosoftWinFormsProjectTemplates80PackageVersion>8.0.0-rtm.23531.5</MicrosoftWinFormsProjectTemplates80PackageVersion>
<MicrosoftWPFProjectTemplates60PackageVersion>6.0.7-servicing.22322.2</MicrosoftWPFProjectTemplates60PackageVersion>
<MicrosoftWPFProjectTemplates80PackageVersion>8.0.0-rtm.23531.4</MicrosoftWPFProjectTemplates80PackageVersion>
</PropertyGroup>
<PropertyGroup>
<HostFxrVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</HostFxrVersion>
<SharedHostVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</SharedHostVersion>
</PropertyGroup>
<PropertyGroup>
<!-- This is the version of the zip archive for the WiX toolset and is different from the NuGet package version format. -->
<WixVersion>3.14.1.8722</WixVersion>
</PropertyGroup>
<PropertyGroup>
<!-- 9.0 Template versions -->
<AspNetCorePackageVersionFor90Templates>$(MicrosoftAspNetCoreAppRuntimePackageVersion)</AspNetCorePackageVersionFor90Templates>
<MicrosoftDotNetCommonItemTemplates90PackageVersion>$(MicrosoftDotNetCommonItemTemplatesPackageVersion)</MicrosoftDotNetCommonItemTemplates90PackageVersion>
<MicrosoftDotNetCommonProjectTemplates90PackageVersion>$(MicrosoftDotNetCommonItemTemplatesPackageVersion)</MicrosoftDotNetCommonProjectTemplates90PackageVersion>
<MicrosoftDotnetWinFormsProjectTemplates90PackageVersion>$(MicrosoftDotnetWinFormsProjectTemplatesPackageVersion)</MicrosoftDotnetWinFormsProjectTemplates90PackageVersion>
<MicrosoftDotNetWpfProjectTemplates90PackageVersion>$(MicrosoftDotNetWpfProjectTemplatesPackageVersion)</MicrosoftDotNetWpfProjectTemplates90PackageVersion>
<NUnit3Templates90PackageVersion>$(NUnit3DotNetNewTemplatePackageVersion)</NUnit3Templates90PackageVersion>
<!-- 8.0 Template versions -->
<AspNetCorePackageVersionFor80Templates>8.0.$(AspNetCoreTemplateFeature80)</AspNetCorePackageVersionFor80Templates>
<MicrosoftDotNetCommonProjectTemplates80PackageVersion>$(MicrosoftDotNetCommonItemTemplates80PackageVersion)</MicrosoftDotNetCommonProjectTemplates80PackageVersion>
<MicrosoftDotnetWinFormsProjectTemplates80PackageVersion>$(MicrosoftWinFormsProjectTemplates80PackageVersion)</MicrosoftDotnetWinFormsProjectTemplates80PackageVersion>
<MicrosoftDotNetWpfProjectTemplates80PackageVersion>$(MicrosoftWPFProjectTemplates80PackageVersion)</MicrosoftDotNetWpfProjectTemplates80PackageVersion>
<NUnit3Templates80PackageVersion>$(NUnit3DotNetNewTemplatePackageVersion)</NUnit3Templates80PackageVersion>
<!-- 6.0 Template versions -->
<AspNetCorePackageVersionFor60Templates>6.0.$(AspNetCoreTemplateFeature60)</AspNetCorePackageVersionFor60Templates>
<MicrosoftDotNetCommonItemTemplates60PackageVersion>$(MicrosoftDotNetCommonItemTemplates60PackageVersion)</MicrosoftDotNetCommonItemTemplates60PackageVersion>
<MicrosoftDotNetCommonProjectTemplates60PackageVersion>$(MicrosoftDotNetCommonItemTemplates60PackageVersion)</MicrosoftDotNetCommonProjectTemplates60PackageVersion>
<MicrosoftDotnetWinFormsProjectTemplates60PackageVersion>$(MicrosoftWinFormsProjectTemplates60PackageVersion)</MicrosoftDotnetWinFormsProjectTemplates60PackageVersion>
<MicrosoftDotNetWpfProjectTemplates60PackageVersion>$(MicrosoftWPFProjectTemplates60PackageVersion)</MicrosoftDotNetWpfProjectTemplates60PackageVersion>
<NUnit3Templates60PackageVersion>$(NUnit3DotNetNewTemplatePackageVersion)</NUnit3Templates60PackageVersion>
</PropertyGroup>
<!-- infrastructure and test only dependencies -->
<PropertyGroup>
<VersionToolsVersion>2.2.0-beta.19072.10</VersionToolsVersion>
<DotnetDebToolVersion>2.0.0</DotnetDebToolVersion>
<MicrosoftNETTestSdkVersion>17.11.0-preview-24265-01</MicrosoftNETTestSdkVersion>
<MicrosoftExtensionsLoggingConsoleVersion>9.0.0-alpha.1.24058.10</MicrosoftExtensionsLoggingConsoleVersion>
<MicrosoftDotNetScenarioTestsSdkTemplateTestsVersion>9.0.0-preview.24257.1</MicrosoftDotNetScenarioTestsSdkTemplateTestsVersion>
</PropertyGroup>
<!-- Workload manifest package versions -->
<PropertyGroup>
<AspireFeatureBand>9.0.100-preview.1</AspireFeatureBand>
<MicrosoftNETSdkAspireManifest90100preview1PackageVersion>9.0.0-preview.4.24229.9</MicrosoftNETSdkAspireManifest90100preview1PackageVersion>
<MauiFeatureBand>9.0.100-preview.1</MauiFeatureBand>
<MauiWorkloadManifestVersion>9.0.0-preview.1.9973</MauiWorkloadManifestVersion>
<XamarinAndroidWorkloadManifestVersion>34.99.0-preview.1.151</XamarinAndroidWorkloadManifestVersion>
<XamarinIOSWorkloadManifestVersion>17.2.9088-net9-p1</XamarinIOSWorkloadManifestVersion>
<XamarinMacCatalystWorkloadManifestVersion>17.2.9088-net9-p1</XamarinMacCatalystWorkloadManifestVersion>
<XamarinMacOSWorkloadManifestVersion>14.2.9088-net9-p1</XamarinMacOSWorkloadManifestVersion>
<XamarinTvOSWorkloadManifestVersion>17.2.9088-net9-p1</XamarinTvOSWorkloadManifestVersion>
<!-- Workloads from dotnet/emsdk -->
<MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportPackageVersion>9.0.0-preview.5.24264.2</MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportPackageVersion>
<EmscriptenWorkloadManifestVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportPackageVersion)</EmscriptenWorkloadManifestVersion>
<!-- emsdk workload prerelease version band must match the emsdk feature band -->
<EmscriptenWorkloadFeatureBand>9.0.100$([System.Text.RegularExpressions.Regex]::Match($(EmscriptenWorkloadManifestVersion), `-[A-z]*[\.]*\d*`))</EmscriptenWorkloadFeatureBand>
<!-- Workloads from dotnet/runtime use MicrosoftNETCoreAppRefPackageVersion because it has a stable name that does not include the full feature band -->
<MonoWorkloadManifestVersion>$(MicrosoftNETCoreAppRefPackageVersion)</MonoWorkloadManifestVersion>
<!-- mono workload prerelease version band must match the runtime feature band -->
<MonoWorkloadFeatureBand>9.0.100$([System.Text.RegularExpressions.Regex]::Match($(MonoWorkloadManifestVersion), `-[A-z]*[\.]*\d*`))</MonoWorkloadFeatureBand>
</PropertyGroup>
<!-- dependencies for VMR initialization -->
<PropertyGroup>
<!-- These two MicrosoftBuild versions are required to build VMR initialization tasks -->
<MicrosoftBuildFrameworkVersion>15.7.179</MicrosoftBuildFrameworkVersion>
<MicrosoftBuildUtilitiesCoreVersion>15.7.179</MicrosoftBuildUtilitiesCoreVersion>
</PropertyGroup>
<PropertyGroup>
<!-- pinned dependency. This package is not being produced outside of the 2.0 branch of corefx and should not change. -->
<CLI_NETStandardLibraryNETFrameworkVersion>2.0.1-servicing-26011-01</CLI_NETStandardLibraryNETFrameworkVersion>
</PropertyGroup>
<Import Project="$(RepositoryEngineeringDir)ManualVersions.props" />
</Project>

63
eng/_prettyprint.sh Normal file
View file

@ -0,0 +1,63 @@
#!/usr/bin/env bash
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
# Detect build servers
if [[ ! -z "$JENKINS_URL" || ! -z "$BUILD_BUILDID" || ! -z "$DOTNET_CORESDK_NOPRETTYPRINT" ]]; then
# Jenkins or VSO build, disable colors because they make things gross.
NO_COLOR=1
fi
if [ "$NO_COLOR" != "1" ]; then
# ANSI Colors
RCol='\e[0m' # Text Reset
# Regular Bold Underline High Intensity BoldHigh Intens Background High Intensity Backgrounds
Bla='\e[0;30m'; BBla='\e[1;30m'; UBla='\e[4;30m'; IBla='\e[0;90m'; BIBla='\e[1;90m'; On_Bla='\e[40m'; On_IBla='\e[0;100m';
Red='\e[0;31m'; BRed='\e[1;31m'; URed='\e[4;31m'; IRed='\e[0;91m'; BIRed='\e[1;91m'; On_Red='\e[41m'; On_IRed='\e[0;101m';
Gre='\e[0;32m'; BGre='\e[1;32m'; UGre='\e[4;32m'; IGre='\e[0;92m'; BIGre='\e[1;92m'; On_Gre='\e[42m'; On_IGre='\e[0;102m';
Yel='\e[0;33m'; BYel='\e[1;33m'; UYel='\e[4;33m'; IYel='\e[0;93m'; BIYel='\e[1;93m'; On_Yel='\e[43m'; On_IYel='\e[0;103m';
Blu='\e[0;34m'; BBlu='\e[1;34m'; UBlu='\e[4;34m'; IBlu='\e[0;94m'; BIBlu='\e[1;94m'; On_Blu='\e[44m'; On_IBlu='\e[0;104m';
Pur='\e[0;35m'; BPur='\e[1;35m'; UPur='\e[4;35m'; IPur='\e[0;95m'; BIPur='\e[1;95m'; On_Pur='\e[45m'; On_IPur='\e[0;105m';
Cya='\e[0;36m'; BCya='\e[1;36m'; UCya='\e[4;36m'; ICya='\e[0;96m'; BICya='\e[1;96m'; On_Cya='\e[46m'; On_ICya='\e[0;106m';
Whi='\e[0;37m'; BWhi='\e[1;37m'; UWhi='\e[4;37m'; IWhi='\e[0;97m'; BIWhi='\e[1;97m'; On_Whi='\e[47m'; On_IWhi='\e[0;107m';
fi
cecho()
{
local text=$1
printf "%b\n" "$text"
}
header()
{
local text=$1
cecho "${BGre}*** $text ***${RCol}"
}
info()
{
local text=$1
cecho "${Gre}info :${RCol} $text"
}
warning()
{
local text=$1
cecho "${Yel}warn :${RCol} $text" 1>&2
}
error()
{
local text=$1
cecho "${Red}error:${RCol} $text" 1>&2
}
die()
{
local text=$1
error "$text"
exit 1
}

261
eng/build-pr.yml Normal file
View file

@ -0,0 +1,261 @@
parameters:
# Agent OS identifier and used as job name
- name: agentOs
type: string
# Job name
- name: jobName
type: string
# Container to run the build in, if any
- name: container
type: string
default: ''
# Job timeout
- name: timeoutInMinutes
type: number
default: 180
# Build configuration (Debug, Release)
- name: buildConfiguration
type: string
values:
- Debug
- Release
# Build architecture
- name: buildArchitecture
type: string
values:
- arm
- arm64
- x64
- x86
# Linux portable. If true, passes portable switch to build
- name: linuxPortable
type: boolean
default: false
# Runtime Identifier
- name: runtimeIdentifier
type: string
default: ''
# UI lang
- name: dotnetCLIUILanguage
type: string
default: ''
# Additional parameters
- name: additionalBuildParameters
type: string
default: ''
# Run tests
- name: runTests
type: boolean
default: true
# PGO instrumentation jobs
- name: pgoInstrument
type: boolean
default: false
- name: isBuiltFromVmr
displayName: True when build is running from dotnet/dotnet
type: boolean
default: false
jobs:
- template: common/templates/job/job.yml
parameters:
# Set up the name of the job.
${{ if parameters.pgoInstrument }}:
name: PGO_${{ parameters.agentOs }}_${{ parameters.jobName }}
${{ if not(parameters.pgoInstrument) }}:
name: ${{ parameters.agentOs }}_${{ parameters.jobName }}
## Set up the pool/machine info to be used based on the Agent OS
${{ if eq(parameters.agentOs, 'Windows_NT') }}:
enableMicrobuild: true
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals windows.vs2022.amd64.open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2022.amd64
${{ if eq(parameters.agentOs, 'Linux') }}:
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals Build.Ubuntu.2204.Amd64
container: ${{ parameters.container }}
${{ if eq(parameters.agentOs, 'Darwin') }}:
pool:
vmImage: 'macOS-latest'
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
${{ if parameters.isBuiltFromVmr }}:
enableSbom: false
${{ else }}:
enablePublishBuildAssets: true
enablePublishUsingPipelines: true
enableTelemetry: true
helixRepo: dotnet/installer
workspace:
clean: all
# Test parameters
variables:
- ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
- _PackArg: '-pack'
- ${{ if parameters.runTests }}:
- _TestArg: '-test'
- ${{ else }}:
- _TestArg: ''
- ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
- _PackArg: '--pack'
- ${{ if parameters.runTests }}:
- _TestArg: '--test'
- ${{ else }}:
- _TestArg: ''
- ${{ if parameters.pgoInstrument }}:
- _PgoInstrument: '/p:PgoInstrument=true'
- _PackArg: ''
- ${{ else }}:
- _PgoInstrument: ''
- ${{ if parameters.linuxPortable }}:
- _LinuxPortable: '--linux-portable'
- ${{ else }}:
- _LinuxPortable: ''
- ${{ if ne(parameters.runtimeIdentifier, '') }}:
- _RuntimeIdentifier: '--runtime-id ${{ parameters.runtimeIdentifier }}'
- ${{ else }}:
- _RuntimeIdentifier: ''
- _AgentOSName: ${{ parameters.agentOs }}
- _TeamName: Roslyn-Project-System
- _SignType: test
- _BuildArgs: '/p:DotNetSignType=$(_SignType) $(_PgoInstrument)'
- ${{ if parameters.isBuiltFromVmr }}:
- installerRoot: '$(Build.SourcesDirectory)/src/installer'
- _SignType: test
- _PushToVSFeed: false
- _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
/p:TeamName=$(_TeamName)
/p:DotNetPublishUsingPipelines=true
/p:PublishToSymbolServer=false
$(_PgoInstrument)
- ${{ else }}:
- installerRoot: '$(Build.SourcesDirectory)'
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: DotNet-HelixApi-Access
- _PushToVSFeed: true
- _SignType: real
- _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
/p:DotNetSignType=$(_SignType)
/p:TeamName=$(_TeamName)
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
$(_PgoInstrument)
- template: /eng/common/templates/variables/pool-providers.yml
steps:
- checkout: self
clean: true
- ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
- ${{ if and(not(parameters.isBuiltFromVmr), ne(variables['System.TeamProject'], 'public')) }}:
- task: PowerShell@2
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(installerRoot)/eng/common/SetupNugetSources.ps1
arguments: -ConfigFile $(installerRoot)/NuGet.config -Password $Env:Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- script: $(installerRoot)/build.cmd
$(_TestArg) $(_PackArg)
-publish -ci -sign
-Configuration ${{ parameters.buildConfiguration }}
-Architecture ${{ parameters.buildArchitecture }}
$(_BuildArgs)
${{ parameters.additionalBuildParameters }}
$(_InternalRuntimeDownloadArgs)
displayName: Build
env:
DOTNET_CLI_UI_LANGUAGE: ${{ parameters.dotnetCLIUILanguage }}
- ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
- ${{ if and(not(parameters.isBuiltFromVmr), ne(variables['System.TeamProject'], 'public')) }}:
- task: Bash@3
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(installerRoot)/eng/common/SetupNugetSources.sh
arguments: $(installerRoot)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- ${{ if eq(parameters.agentOs, 'Linux') }}:
- script: $(installerRoot)/build.sh
$(_TestArg) $(_PackArg)
--publish --ci
--noprettyprint
--configuration ${{ parameters.buildConfiguration }}
--architecture ${{ parameters.buildArchitecture }}
$(_LinuxPortable)
$(_RuntimeIdentifier)
$(_BuildArgs)
${{ parameters.additionalBuildParameters }}
$(_InternalRuntimeDownloadArgs)
displayName: Build
- ${{ if or(eq(parameters.agentOs, 'Darwin'), eq(parameters.agentOs, 'FreeBSD')) }}:
- script: $(installerRoot)/build.sh
$(_TestArg)
--pack --publish --ci
--noprettyprint
--configuration ${{ parameters.buildConfiguration }}
--architecture ${{ parameters.buildArchitecture }}
$(_RuntimeIdentifier)
$(_BuildArgs)
${{ parameters.additionalBuildParameters }}
$(_InternalRuntimeDownloadArgs)
displayName: Build
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testRunner: XUnit
testResultsFiles: 'artifacts/TestResults/${{ parameters.buildConfiguration }}/*.xml'
testRunTitle: '$(_AgentOSName)_$(Agent.JobName)'
platform: '$(BuildPlatform)'
configuration: '${{ parameters.buildConfiguration }}'
condition: ne(variables['_TestArg'], '')
- task: CopyFiles@2
displayName: Gather Logs
inputs:
SourceFolder: '$(installerRoot)/artifacts'
Contents: |
log/${{ parameters.buildConfiguration }}/**/*
TestResults/${{ parameters.buildConfiguration }}/**/*
TargetFolder: '$(Build.ArtifactStagingDirectory)'
continueOnError: true
condition: always()
- task: PublishBuildArtifacts@1
displayName: Publish Logs to VSTS
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)'
publishLocation: Container
continueOnError: true
condition: always()

267
eng/build.yml Normal file
View file

@ -0,0 +1,267 @@
parameters:
# Agent OS identifier and used as job name
- name: agentOs
type: string
# Job name
- name: jobName
type: string
# Container to run the build in, if any
- name: container
type: string
default: ''
# Job timeout
- name: timeoutInMinutes
type: number
default: 180
# Build configuration (Debug, Release)
- name: buildConfiguration
type: string
values:
- Debug
- Release
# Build architecture
- name: buildArchitecture
type: string
values:
- arm
- arm64
- x64
- x86
# Linux portable. If true, passes portable switch to build
- name: linuxPortable
type: boolean
default: false
# Runtime Identifier
- name: runtimeIdentifier
type: string
default: ''
# UI lang
- name: dotnetCLIUILanguage
type: string
default: ''
# Additional parameters
- name: additionalBuildParameters
type: string
default: ''
# Run tests
- name: runTests
type: boolean
default: true
# PGO instrumentation jobs
- name: pgoInstrument
type: boolean
default: false
- name: isBuiltFromVmr
displayName: True when build is running from dotnet/dotnet
type: boolean
default: false
jobs:
- template: common/templates-official/job/job.yml
parameters:
# Set up the name of the job.
${{ if parameters.pgoInstrument }}:
name: PGO_${{ parameters.agentOs }}_${{ parameters.jobName }}
${{ if not(parameters.pgoInstrument) }}:
name: ${{ parameters.agentOs }}_${{ parameters.jobName }}
# Set up the pool/machine info to be used based on the Agent OS
${{ if eq(parameters.agentOs, 'Windows_NT') }}:
enableMicrobuild: true
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: $(DncEngPublicBuildPool)
image: 1es-windows-2022-open
os: windows
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
${{ if eq(parameters.agentOs, 'Linux') }}:
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: $(DncEngPublicBuildPool)
image: 1es-ubuntu-2004-open
os: linux
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $(DncEngInternalBuildPool)
image: 1es-ubuntu-2204
os: linux
container: ${{ parameters.container }}
${{ if eq(parameters.agentOs, 'Darwin') }}:
pool:
name: Azure Pipelines
image: macOS-latest
os: macOS
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
${{ if parameters.isBuiltFromVmr }}:
enableSbom: false
${{ else }}:
enablePublishBuildAssets: true
enablePublishUsingPipelines: true
enableTelemetry: true
helixRepo: dotnet/installer
workspace:
clean: all
variables:
# Test variables
- ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
- _PackArg: '-pack'
- ${{ if parameters.runTests }}:
- _TestArg: '-test'
- ${{ else }}:
- _TestArg: ''
- ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
- _PackArg: '--pack'
- ${{ if parameters.runTests }}:
- _TestArg: '--test'
- ${{ else }}:
- _TestArg: ''
- ${{ if parameters.pgoInstrument }}:
- _PgoInstrument: '/p:PgoInstrument=true'
- _PackArg: ''
- ${{ else }}:
- _PgoInstrument: ''
- ${{ if parameters.linuxPortable }}:
- _LinuxPortable: '--linux-portable'
- ${{ else }}:
- _LinuxPortable: ''
- ${{ if ne(parameters.runtimeIdentifier, '') }}:
- _RuntimeIdentifier: '--runtime-id ${{ parameters.runtimeIdentifier }}'
- ${{ else }}:
- _RuntimeIdentifier: ''
- _AgentOSName: ${{ parameters.agentOs }}
- _TeamName: Roslyn-Project-System
- _SignType: test
- _BuildArgs: '/p:DotNetSignType=$(_SignType) $(_PgoInstrument)'
- ${{ if parameters.isBuiltFromVmr }}:
- installerRoot: '$(Build.SourcesDirectory)/src/installer'
- _SignType: test
- _PushToVSFeed: false
- _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
/p:TeamName=$(_TeamName)
/p:DotNetPublishUsingPipelines=true
/p:PublishToSymbolServer=false
$(_PgoInstrument)
- ${{ else }}:
- installerRoot: '$(Build.SourcesDirectory)'
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: DotNet-HelixApi-Access
- _PushToVSFeed: true
- _SignType: real
- _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
/p:DotNetSignType=$(_SignType)
/p:TeamName=$(_TeamName)
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
$(_PgoInstrument)
- template: /eng/common/templates-official/variables/pool-providers.yml
steps:
- checkout: self
clean: true
- ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
- ${{ if and(not(parameters.isBuiltFromVmr), ne(variables['System.TeamProject'], 'public')) }}:
- task: PowerShell@2
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(installerRoot)/eng/common/SetupNugetSources.ps1
arguments: -ConfigFile $(installerRoot)/NuGet.config -Password $Env:Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- script: $(installerRoot)/build.cmd
$(_TestArg) $(_PackArg)
-publish -ci -sign
-Configuration ${{ parameters.buildConfiguration }}
-Architecture ${{ parameters.buildArchitecture }}
$(_BuildArgs)
${{ parameters.additionalBuildParameters }}
$(_InternalRuntimeDownloadArgs)
displayName: Build
env:
DOTNET_CLI_UI_LANGUAGE: ${{ parameters.dotnetCLIUILanguage }}
- ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
- ${{ if and(not(parameters.isBuiltFromVmr), ne(variables['System.TeamProject'], 'public')) }}:
- task: Bash@3
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(installerRoot)/eng/common/SetupNugetSources.sh
arguments: $(installerRoot)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- ${{ if eq(parameters.agentOs, 'Linux') }}:
- script: $(installerRoot)/build.sh
$(_TestArg) $(_PackArg)
--publish --ci
--noprettyprint
--configuration ${{ parameters.buildConfiguration }}
--architecture ${{ parameters.buildArchitecture }}
$(_LinuxPortable)
$(_RuntimeIdentifier)
$(_BuildArgs)
${{ parameters.additionalBuildParameters }}
$(_InternalRuntimeDownloadArgs)
displayName: Build
- ${{ if or(eq(parameters.agentOs, 'Darwin'), eq(parameters.agentOs, 'FreeBSD')) }}:
- script: $(installerRoot)/build.sh
$(_TestArg)
--pack --publish --ci
--noprettyprint
--configuration ${{ parameters.buildConfiguration }}
--architecture ${{ parameters.buildArchitecture }}
$(_RuntimeIdentifier)
$(_BuildArgs)
${{ parameters.additionalBuildParameters }}
$(_InternalRuntimeDownloadArgs)
displayName: Build
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testRunner: XUnit
testResultsFiles: 'artifacts/TestResults/${{ parameters.buildConfiguration }}/*.xml'
testRunTitle: '$(_AgentOSName)_$(Agent.JobName)'
platform: '$(BuildPlatform)'
configuration: '${{ parameters.buildConfiguration }}'
condition: ne(variables['_TestArg'], '')
- task: CopyFiles@2
displayName: Gather Logs
inputs:
SourceFolder: '$(installerRoot)/artifacts'
Contents: |
log/${{ parameters.buildConfiguration }}/**/*
TestResults/${{ parameters.buildConfiguration }}/**/*
TargetFolder: '$(Build.ArtifactStagingDirectory)'
continueOnError: true
condition: always()
- task: 1ES.PublishBuildArtifacts@1
displayName: Publish Logs to VSTS
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)'
publishLocation: Container
continueOnError: true
condition: always()

View file

@ -0,0 +1,4 @@
{
"RetryCountLimit": 1,
"RetryByAnyError": false
}

2
eng/common/CIBuild.cmd Normal file
View file

@ -0,0 +1,2 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"

View file

@ -0,0 +1,11 @@
@{
IncludeRules=@('PSAvoidUsingCmdletAliases',
'PSAvoidUsingWMICmdlet',
'PSAvoidUsingPositionalParameters',
'PSAvoidUsingInvokeExpression',
'PSUseDeclaredVarsMoreThanAssignments',
'PSUseCmdletCorrectly',
'PSStandardDSCFunctionsInResource',
'PSUseIdenticalMandatoryParametersForDSC',
'PSUseIdenticalParametersForDSC')
}

28
eng/common/README.md Normal file
View file

@ -0,0 +1,28 @@
# Don't touch this folder
uuuuuuuuuuuuuuuuuuuu
u" uuuuuuuuuuuuuuuuuu "u
u" u$$$$$$$$$$$$$$$$$$$$u "u
u" u$$$$$$$$$$$$$$$$$$$$$$$$u "u
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
$ $$$" ... "$... ...$" ... "$$$ ... "$$$ $
$ $$$u `"$$$$$$$ $$$ $$$$$ $$ $$$ $$$ $
$ $$$$$$uu "$$$$ $$$ $$$$$ $$ """ u$$$ $
$ $$$""$$$ $$$$ $$$u "$$$" u$$ $$$$$$$$ $
$ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $
$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
"u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u"
"u "$$$$$$$$$$$$$$$$$$$$$$$$" u"
"u "$$$$$$$$$$$$$$$$$$$$" u"
"u """""""""""""""""" u"
""""""""""""""""""""
!!! Changes made in this directory are subject to being overwritten by automation !!!
The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first.

View file

@ -0,0 +1,167 @@
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
#
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
# under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
#
# This script needs to be called in every job that will restore packages and which the base repo has
# private AzDO feeds in the NuGet.config.
#
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
#
# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing
#
# - task: PowerShell@2
# displayName: Setup Private Feeds Credentials
# condition: eq(variables['Agent.OS'], 'Windows_NT')
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)][string]$ConfigFile,
[Parameter(Mandatory = $true)][string]$Password
)
$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
. $PSScriptRoot\tools.ps1
# Add source entry to PackageSources
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")
if ($packageSource -eq $null)
{
$packageSource = $doc.CreateElement("add")
$packageSource.SetAttribute("key", $SourceName)
$packageSource.SetAttribute("value", $SourceEndPoint)
$sources.AppendChild($packageSource) | Out-Null
}
else {
Write-Host "Package source $SourceName already present."
}
AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd
}
# Add a credential node for the specified source
function AddCredential($creds, $source, $username, $pwd) {
# Looks for credential configuration for the given SourceName. Create it if none is found.
$sourceElement = $creds.SelectSingleNode($Source)
if ($sourceElement -eq $null)
{
$sourceElement = $doc.CreateElement($Source)
$creds.AppendChild($sourceElement) | Out-Null
}
# Add the <Username> node to the credential if none is found.
$usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']")
if ($usernameElement -eq $null)
{
$usernameElement = $doc.CreateElement("add")
$usernameElement.SetAttribute("key", "Username")
$sourceElement.AppendChild($usernameElement) | Out-Null
}
$usernameElement.SetAttribute("value", $Username)
# Add the <ClearTextPassword> to the credential if none is found.
# Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs.
# -> https://github.com/NuGet/Home/issues/5526
$passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']")
if ($passwordElement -eq $null)
{
$passwordElement = $doc.CreateElement("add")
$passwordElement.SetAttribute("key", "ClearTextPassword")
$sourceElement.AppendChild($passwordElement) | Out-Null
}
$passwordElement.SetAttribute("value", $pwd)
}
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) {
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
ForEach ($PackageSource in $maestroPrivateSources) {
Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -pwd $pwd
}
}
function EnablePrivatePackageSources($DisabledPackageSources) {
$maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
ForEach ($DisabledPackageSource in $maestroPrivateSources) {
Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource"
# Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries
$DisabledPackageSources.RemoveChild($DisabledPackageSource)
}
}
if (!(Test-Path $ConfigFile -PathType Leaf)) {
Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
ExitWithExitCode 1
}
if (!$Password) {
Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
ExitWithExitCode 1
}
# Load NuGet.config
$doc = New-Object System.Xml.XmlDocument
$filename = (Get-Item $ConfigFile).FullName
$doc.Load($filename)
# Get reference to <PackageSources> or create one if none exist already
$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
if ($sources -eq $null) {
$sources = $doc.CreateElement("packageSources")
$doc.DocumentElement.AppendChild($sources) | Out-Null
}
# Looks for a <PackageSourceCredentials> node. Create it if none is found.
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
if ($creds -eq $null) {
$creds = $doc.CreateElement("packageSourceCredentials")
$doc.DocumentElement.AppendChild($creds) | Out-Null
}
# Check for disabledPackageSources; we'll enable any darc-int ones we find there
$disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources")
if ($disabledSources -ne $null) {
Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node"
EnablePrivatePackageSources -DisabledPackageSources $disabledSources
}
$userName = "dn-bot"
# Insert credential nodes for Maestro's private feeds
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password
# 3.1 uses a different feed url format so it's handled differently here
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
if ($dotnet31Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
}
$dotnetVersions = @('5','6','7','8')
foreach ($dotnetVersion in $dotnetVersions) {
$feedPrefix = "dotnet" + $dotnetVersion;
$dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']")
if ($dotnetSource -ne $null) {
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
}
}
$doc.Save($filename)

View file

@ -0,0 +1,171 @@
#!/usr/bin/env bash
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
#
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
# under <packageSourceCredentials> for each Maestro's managed private feed. Two additional credential
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
#
# This script needs to be called in every job that will restore packages and which the base repo has
# private AzDO feeds in the NuGet.config.
#
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
#
# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing.
#
# - task: Bash@3
# displayName: Setup Private Feeds Credentials
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
# arguments: $(Build.SourcesDirectory)/NuGet.config $Token
# condition: ne(variables['Agent.OS'], 'Windows_NT')
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
ConfigFile=$1
CredToken=$2
NL='\n'
TB=' '
source="${BASH_SOURCE[0]}"
# resolve $source until the file is no longer a symlink
while [[ -h "$source" ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"
# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
. "$scriptroot/tools.sh"
if [ ! -f "$ConfigFile" ]; then
Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
ExitWithExitCode 1
fi
if [ -z "$CredToken" ]; then
Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT"
ExitWithExitCode 1
fi
if [[ `uname -s` == "Darwin" ]]; then
NL=$'\\\n'
TB=''
fi
# Ensure there is a <packageSources>...</packageSources> section.
grep -i "<packageSources>" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding <packageSources>...</packageSources> section."
ConfigNodeHeader="<configuration>"
PackageSourcesTemplate="${TB}<packageSources>${NL}${TB}</packageSources>"
sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" $ConfigFile
fi
# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
grep -i "<packageSourceCredentials>" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceCredentialsTemplate="${TB}<packageSourceCredentials>${NL}${TB}</packageSourceCredentials>"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" $ConfigFile
fi
PackageSources=()
# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present
grep -i "<add key=\"dotnet3.1\"" $ConfigFile
if [ "$?" == "0" ]; then
grep -i "<add key=\"dotnet3.1-internal\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3.1-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2\" />"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet3.1-internal')
grep -i "<add key=\"dotnet3.1-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3.1-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2\" />"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet3.1-internal-transport')
fi
DotNetVersions=('5' '6' '7' '8')
for DotNetVersion in ${DotNetVersions[@]} ; do
FeedPrefix="dotnet${DotNetVersion}";
grep -i "<add key=\"$FeedPrefix\"" $ConfigFile
if [ "$?" == "0" ]; then
grep -i "<add key=\"$FeedPrefix-internal\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding $FeedPrefix-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"$FeedPrefix-internal\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/$FeedPrefix-internal/nuget/v2\" />"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=("$FeedPrefix-internal")
grep -i "<add key=\"$FeedPrefix-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding $FeedPrefix-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"$FeedPrefix-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/$FeedPrefix-internal-transport/nuget/v2\" />"
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=("$FeedPrefix-internal-transport")
fi
done
# I want things split line by line
PrevIFS=$IFS
IFS=$'\n'
PackageSources+="$IFS"
PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
IFS=$PrevIFS
for FeedName in ${PackageSources[@]} ; do
# Check if there is no existing credential for this FeedName
grep -i "<$FeedName>" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding credentials for $FeedName."
PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
fi
done
# Re-enable any entries in disabledPackageSources where the feed name contains darc-int
grep -i "<disabledPackageSources>" $ConfigFile
if [ "$?" == "0" ]; then
DisabledDarcIntSources=()
echo "Re-enabling any disabled \"darc-int\" package sources in $ConfigFile"
DisabledDarcIntSources+=$(grep -oh '"darc-int-[^"]*" value="true"' $ConfigFile | tr -d '"')
for DisabledSourceName in ${DisabledDarcIntSources[@]} ; do
if [[ $DisabledSourceName == darc-int* ]]
then
OldDisableValue="<add key=\"$DisabledSourceName\" value=\"true\" />"
NewDisableValue="<!-- Reenabled for build : $DisabledSourceName -->"
sed -i.bak "s|$OldDisableValue|$NewDisableValue|" $ConfigFile
echo "Neutralized disablePackageSources entry for '$DisabledSourceName'"
fi
done
fi

3
eng/common/build.cmd Normal file
View file

@ -0,0 +1,3 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0build.ps1""" %*"
exit /b %ErrorLevel%

Some files were not shown because too many files have changed in this diff Show more