Skip to content

Commit f99aa7d

Browse files
authored
Merge branch 'main' into nagilson-create-tool-manifest-by-default
2 parents 878dd64 + 0934942 commit f99aa7d

File tree

154 files changed

+4167
-1156
lines changed

Some content is hidden

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

154 files changed

+4167
-1156
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.25259.3",
6+
"version": "1.1.0-beta.25279.2",
77
"commands": [
88
"darc"
99
]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Update man-pages workflow
2+
on:
3+
schedule:
4+
- cron: "42 3 1/15 * *" # Trigger every 15 days at 03:42
5+
#- cron: "0,5,10,15,20,25,30,35,40,45,50,55 * * * *" # For testing
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
update-man-pages:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository code
16+
uses: actions/checkout@v4
17+
18+
- name: Update man-pages
19+
run: |
20+
set -euo pipefail
21+
22+
rm ./documentation/manpages/sdk/*
23+
24+
./documentation/manpages/tool/run_docker.sh
25+
26+
if [[ -n $(git status -s) ]]; then
27+
git config user.name 'github-actions'
28+
git config user.email '[email protected]'
29+
date=$(date +%F)
30+
git add .
31+
title="[automated] Update man pages"
32+
body="This action is executed twice a month to automatically update the manpages based on the latest changes to the dotnet/docs repo"
33+
branch=update-man-page-$date
34+
git checkout -b $branch
35+
git commit -a -m "$title"
36+
git push -u origin $branch --force
37+
gh pr create --base main --head $branch --title "$title" --body "$body"
38+
fi
39+
env:
40+
GH_TOKEN: ${{ github.token }}

.vsts-ci.yml

Lines changed: 5 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ parameters:
2121
- name: runTestBuild
2222
displayName: Run A Test Build
2323
type: boolean
24-
default: false
24+
default: true
2525
- name: enableArm64Job
2626
displayName: Enables the ARM64 job
2727
type: boolean
@@ -69,7 +69,7 @@ extends:
6969
centosStream9:
7070
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
7171
debian12Amd64:
72-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc14-amd64
72+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc15-amd64
7373
fedora39:
7474
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
7575
mariner20CrossArm:
@@ -145,33 +145,6 @@ extends:
145145
_SignType: real
146146
dependsOn: Official_windows_x64
147147
downloadManifestMsiPackages: true
148-
### PGO ###
149-
- categoryName: PGO
150-
pgoInstrument: true
151-
publishArgument: $(_publishArgument)
152-
signArgument: $(_signArgument)
153-
officialBuildProperties: $(_officialBuildProperties)
154-
runTests: false
155-
variables:
156-
_SignType: real
157-
- categoryName: PGO
158-
pgoInstrument: true
159-
targetArchitecture: x86
160-
publishArgument: $(_publishArgument)
161-
signArgument: $(_signArgument)
162-
officialBuildProperties: $(_officialBuildProperties)
163-
runTests: false
164-
variables:
165-
_SignType: real
166-
- categoryName: PGO
167-
pgoInstrument: true
168-
targetArchitecture: arm64
169-
publishArgument: $(_publishArgument)
170-
signArgument: $(_signArgument)
171-
officialBuildProperties: $(_officialBuildProperties)
172-
runTests: false
173-
variables:
174-
_SignType: real
175148

176149
############### LINUX ###############
177150
- template: /eng/pipelines/templates/jobs/sdk-job-matrix.yml@self
@@ -266,21 +239,6 @@ extends:
266239
officialBuildProperties: $(_officialBuildProperties)
267240
osProperties: /p:OSName=linux-musl
268241
runTests: false
269-
### PGO ###
270-
- categoryName: PGO
271-
pgoInstrument: true
272-
publishArgument: $(_publishArgument)
273-
officialBuildProperties: $(_officialBuildProperties)
274-
osProperties: $(linuxOsPortableProperties)
275-
runTests: false
276-
- categoryName: PGO
277-
pgoInstrument: true
278-
targetArchitecture: arm64
279-
runtimeIdentifier: linux-arm64
280-
publishArgument: $(_publishArgument)
281-
officialBuildProperties: $(_officialBuildProperties)
282-
osProperties: $(linuxOsPortableProperties)
283-
runTests: false
284242

285243
############### MACOS ###############
286244
- template: /eng/pipelines/templates/jobs/sdk-job-matrix.yml@self
@@ -332,15 +290,16 @@ extends:
332290
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
333291

334292
############### PUBLISH STAGE ###############
335-
- ${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}:
293+
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
336294
- stage: publish
337295
displayName: Publish
338-
dependsOn: build
296+
dependsOn: []
339297
jobs:
340298
- template: /eng/common/templates-official/job/publish-build-assets.yml@self
341299
parameters:
342300
publishUsingPipelines: true
343301
publishAssetsImmediately: true
302+
isAssetlessBuild: true
344303
pool:
345304
name: $(DncEngInternalBuildPool)
346305
image: 1es-windows-2022

.vsts-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ resources:
3232
- container: centosStream9
3333
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
3434
- container: debian12Amd64
35-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc14-amd64
35+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc15-amd64
3636
- container: fedora39
3737
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
3838
- container: ubuntu2204DebPkg

CODEOWNERS

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,3 @@
108108
# dotnet-format
109109
/src/BuiltInTools/dotnet-format @dotnet/roslyn-ide
110110
/test/dotnet-format.UnitTests @dotnet/roslyn-ide
111-
112-
# Area: VMR & SourceBuild
113-
/eng/DotNetBuild.props @dotnet/source-build @dotnet/product-construction

Directory.Build.props

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929

3030
<PropertyGroup>
3131
<SdkSrcRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src'))</SdkSrcRoot>
32+
<TestHostFolder>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'redist', '$(Configuration)'))</TestHostFolder>
33+
<TestHostDotNetRoot>$([MSBuild]::NormalizeDirectory('$(TestHostFolder)', 'dotnet'))</TestHostDotNetRoot>
34+
<TestHostDotNetTool>$(TestHostDotNetRoot)$([System.IO.Path]::GetFileName('$(DotNetTool)'))</TestHostDotNetTool>
35+
3236
<PackageProjectUrl>https://github.com/dotnet/sdk</PackageProjectUrl>
3337
<PackageLicenseExpression>MIT</PackageLicenseExpression>
3438
<LangVersion>Preview</LangVersion>
@@ -62,6 +66,9 @@
6266

6367
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
6468
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
69+
70+
<!-- https://github.com/dotnet/source-build/issues/4115. -->
71+
<PublishWindowsPdb>false</PublishWindowsPdb>
6572
</PropertyGroup>
6673

6774
<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
@@ -85,10 +92,10 @@
8592
<!-- These aliases need to live outside of Versions.props as VMR / source-build overwrites some of the version properties for live builds. -->
8693
<PropertyGroup>
8794
<!-- 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. -->
88-
<MicrosoftNETCoreAppHostPackageVersion>$(MicrosoftNETCoreAppHostwinx64PackageVersion)</MicrosoftNETCoreAppHostPackageVersion>
89-
<MicrosoftNETCoreAppRuntimePackageVersion>$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</MicrosoftNETCoreAppRuntimePackageVersion>
90-
<MicrosoftAspNetCoreAppRuntimePackageVersion>$(MicrosoftAspNetCoreAppRuntimewinx64PackageVersion)</MicrosoftAspNetCoreAppRuntimePackageVersion>
91-
<MicrosoftWindowsDesktopAppRuntimePackageVersion>$(MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion)</MicrosoftWindowsDesktopAppRuntimePackageVersion>
95+
<MicrosoftNETCoreAppHostPackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</MicrosoftNETCoreAppHostPackageVersion>
96+
<MicrosoftNETCoreAppRuntimePackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</MicrosoftNETCoreAppRuntimePackageVersion>
97+
<MicrosoftAspNetCoreAppRuntimePackageVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</MicrosoftAspNetCoreAppRuntimePackageVersion>
98+
<MicrosoftWindowsDesktopAppRuntimePackageVersion>$(MicrosoftWindowsDesktopAppRefPackageVersion)</MicrosoftWindowsDesktopAppRuntimePackageVersion>
9299

93100
<HostFxrVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</HostFxrVersion>
94101
<SharedHostVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</SharedHostVersion>

Directory.Build.targets

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
Condition="'$(RunTestsAsTool)' == 'true' And '$(CanRunTestAsTool)' == 'true'"/>
5555

5656
<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
57-
<!-- We cannot use live shims when building tool packs in VMR - only package for current arch is available. -->
57+
<!-- Don't use live shims when building tool packs in .NET product build mode as only packages for the current arch are available. -->
5858
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
5959
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
6060
and '$(MSBuildProjectName)' != 'sdk-tasks'
@@ -78,4 +78,33 @@
7878
</KnownFrameworkReference>
7979
</ItemGroup>
8080

81+
<!--
82+
Common content for all SDK source packages.
83+
-->
84+
85+
<PropertyGroup Condition="'$(IsSourcePackage)' == 'true'">
86+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_AddEditorConfigToSourcePackage;_AddLinkedCompileItemsToSourcePackage</TargetsForTfmSpecificContentInPackage>
87+
<PackageDescription>
88+
$(PackageDescription)
89+
90+
The source code included in this package is subject to arbitrary changes in future versions.
91+
Updating a reference to this package to a newer version of the package may require changes in the referencing project.
92+
No compatibility guarantees are provided.
93+
</PackageDescription>
94+
</PropertyGroup>
95+
96+
<!-- Include SourcePackage.editorconfig in all source packages. -->
97+
<Target Name="_AddEditorConfigToSourcePackage">
98+
<ItemGroup>
99+
<TfmSpecificPackageFile Include="$(MSBuildThisFileDirectory)eng\SourcePackage.editorconfig" PackagePath="contentFiles/cs/$(TargetFramework)/.editorconfig" />
100+
</ItemGroup>
101+
</Target>
102+
103+
<!-- Include linked files. Arcade SDK only includes files in the project directory. -->
104+
<Target Name="_AddLinkedCompileItemsToSourcePackage">
105+
<ItemGroup>
106+
<TfmSpecificPackageFile Include="@(Compile)" Condition="'%(Compile.Link)' != ''" PackagePath="contentFiles/cs/$(TargetFramework)/%(Compile.Link)" BuildAction="Compile"/>
107+
</ItemGroup>
108+
</Target>
109+
81110
</Project>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Visibility|All jobs|
2020
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.
2121

2222
- [Official builds](https://dotnet.microsoft.com/download/dotnet)
23-
- [**.NET SDK latest builds table**](documentation/package-table.md)
23+
- [**.NET SDK latest builds table**](https://github.com/dotnet/dotnet/blob/main/docs/builds-table.md)
2424

2525
> [!NOTE]
2626
> When acquiring installers from the .NET SDK latest builds table, be aware that the installers are the **latest bits**. 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/nuget/consume-packages/configuring-nuget-behavior) for more information on where to modify your NuGet.config to apply the changes.

build/RunTestTemplateTests.ps1

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<#
2+
.SYNOPSIS
3+
Runs Microsoft.TestTemplates.Acceptance.Tests.dll in the dogfood environment.
4+
.DESCRIPTION
5+
This script enters the dogfood environment and runs the RunTestTemplateTests tests.
6+
#>
7+
[CmdletBinding(PositionalBinding=$false)]
8+
Param(
9+
[string] $configuration = "Release"
10+
)
11+
12+
function Run-TestTemplateTests {
13+
$ErrorActionPreference = 'Stop'
14+
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
15+
$classNameFilter = "--filter"
16+
$filterValue = "FullyQualifiedName~Microsoft.DotNet.Cli.New.IntegrationTests.DotnetNewTestTemplatesTests"
17+
$TestDll = Join-Path $RepoRoot "artifacts\bin\dotnet-new.IntegrationTests\$configuration\dotnet-new.IntegrationTests.dll"
18+
19+
# Check if the test DLL exists
20+
if (-not (Test-Path $TestDll)) {
21+
Write-Error "Test DLL not found at: $TestDll"
22+
return 1
23+
}
24+
25+
Write-Host "Running tests for test templates in the dogfood environment..." -ForegroundColor Cyan
26+
27+
# Call dogfood.ps1 directly instead of through dogfood.cmd to avoid the -NoExit parameter
28+
$dogfoodPs1 = Join-Path $RepoRoot "eng\dogfood.ps1"
29+
30+
Write-Host "Executing: dotnet test $TestDll via dogfood environment" -ForegroundColor Gray
31+
# Pass the command directly to the dogfood.ps1 script
32+
& $dogfoodPs1 -configuration $configuration -command @("dotnet", "test", $TestDll, $classNameFilter, $filterValue)
33+
34+
$exitCode = $LASTEXITCODE
35+
if ($exitCode -ne 0) {
36+
Write-Error "Tests failed with exit code: $exitCode"
37+
} else {
38+
Write-Host "Tests completed successfully!" -ForegroundColor Green
39+
}
40+
41+
return $exitCode
42+
}
43+
44+
# Execute the function using Invoke-Command
45+
$exitCode = Invoke-Command -ScriptBlock ${function:Run-TestTemplateTests}
46+
exit $exitCode

documentation/general/dotnet-run-file.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ We call these *file-based programs* (as opposed to *project-based programs*).
77
dotnet run file.cs
88
```
99

10+
See also [IDE spec](https://github.com/dotnet/roslyn/blob/main/docs/features/file-based-programs-vscode.md).
11+
1012
## Motivation
1113

1214
File-based programs
@@ -71,7 +73,7 @@ Internally, the SDK CLI detects entry points by parsing all `.cs` files in the d
7173
and checking which ones contain top-level statements (`Main` methods are not supported for now as that would require full semantic analysis, not just parsing).
7274
Results of this detection are used to exclude other entry points from [builds](#multiple-entry-points) and [app directive collection](#directives-for-project-metadata).
7375
This means the CLI might consider a file to be an entry point which later the compiler doesn't
74-
(for example because its top-level statements are under `#if SYMBOL` and the build has `DefineConstants=SYMBOL`).
76+
(for example because its top-level statements are under `#if !SYMBOL` and the build has `DefineConstants=SYMBOL`).
7577
However such inconsistencies should be rare and hence that is a better trade off than letting the compiler decide which files are entry points
7678
because that could require multiple builds (first determine entry points and then re-build with app directives except those from other entry points).
7779
To avoid parsing all C# files twice (in CLI and in the compiler), the CLI could use the compiler server for parsing so the trees are reused

0 commit comments

Comments
 (0)