Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
1350261
Initial dotnet sdk install CLI definition
dsplaisted Jul 9, 2025
413e698
Add SDK update command
dsplaisted Jul 14, 2025
61e48aa
Rename VersionOrChannel argument to just Channel
dsplaisted Jul 14, 2025
51ffe3d
Implement part of UI for install command
dsplaisted Jul 20, 2025
5834280
Add more installer UI
dsplaisted Jul 21, 2025
1bf3e57
UI improvements and add dnup shims for demo
dsplaisted Jul 21, 2025
225a5cf
More install experience updates
dsplaisted Jul 21, 2025
9f6340c
Add SdkInstallCommand code to dnup
dsplaisted Aug 15, 2025
eaffa94
Wire up sdk install command for dnup
dsplaisted Aug 15, 2025
4394b54
Add string resources to dnup project
dsplaisted Aug 19, 2025
37c42aa
Add initial installer interfaces for dnup
dsplaisted Aug 20, 2025
9f372f7
Add initial installer interfaces for dnup (#50379)
dsplaisted Aug 20, 2025
1641070
Start implementation of DotnetInstaller
dsplaisted Aug 21, 2025
0b39a6e
Add dnup solution filter and add Environment provider to project
dsplaisted Aug 21, 2025
e05b2ad
Switch to common implementation of finding dotnet on path
dsplaisted Aug 21, 2025
c78f198
Fix typo
dsplaisted Aug 21, 2025
e06b134
Add class for global.json contents
dsplaisted Aug 21, 2025
cd575a2
Rename class and more
dsplaisted Aug 21, 2025
3ac4015
Implement GetGlobalJsonInfo
dsplaisted Aug 21, 2025
6fcbe43
Remove try/catch for loading global.json
dsplaisted Aug 21, 2025
dd90109
Implement GetConfiguredInstallType and GetGlobalJsonInfo (#50408)
dsplaisted Aug 21, 2025
bd28700
Add more installer methods
dsplaisted Aug 21, 2025
8e2bdf9
Add calls to new methods
dsplaisted Aug 22, 2025
19f42c8
Initial ConfigureInstallType implementation
dsplaisted Aug 22, 2025
a559c31
Fix check for dotnet folder in PATH
dsplaisted Aug 22, 2025
3e29ba6
Add more methods to installer interface (#50475)
dsplaisted Aug 25, 2025
c0075f8
Add boilerplate types and interfaces to do installs
nagilson Aug 25, 2025
060a91b
Add base version class
nagilson Aug 25, 2025
a09f30f
Add dotnetVersion class for version parsing
nagilson Aug 26, 2025
a918d06
Add dotnetVersion class for version parsing (#50492)
nagilson Aug 26, 2025
3ad43e4
Add basic tests
nagilson Aug 26, 2025
ebcefb4
Add basic tests for dnup (#50497)
nagilson Aug 26, 2025
ee2a6c6
Replace SDKInstallType with InstallType
nagilson Aug 26, 2025
14a58cb
Add Base Interface for Install
nagilson Aug 26, 2025
c1dfcb2
Add Base Interface for Install (#50498)
nagilson Aug 26, 2025
9c19c6b
Add the isolated classes for each responsibility of install
nagilson Aug 26, 2025
6887043
Add the isolated classes for each responsibility of install (#50500)
nagilson Aug 26, 2025
c97834e
fill in controller with correct data structure model
nagilson Aug 26, 2025
d3cb10f
use some actual version parsing
nagilson Aug 26, 2025
69b9821
add more context into what to implement for future me or others
nagilson Aug 26, 2025
fe227df
Add Interfaces for .NET Installer Data Models (#50503)
nagilson Aug 26, 2025
396db6f
prepare code from dnvm
nagilson Aug 26, 2025
065a05d
Prepare some install logic from dnup (#50504)
nagilson Aug 26, 2025
e4b7e42
Migrate to .NET Archive Libraries
nagilson Sep 3, 2025
2f458c9
Implement Extraction Logic
nagilson Sep 3, 2025
52c1191
Implement DNUP Extraction logic (#50626)
nagilson Sep 3, 2025
93bc61f
Implement manifest parsing and vscode setting folder for build button
nagilson Sep 4, 2025
a213377
Implement manifest parsing (#50642)
nagilson Sep 4, 2025
00ff09d
Installing .NET works e2e
nagilson Sep 4, 2025
2640948
Installing .NET works e2e with dnup (#50645)
nagilson Sep 4, 2025
3fcf146
Show progress correctly
nagilson Sep 4, 2025
0a668b4
fix end message
nagilson Sep 4, 2025
df9fde0
find available SDKs
nagilson Sep 4, 2025
2bd4154
Working Progress indicators (#50647)
nagilson Sep 4, 2025
716e6c2
Add update cadence method for manifest tracking
nagilson Sep 5, 2025
1c465ef
Add implementation of manifest methods
nagilson Sep 5, 2025
2da2e77
Extract + Install combined to one step
nagilson Sep 5, 2025
b35c6d8
Fix json aot serialization
nagilson Sep 5, 2025
7dfe03e
find existing versions + parse channels
nagilson Sep 5, 2025
e4f4fd0
find existing versions
nagilson Sep 5, 2025
dca4da2
Add tests for version parsing.
nagilson Sep 5, 2025
87eea7d
Correctly parse 9.0.1xx, and 9, and 9.0
nagilson Sep 5, 2025
1121152
Fix version parsing
nagilson Sep 5, 2025
f65bc4e
add lts sts schannel support. fix project.
nagilson Sep 5, 2025
681ab98
add preview support.
nagilson Sep 5, 2025
f7e399c
Add dnup manifest + channel parsing (#50665)
nagilson Sep 5, 2025
70a828f
Fix LTS STS Parsing
nagilson Sep 8, 2025
7535e7c
Fix LTS STS Parsing (#50688)
nagilson Sep 8, 2025
8d45577
Add dnup tests to dnup.slnf
dsplaisted Sep 26, 2025
29b7053
Move sdk update command to dnup
dsplaisted Sep 29, 2025
97b7c35
Misc cleanup
dsplaisted Oct 2, 2025
b771382
Cleanup
dsplaisted Oct 3, 2025
deeab32
Remove dnup to dotnet shims
dsplaisted Oct 3, 2025
7c33449
Miscellaneous dnup cleanup (#51122)
dsplaisted Oct 5, 2025
8437d6b
Refactor DotnetInstall types
dsplaisted Oct 7, 2025
70d1314
Refactor DotnetInstall types (#51140)
dsplaisted Oct 8, 2025
e3be31b
Add library for installer functionality
dsplaisted Oct 7, 2025
ea1932d
Fix json serialization after refactor
dsplaisted Oct 7, 2025
41e88dd
Add initial interfaces to installation library
dsplaisted Oct 7, 2025
d0572ba
Flesh out installer interfaces
dsplaisted Oct 9, 2025
cbbfb22
Update install root, install discoverer, and install type APIs
dsplaisted Oct 10, 2025
785fdd0
Add interfaces for installation library (#51184)
dsplaisted Oct 15, 2025
c20e563
Move the launching workspace into a root folder for the lib and dnup
nagilson Oct 16, 2025
3a96224
Use a clear, empty terminal window for launching rerun
nagilson Oct 16, 2025
a2f01a2
Add entire SDK repo to workspace so it's easier to work with both con…
nagilson Oct 16, 2025
61875c1
wip - prepare for e2e test
nagilson Oct 17, 2025
091bc07
Add copilot instructions to use powershell over cmd for dnup
nagilson Oct 17, 2025
0d0fff2
Add --no-progress because spectre prevents concurrent interactive dis…
nagilson Oct 17, 2025
9577b9d
Delete extraneous test file
nagilson Oct 17, 2025
44a60da
Add end to end tests for dnup
nagilson Oct 17, 2025
1fc9790
Remove extra concurrency tests as the e2e ones are already parallel
nagilson Oct 17, 2025
160aec6
Add End to End Dnup Tests (#51347)
nagilson Oct 17, 2025
be9bae3
Remove DotnetVersion
dsplaisted Oct 20, 2025
6c9b582
Rename IBootstrapperController to IDotnetInstallManager
dsplaisted Oct 20, 2025
eb6e2af
Delete one of the IDotnetInstaller interfaces
dsplaisted Oct 20, 2025
c2b7688
Move ArchiveDotnetInstaller and dependencies to library
dsplaisted Oct 20, 2025
b3b7bbd
Add basic yml for running PR tests in dnup
nagilson Oct 17, 2025
1dd19ae
Remove modifications to main CI
nagilson Oct 20, 2025
d284845
Improve yml file for dnup test runs
nagilson Oct 20, 2025
c5154f6
Run `dnup` tests in the `dnup` branch pipeline if only dnup code chan…
nagilson Oct 20, 2025
b665329
Merge remote-tracking branch 'upstream/main' into dnup
nagilson Oct 20, 2025
e59963f
Sync Main into `dnup` branch (#51370)
nagilson Oct 20, 2025
c1bfc12
Fix formatting of pipeline
nagilson Oct 20, 2025
d3d247e
Fix yml whitespace
nagilson Oct 20, 2025
ecba450
Try to use oneES Job Template
nagilson Oct 20, 2025
10a7595
fix whitespace
nagilson Oct 20, 2025
89877da
fix whitespace
nagilson Oct 20, 2025
b324ba6
Fix parameters
nagilson Oct 20, 2025
884515d
Update test names and use proper arm64 test template
nagilson Oct 20, 2025
46c898c
fix whitespace
nagilson Oct 20, 2025
39a088b
Include helix target queue in name
nagilson Oct 20, 2025
74f82d5
fix merge
nagilson Oct 20, 2025
f046112
Try to use .dotnet local SDK for .NET 10 SDK
nagilson Oct 20, 2025
58c6e0e
fix missing $ in yml
nagilson Oct 20, 2025
eb2e6f4
Use different separator for bootstrap step
nagilson Oct 20, 2025
adb611a
Include EnvDetectionRule
nagilson Oct 20, 2025
1efda88
Add unique identifier to build steps to make it easier to tell from afar
nagilson Oct 20, 2025
0c3fb23
Use a separate icon to separate build steps
nagilson Oct 20, 2025
0d5adcc
Don't use global/ in the mutex
nagilson Oct 20, 2025
9209615
Wait for longer to acquire mutex
nagilson Oct 20, 2025
b4af1ac
Preserve stacktrace with throw;
nagilson Oct 20, 2025
298ebaa
Make test artifacts dir so it doesn't fail to publish if tests fail
nagilson Oct 20, 2025
050d981
Prefer checking if the thread holds the mutex rather than OpenExisting
nagilson Oct 20, 2025
da92d44
Improve manifest tests
nagilson Oct 20, 2025
585e48e
Create public APIs in library for installation
dsplaisted Oct 20, 2025
90b1cf2
Add manifest path as an option
nagilson Oct 20, 2025
91058e7
Fix expressions
nagilson Oct 20, 2025
0fe4fcd
don't consider 20s as a long test - installing in an e2e test takes a…
nagilson Oct 20, 2025
1c0e111
use custommanifest path in IRA check
nagilson Oct 20, 2025
2555dbd
increase mutex wait time before giving up
nagilson Oct 20, 2025
3ed53ed
use a separate process so mutexes aren't shared improperly
nagilson Oct 20, 2025
5e5288d
remove console output capture - extraneous now
nagilson Oct 20, 2025
42c9a4b
Add library API to get latest release in a channel
dsplaisted Oct 20, 2025
ff435f8
Manifest paths should include custom path
nagilson Oct 20, 2025
1e6bb25
Add CWD
nagilson Oct 21, 2025
b529951
Add cwd to tests to try to find the process
nagilson Oct 21, 2025
dd5f687
find executable more correctly
nagilson Oct 21, 2025
7614f22
Merge branch 'dnup' into library-implementation
nagilson Oct 21, 2025
0fc7172
Add concurrency test + Installation Validation
nagilson Oct 21, 2025
30eedda
Revert "Add concurrency test + Installation Validation"
nagilson Oct 21, 2025
5ca205c
Run tests for `dnup` branch across all 3 OS in PRs (#51372)
nagilson Oct 21, 2025
f5a52ed
Merge remote-tracking branch 'upstream/dnup' into library-implementation
nagilson Oct 21, 2025
9bd5bb0
fix strong name issue
nagilson Oct 21, 2025
171854b
Allow public use of GetInstallArchitecture
nagilson Oct 21, 2025
6f45876
Add basic ability to get latest version and install to installation l…
dsplaisted Oct 21, 2025
de951fd
Add concurrency test + Installation Validation
nagilson Oct 21, 2025
ca115a4
remove extra GCP fnct
nagilson Oct 21, 2025
515508d
Fix new references
nagilson Oct 21, 2025
d5844ab
Enable debugging into dnup process in test
nagilson Oct 21, 2025
ec64dc9
Create a window if we are in debug mode so we can press enter.
nagilson Oct 21, 2025
deed5e2
Can properly attach to test debug process
nagilson Oct 21, 2025
5306a16
Switch to environment variable that enables debug launching into the …
nagilson Oct 21, 2025
f919aa2
Workspace should enable debugging singular test
nagilson Oct 21, 2025
ab7a47f
Fix Version Parsing issues in ReleaseManifest
nagilson Oct 22, 2025
84827ed
Test does not need to hold onto mutex during validation
nagilson Oct 22, 2025
4612851
Simplify release manifest logic
nagilson Oct 22, 2025
ace55a5
Extensively simplify product version filtering logic
nagilson Oct 22, 2025
6ac1ab7
even further simplify the version parsing logic
nagilson Oct 22, 2025
d4daa38
Copy the logic for sdk CI to dnup CI
nagilson Oct 22, 2025
fd0d9ee
Produce a package from the library on build
nagilson Oct 22, 2025
67a61ab
enable package creation
nagilson Oct 22, 2025
4003434
Package version correctly created at D:\sdk\artifacts\packages\Releas…
nagilson Oct 22, 2025
8cdbcf4
Simplify package creation for now to only run win tests / pkg
nagilson Oct 22, 2025
ae2f079
remove unused publish properties
nagilson Oct 22, 2025
c689d8f
Address Feedback
nagilson Oct 23, 2025
06d440a
add to dnup slnf
nagilson Oct 23, 2025
6c89278
Validate .NET Installs from `dnup` (#51405)
nagilson Oct 23, 2025
91d8ac8
Merge remote-tracking branch 'upstream/dnup' into nagilson-nuget-pipe…
nagilson Oct 23, 2025
b25a7ae
`dnup` CI Pipeline (#51437)
nagilson Oct 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions .vsts-dnup-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Pipeline: https://dev.azure.com/dnceng/internal/_build?definitionId=

trigger:
batch: true
branches:
include:
- dnup
- release/dnup

pr:
branches:
include:
- dnup
- release/dnup

parameters:
# When true, runs the pipeline in the same way as the PR pipeline.
- name: runTestBuild
displayName: Run A Test Build
type: boolean
default: false
- name: enableArm64Job
displayName: Enables the ARM64 job
type: boolean
default: false

variables:
- template: /eng/pipelines/templates/variables/sdk-defaults.yml
# Variables used: DncEngInternalBuildPool
- template: /eng/common/templates-official/variables/pool-providers.yml
# Helix testing requires a token when internally run.
# Variables used: HelixApiAccessToken
- group: DotNet-HelixApi-Access
- group: AzureDevOps-Artifact-Feeds-Pats
# Allows Arcade to run a signed build by disabling post-build signing for release-branch builds or manual builds that are not running tests.
- ${{ if and(eq(parameters.runTestBuild, false), 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
# Provides TSA variables for automatic bug reporting.
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- group: DotNet-CLI-SDLValidation-Params
### LOCAL ONLY ###
- name: _publishArgument
value: -publish
- name: _signArgument
value: -sign /p:SignCoreSdk=true
- name: _officialBuildProperties
# The OfficialBuilder property is set to Microsoft for the official build only.
# This property is checked in Directory.Build.props and adds the MICROSOFT_ENABLE_TELEMETRY constant.
# This constant is used in CompileOptions.cs to set both TelemetryOptOutDefault and TelemetryOptOutDefaultString.
value: /p:DotNetPublishUsingPipelines=true /p:OfficialBuilder=Microsoft /p:OfficialBuildId=$(Build.BuildNumber)

resources:
repositories:
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release

extends:
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
${{ else }}:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
parameters:
containers:
azureLinux30Amd64:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64

sdl:
sourceAnalysisPool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
policheck:
enabled: true
tsa:
enabled: true
binskim:
enabled: true
${{ if or(eq(parameters.runTestBuild, true), eq(variables['Build.Reason'], 'PullRequest')) }}:
componentgovernance:
# Refdoc: https://docs.opensource.microsoft.com/tools/cg/component-detection/variables/
ignoreDirectories: artifacts, .packages

stages:
############### BUILD STAGE ###############
############### WINDOWS ###############
- template: /eng/pipelines/templates/jobs/dnup-tests.yml@self
parameters:
pool:
name: $($(DncEngInternalBuildPool))
image: windows.vs2022.amd64
os: windows
emoji: 🪟
helixTargetQueue: windows.amd64.vs2022.pre
oneESCompat:
templateFolderName: templates-official
publishTaskPrefix: 1ES.
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
preSteps:
- powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force
displayName: Create artifacts/bin directory
${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}:
timeoutInMinutes: 180
windowsJobParameterSets:
### OFFICIAL ###
- categoryName: Official
publishArgument: $(_publishArgument)
signArgument: $(_signArgument)
officialBuildProperties: $(_officialBuildProperties) /p:BuildWorkloads=true
enableDefaultArtifacts: true
runTests: false
publishRetryConfig: true
variables:
_SignType: real

############### PACKAGE STAGE ###############
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- stage: publish
displayName: Publish
dependsOn: []
jobs:
- template: /eng/pipelines/templates/jobs/dnup-library-package.yml@self
parameters:
pool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
72 changes: 72 additions & 0 deletions .vsts-dnup-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Pipeline: https://dev.azure.com/dnceng-public/public/_build?definitionId=323

trigger: none

pr:
branches:
include:
- dnup
paths:
include:
- src/Installer/dnup/
- test/dnup.Tests/
- global.json
- .vsts-dnup-tests.yml

parameters:
- name: enableArm64Job
displayName: Enables the ARM64 job
type: boolean
default: true

variables:
- template: /eng/pipelines/templates/variables/sdk-defaults.yml
# Variables used: DncEngPublicBuildPool
- template: /eng/common/templates/variables/pool-providers.yml

stages:
- stage: dnup
displayName: 🏰 dnup tests
jobs:
############### WINDOWS ###############
- template: /eng/pipelines/templates/jobs/dnup-tests.yml@self
parameters:
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals windows.vs2022.amd64.open
os: windows
emoji: 🪟
helixTargetQueue: windows.amd64.vs2022.pre.open

############### LINUX ###############
- template: /eng/pipelines/templates/jobs/dnup-tests.yml@self
parameters:
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals build.ubuntu.2204.amd64.open
os: linux
emoji: 🐧
helixTargetQueue: ubuntu.2204.amd64.open

############### MACOS ###############
- template: /eng/pipelines/templates/jobs/dnup-tests.yml@self
parameters:
pool:
name: Azure Pipelines
vmImage: macOS-latest
os: macOS
emoji: 🍎
helixTargetQueue: osx.15.amd64.open

### ARM64 ###
- ${{ if eq(parameters.enableArm64Job, true) }}:
- template: /eng/pipelines/templates/jobs/dnup-tests.yml@self
parameters:
pool:
name: Azure Pipelines
vmImage: macOS-latest
os: macOS
emoji: 💪
helixTargetQueue: osx.13.arm64.open


1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
<PackageVersion Include="runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" />
<PackageVersion Include="runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreDotNetHostResolverPackageVersion)" />
<PackageVersion Include="StyleCop.Analyzers" Version="$(StyleCopAnalyzersPackageVersion)" />
<PackageVersion Include="Spectre.Console" Version="0.48.0" />
<PackageVersion Include="System.CodeDom" Version="$(SystemCodeDomPackageVersion)" />
<PackageVersion Include="System.CommandLine" Version="$(SystemCommandLineVersion)" />
<PackageVersion Include="System.CommandLine.NamingConventionBinder" Version="$(SystemCommandLineNamingConventionBinderVersion)" />
Expand Down
11 changes: 11 additions & 0 deletions dnup.slnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"solution": {
"path": "sdk.slnx",
"projects": [
"src\\Installer\\dnup\\dnup.csproj",
"src\\Installer\\Microsoft.Dotnet.Installation\\Microsoft.Dotnet.Installation.csproj",
"test\\dnup.Tests\\dnup.Tests.csproj",
"src\\Resolvers\\Microsoft.DotNet.NativeWrapper\\Microsoft.DotNet.NativeWrapper.csproj
]
}
}
Empty file.
88 changes: 88 additions & 0 deletions eng/pipelines/templates/jobs/dnup-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
parameters:
### GENERAL ###
variables: {}
dependsOn: ''
helixTargetQueue: ''
oneESCompat:
templateFolderName: templates
publishTaskPrefix: ''
container: ''
helixTargetContainer: ''
categoryName: dnup
runTests: true
publishRetryConfig: false
publishXunitResults: false
enableSbom: true
timeoutInMinutes: 150

jobs:
- template: /eng/common/${{ parameters.oneESCompat.templateFolderName }}/job/job.yml
parameters:
displayName: '${{ parameters.pool.emoji }} dnup tests: ${{ parameters.pool.os }} (${{ parameters.helixTargetQueue }})'
pool: ${{ parameters.pool }}
container: ${{ parameters.container }}
strategy: ${{ parameters.strategy }}
helixRepo: dotnet/sdk
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
enableMicrobuild: true
enablePublishBuildAssets: true
enableTelemetry: true
enablePublishUsingPipelines: true
enableSbom: ${{ parameters.enableSbom }}
variables:
- ${{ insert }}: ${{ parameters.variables }}
dependsOn: ${{ parameters.dependsOn }}
preSteps: ${{ parameters.preSteps }}
templateContext:
sdl:
binskim:
analyzeTargetGlob: +:f|eng\**\*.props;+:f|artifacts\bin\**\*.dll;+:f|artifacts\bin\**\*.exe;-:f|artifacts\bin\**\msdia140.dll;-:f|artifacts\bin\**\pgort140.dll;-:f|artifacts\bin\*Tests\**;-:f|**\Microsoft.NET.Runtime.Emscripten**\tools\**;-:f|**\CodeCoverage\**;-:f|artifacts\bin\**\capstone.dll;

steps:
- ${{ if eq(parameters.pool.os, 'windows') }}:
- powershell: |
& .\restore.cmd
displayName: 🍱 Bootstrap toolset (Windows)
- powershell: |
& .\.dotnet\dotnet restore test\dnup.Tests\dnup.Tests.csproj
displayName: ♻️ Restore dnup tests (Windows)
- powershell: |
& .\.dotnet\dotnet build test\dnup.Tests\dnup.Tests.csproj -c Release --no-restore
displayName: 💻 Build Windows
- powershell: |
New-Item -Path "$(Build.SourcesDirectory)/artifacts/dnupTestResults" -ItemType Directory -Force
displayName: 📁 Create test results directory (Windows)
- powershell: |
& .\.dotnet\dotnet test test\dnup.Tests\dnup.Tests.csproj -c Release --no-build --logger "trx;LogFileName=dnup-tests.trx" --results-directory $(Build.SourcesDirectory)/artifacts/dnupTestResults
displayName: 🔍 Test Windows
- ${{ if ne(parameters.pool.os, 'windows') }}:
- script: |
./restore.sh
displayName: 🍱 Bootstrap toolset (Unix)
- script: |
./.dotnet/dotnet restore test/dnup.Tests/dnup.Tests.csproj
displayName: ♻️ Restore dnup tests (Unix)
- script: |
./.dotnet/dotnet build test/dnup.Tests/dnup.Tests.csproj -c Release --no-restore
displayName: 🐧 Build (Unix)
- script: |
mkdir -p "$(Build.SourcesDirectory)/artifacts/dnupTestResults"
displayName: 📁 Create test results directory (Unix)
- script: |
./.dotnet/dotnet test test/dnup.Tests/dnup.Tests.csproj -c Release --no-build --logger "trx;LogFileName=dnup-tests.trx" --results-directory $(Build.SourcesDirectory)/artifacts/dnupTestResults
displayName: 🔎 Test (Unix)
- task: PublishTestResults@2
displayName: 🚀 Publish test results
condition: always()
inputs:
testResultsFormat: VSTest
testResultsFiles: '**/dnup-tests.trx'
searchFolder: $(Build.SourcesDirectory)/artifacts/dnupTestResults
testRunTitle: 'dnup ${{ parameters.pool.os }}'
- task: PublishBuildArtifacts@1
displayName: ⬇️ Publish test artifacts
condition: always()
inputs:
PathtoPublish: $(Build.SourcesDirectory)/artifacts/dnupTestResults
ArtifactName: dnupTestResults_${{ parameters.pool.os }}
publishLocation: Container
6 changes: 5 additions & 1 deletion sdk.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<File Path="eng/dogfood.cmd" />
<File Path="eng/dogfood.sh" />
<File Path="eng/Versions.props" />
<File Path="eng/Version.Details.props" />
</Folder>
<Folder Name="/Solution Items/">
<File Path=".editorconfig" />
Expand Down Expand Up @@ -88,6 +87,10 @@
<Project Path="src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj" />
<Project Path="src/Containers/packaging/package.csproj" />
</Folder>
<Folder Name="/src/Installer/">
<Project Path="src/Installer/dnup/dnup.csproj" />
<Project Path="src/Installer/Microsoft.Dotnet.Installation/Microsoft.Dotnet.Installation.csproj" />
</Folder>
<Folder Name="/src/Layout/">
<Project Path="src/Layout/finalizer/finalizer.csproj" />
<Project Path="src/Layout/pkg/dotnet-sdk.proj" Type="C#" />
Expand Down Expand Up @@ -309,6 +312,7 @@
<Project Path="test/ArgumentForwarding.Tests/ArgumentForwarding.Tests.csproj" />
<Project Path="test/ArgumentsReflector/ArgumentsReflector.csproj" />
<Project Path="test/containerize.UnitTests/containerize.UnitTests.csproj" />
<Project Path="test/dnup.Tests/dnup.Tests.csproj" />
<Project Path="test/dotnet-format.UnitTests/dotnet-format.UnitTests.csproj" />
<Project Path="test/dotnet-MsiInstallation.Tests/dotnet-MsiInstallation.Tests.csproj" />
<Project Path="test/dotnet-new.IntegrationTests/dotnet-new.IntegrationTests.csproj" />
Expand Down
8 changes: 4 additions & 4 deletions src/Cli/dotnet/Telemetry/EnvironmentDetectionRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public BooleanEnvironmentRule(params string[] variables)

public override bool IsMatch()
{
return _variables.Any(variable =>
return _variables.Any(variable =>
bool.TryParse(Environment.GetEnvironmentVariable(variable), out bool value) && value);
}
}
Expand Down Expand Up @@ -96,8 +96,8 @@ public EnvironmentDetectionRuleWithResult(T result, params string[] variables)
/// <returns>The result value if the rule matches; otherwise, null.</returns>
public T? GetResult()
{
return _variables.Any(variable => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(variable)))
? _result
return _variables.Any(variable => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(variable)))
? _result
: null;
}
}
}
8 changes: 8 additions & 0 deletions src/Installer/.github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

---
applyTo: "**"
---
- Environment: Windows 11 using PowerShell 7
- Never use `&&` to chain commands; use semicolon (`;`) for PowerShell command chaining
- Prefer PowerShell cmdlets over external utilities when available
- Use PowerShell-style parameter syntax (-Parameter) rather than Unix-style flags
10 changes: 10 additions & 0 deletions src/Installer/Microsoft.Dotnet.Installation/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;

[assembly: InternalsVisibleTo("dnup, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("dnup.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
11 changes: 11 additions & 0 deletions src/Installer/Microsoft.Dotnet.Installation/DotnetInstallRoot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.Dotnet.Installation;
public record DotnetInstallRoot(
string Path,
InstallArchitecture Architecture);
Loading
Loading