Skip to content

Commit acc434d

Browse files
author
Simon Zhao (BEYONDSOFT CONSULTING INC)
committed
Merge branch 'main' of https://github.com/dotnet/sdk into merge/release/9.0.3xx-to-main
2 parents d8bf135 + c92496c commit acc434d

File tree

569 files changed

+8816
-4489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

569 files changed

+8816
-4489
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"microsoft.dotnet.darc": {
6-
"version": "1.1.0-beta.25319.4",
6+
"version": "1.1.0-beta.25358.3",
77
"commands": [
88
"darc"
99
]

.github/workflows/copilot-setup-steps.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@ jobs:
2727
- name: Do an initial build to ensure all dependencies are restored
2828
run: |
2929
./build.sh
30+
- name: Put repo-local dotnet install on PATH
31+
run: |
32+
echo "PATH=$PWD/.dotnet:$PATH" >> $GITHUB_ENV
33+
34+
- name: Check dotnet version
35+
run: |
36+
dotnet --version

.github/workflows/pr-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: PR Analysis
22
on:
33
pull_request_target:
4-
types: [opened, synchronize, labeled, unlabeled]
4+
types: [opened, synchronize, labeled, unlabeled, ready_for_review]
55
permissions:
66
contents: read
77
pull-requests: read

.github/workflows/update-man-pages.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,21 @@ jobs:
2222
rm ./documentation/manpages/sdk/*
2323
2424
./documentation/manpages/tool/run_docker.sh
25-
26-
if [[ -n $(git status -s) ]]; then
25+
26+
# Only add files with more than 2 changed lines
27+
for line in $(git diff --numstat | awk '$1+$2 > 2 {print $3}'); do
28+
git add "$line"
29+
done
30+
31+
if ! git diff --cached --quiet; then
2732
git config user.name 'github-actions'
2833
git config user.email '[email protected]'
2934
date=$(date +%F)
30-
git add .
3135
title="[automated] Update man pages"
3236
body="This action is executed twice a month to automatically update the manpages based on the latest changes to the dotnet/docs repo"
3337
branch=update-man-page-$date
3438
git checkout -b $branch
35-
git commit -a -m "$title"
39+
git commit -m "$title"
3640
git push -u origin $branch --force
3741
gh pr create --base main --head $branch --title "$title" --body "$body"
3842
fi

.vsts-ci.yml

Lines changed: 18 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,9 @@ extends:
6464
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
6565
parameters:
6666
containers:
67-
alpine322Amd64:
68-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.22-amd64
69-
centosStream9:
70-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
71-
debian12Amd64:
72-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc15-amd64
73-
fedora39:
74-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
75-
mariner20CrossArm:
76-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm
67+
azureLinux30Net10BuildAmd64:
68+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64
69+
7770
sdl:
7871
sourceAnalysisPool:
7972
name: $(DncEngInternalBuildPool)
@@ -162,60 +155,44 @@ extends:
162155
timeoutInMinutes: 90
163156
linuxJobParameterSets:
164157
### OFFICIAL ###
165-
# Note: These builds are also portable like the Portable category, but that category uses containers, and doesn't publish zips and tarballs.
158+
# Note: These builds are also glibc like the glibc category, but that category uses containers, and doesn't publish zips and tarballs.
166159
- categoryName: Official
167160
publishArgument: $(_publishArgument)
168161
officialBuildProperties: $(_officialBuildProperties)
169-
osProperties: $(linuxOsPortableProperties)
162+
osProperties: $(linuxOsglibcProperties)
170163
runTests: false
171164
- categoryName: Official
172165
targetArchitecture: arm
173166
runtimeIdentifier: linux-arm
174167
publishArgument: $(_publishArgument)
175168
officialBuildProperties: $(_officialBuildProperties)
176-
osProperties: $(linuxOsPortableProperties)
169+
osProperties: $(linuxOsglibcProperties)
177170
runTests: false
178171
- categoryName: Official
179172
targetArchitecture: arm64
180173
runtimeIdentifier: linux-arm64
181174
publishArgument: $(_publishArgument)
182175
officialBuildProperties: $(_officialBuildProperties)
183-
osProperties: $(linuxOsPortableProperties)
184-
runTests: false
185-
### PORTABLE ###
186-
- categoryName: Portable
187-
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
188-
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
189-
officialBuildProperties: $(_officialBuildProperties)
190-
osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true
191-
runTests: false
192-
- categoryName: Portable
193-
targetArchitecture: arm64
194-
runtimeIdentifier: linux-arm64
195-
# Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official.
196-
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
197-
officialBuildProperties: $(_officialBuildProperties)
198-
osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true
176+
osProperties: $(linuxOsglibcProperties)
199177
runTests: false
200-
- categoryName: Portable
201-
container: centosStream9
178+
### glibc ###
179+
- categoryName: glibc
202180
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
203181
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
204182
officialBuildProperties: $(_officialBuildProperties)
205-
osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true
183+
osProperties: $(linuxOsglibcProperties) /p:BuildSdkDeb=true
206184
runTests: false
207-
- categoryName: Portable
208-
container: centosStream9
185+
- categoryName: glibc
209186
targetArchitecture: arm64
210187
runtimeIdentifier: linux-arm64
211188
# Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official.
212189
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
213190
officialBuildProperties: $(_officialBuildProperties)
214-
osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true
191+
osProperties: $(linuxOsglibcProperties) /p:BuildSdkDeb=true
215192
runTests: false
216-
### MUSL ###
217-
- categoryName: Musl
218-
container: alpine322Amd64
193+
### musl ###
194+
- categoryName: musl
195+
container: azureLinux30Net10BuildAmd64
219196
runtimeIdentifier: linux-musl-x64
220197
publishArgument: $(_publishArgument)
221198
officialBuildProperties: $(_officialBuildProperties)
@@ -224,15 +201,15 @@ extends:
224201
# SBOM generation is not supported for alpine.
225202
enableSbom: false
226203
runTests: false
227-
- categoryName: Musl
228-
container: mariner20CrossArm
204+
- categoryName: musl
205+
container: azureLinux30Net10BuildAmd64
229206
targetArchitecture: arm
230207
runtimeIdentifier: linux-musl-arm
231208
publishArgument: $(_publishArgument)
232209
officialBuildProperties: $(_officialBuildProperties)
233210
osProperties: /p:OSName=linux-musl
234211
runTests: false
235-
- categoryName: Musl
212+
- categoryName: musl
236213
targetArchitecture: arm64
237214
runtimeIdentifier: linux-musl-arm64
238215
publishArgument: $(_publishArgument)

.vsts-pr.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ parameters:
1818
- name: enableArm64Job
1919
displayName: Enables the ARM64 job
2020
type: boolean
21-
default: false
21+
default: true
2222

2323
variables:
2424
- template: /eng/pipelines/templates/variables/sdk-defaults.yml
@@ -27,16 +27,8 @@ variables:
2727

2828
resources:
2929
containers:
30-
- container: alpine322Amd64
31-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.22-amd64
32-
- container: centosStream9
33-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
34-
- container: debian12Amd64
35-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc15-amd64
36-
- container: fedora39
37-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
38-
- container: ubuntu2204DebPkg
39-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg
30+
- container: azureLinux30Net10BuildAmd64
31+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64
4032

4133
stages:
4234
############### BUILD STAGE ###############

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<HostOSName Condition="'$(HostOSName)' == '' AND $([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos</HostOSName>
2424
<HostOSName Condition="'$(HostOSName)' == '' AND '$(IsLinux)' == 'true'">linux</HostOSName>
2525

26+
<OSName Condition="'$(OSName)' == '' AND $(PortableTargetRid) != ''">$(PortableTargetRid.Substring(0, $(PortableTargetRid.LastIndexOf('-'))))</OSName>
2627
<OSName Condition="'$(OSName)' == '' AND $(TargetRid) != ''">$(TargetRid.Substring(0, $(TargetRid.LastIndexOf('-'))))</OSName>
2728
<OSName Condition="'$(OSName)' == ''">$(HostOSName)</OSName>
2829
</PropertyGroup>

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<!-- Using multiple feeds isn't supported by Maestro: https://github.com/dotnet/arcade/issues/14155. -->
55
<NoWarn>$(NoWarn);NU1507</NoWarn>
66
</PropertyGroup>
7-
87
<ItemGroup>
98
<PackageVersion Include="Basic.CompilerLog.Util" Version="0.9.9" />
109
<PackageVersion Include="AwesomeAssertions" Version="$(AwesomeAssertionsVersion)" />
10+
<PackageVersion Include="BenchmarkDotNet" Version="$(BenchmarkDotNetPackageVersion)" />
1111
<PackageVersion Include="AwesomeAssertions.Json" Version="$(AwesomeAssertionsJsonVersion)" />
1212
<PackageVersion Include="MicroBuild.Plugins.SwixBuild.Dotnet" Version="1.1.87-gba258badda" />
1313
<PackageVersion Include="Microsoft.ApplicationInsights" Version="$(MicrosoftApplicationInsightsPackageVersion)" />

documentation/general/decouple-vs-and-net-sdk.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,6 @@ Solutions that mix .NET SDK and Visual Studio projects will end up with multiple
119119

120120
The compiler will offer a property that allows SDK projects to use the MSBuild version of the compiler when being built with `msbuild`: `<RoslynCompilerType>Framework</RoslynCompilerType>`. This can be added to a `Directory.Build.props` file to impact the entire solution. This is not expected to be a common scenario but is available for customers who need it. This property will be ignored when using `dotnet build` as there is no way to fall back to the Visual Studio compiler in that scenario.
121121

122-
> [!NOTE]
123-
> These values are recognized for property `RoslynCompilerType`:
124-
> - `Core`: use the compiler that comes with the .NET SDK
125-
> - `Framework`: use the compiler that comes with .NET Framework MSBuild
126-
> - `FrameworkPackage`: download the Microsoft.Net.Sdk.Compilers.Toolset package which contains the .NET Framework compiler corresponding to the .NET SDK version
127-
128122
### .NET Framework based analyzers
129123

130124
There are a few analyzers which are built against .NET Framework TFMs. That means when loaded in a .NET Core compiler it could lead to compatibility issues. This is not expected to be a significant issue as our processes have been pushing customers to target `netstandard` in analyzers for 5+ years. However it is possible that some customers will run into issues here.
@@ -137,6 +131,20 @@ Today there is not a 100% reliable way to shutdown the VBCSCompiler process. The
137131

138132
To mitigate this we will be fixing the `build-server shutdown` command to be reliable across all the scenarios we care about. The details of this are captured in [issue 45956](https://github.com/dotnet/sdk/issues/45956).
139133

134+
## RoslynCompilerType
135+
136+
Based on the value of the `RoslynCompilerType` property, the SDK sets property `RoslynTasksAssembly` to a full path to a [Roslyn build task DLL][roslyn-build-task],
137+
and the SDK targets use `$(RoslynTasksAssembly)` to load the build task.
138+
139+
The SDK also sets `RoslynTargetsPath` to the directory path of the roslyn tasks assembly. This property is used by some targets
140+
but it should be avoided if possible because the tasks assembly name can change as well, not just the directory path.
141+
142+
These values are recognized for property `RoslynCompilerType`:
143+
- `Core`: use the compiler that comes with the .NET SDK
144+
- `Framework`: use the compiler that comes with .NET Framework MSBuild
145+
- `FrameworkPackage`: download the Microsoft.Net.Sdk.Compilers.Toolset package which contains the .NET Framework compiler corresponding to the .NET SDK version
146+
- `Custom`: the SDK will not override `RoslynTasksAssembly` - used for example by Microsoft.Net.Compilers.Toolset package which injects its own version of the build task
147+
140148
## Alternative
141149

142150
### Make the compiler in Visual Studio pluggable
@@ -189,6 +197,7 @@ There is only one version of the DevKit extension. It is released using the late
189197
[matrix-of-paine]: https://aka.ms/dotnet/matrixofpaine
190198
[sdk-lifecycle]: https://learn.microsoft.com/en-us/dotnet/core/porting/versioning-sdk-msbuild-vs#lifecycle
191199
[code-razor-vs-load]: https://github.com/dotnet/roslyn/blob/9aea80927e3d4e5a2846efaa710438c0d8d2bfa2/src/Workspaces/Core/Portable/Workspace/ProjectSystem/ProjectSystemProject.cs#L1009
200+
[roslyn-build-task]: https://github.com/dotnet/roslyn/blob/ccb05769e5298ac23c01b33a180a0b3715f53a18/src/Compilers/Core/MSBuildTask/README.md
192201
[setup-dotnet]: https://github.com/actions/setup-dotnet
193202
[pr-detect-torn-state]: https://github.com/dotnet/installer/pull/19144
194203
[issue-analyzer-mt]: https://github.com/dotnet/sdk/issues/20355

0 commit comments

Comments
 (0)