Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/dotnet/sdk into dev/Jason/M…
Browse files Browse the repository at this point in the history
…erge-the-net10-codeflows
  • Loading branch information
v-wuzhai committed Sep 12, 2024
2 parents 3b2b819 + 97644ed commit 54aaccf
Show file tree
Hide file tree
Showing 323 changed files with 13,181 additions and 10,019 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
inputs:
daysBeforeStale:
required: true
default: "2192"
default: "1827"
daysBeforeClose:
required: true
default: "30"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ cmake/

# Test results
**/*.trx
/TestResults
2 changes: 1 addition & 1 deletion .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ extends:
templateFolderName: templates-official
publishTaskPrefix: 1ES.
runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
locBranch: release/8.0.4xx
locBranch: release/9.0.1xx
${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}:
timeoutInMinutes: 90
windowsJobParameterSets:
Expand Down
4 changes: 2 additions & 2 deletions .vsts-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ stages:
parameters:
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals 1es-windows-2022-open
demands: ImageOverride -equals windows.vs2022.amd64.open
os: windows
helixTargetQueue: windows.amd64.vs2022.pre.open

Expand Down Expand Up @@ -69,4 +69,4 @@ stages:
timeoutInMinutes: 30

############### DOTNET-FORMAT ###############
- template: /eng/dotnet-format/dotnet-format-integration.yml
- template: /eng/dotnet-format/dotnet-format-integration.yml
7 changes: 2 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@
<ToolsetTargetFramework>$(SdkTargetFramework)</ToolsetTargetFramework>
<VisualStudioServiceTargetFramework>net8.0</VisualStudioServiceTargetFramework>

<!-- VS for Mac may run on a lower version of .NET than the SDK is targeting, but needs to load the resolvers. So the resolvers and dependencies
may target a lower version of .NET -->
<ResolverTargetFramework>net8.0</ResolverTargetFramework>
<!-- Source build does not need to worry about running on VS for Mac -->
<ResolverTargetFramework Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(SdkTargetFramework)</ResolverTargetFramework>
<!-- We used to have scenarios where the MSBuild host (VSMac) had an older .NET, but don't any more. -->
<ResolverTargetFramework>$(SdkTargetFramework)</ResolverTargetFramework>

<!-- NU1701 Disable implicit package target fallback, and disable warning for when we explicitly add it (currently needed for
Microsoft.ApplicationInsights) -->
Expand Down
1 change: 0 additions & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-aspire -->
<add key="darc-pub-dotnet-aspire-d304c5f" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-aspire-d304c5f6/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-aspire -->
<!-- Begin: Package sources from dotnet-aspnetcore -->
<!-- End: Package sources from dotnet-aspnetcore -->
Expand Down
2 changes: 1 addition & 1 deletion build/RunTestsOnHelix.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ set DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\d
set PATH=%DOTNET_ROOT%;%PATH%
set DOTNET_MULTILEVEL_LOOKUP=0
set TestFullMSBuild=%1
set BuildWithNetFrameworkHostedCompiler=false

set TestExecutionDirectory=%CD%\testExecutionDirectory
mkdir %TestExecutionDirectory%
Expand Down Expand Up @@ -38,6 +37,7 @@ REM We downloaded a special zip of files to the .nuget folder so add that as a s
dotnet nuget list source --configfile %TestExecutionDirectory%\nuget.config
PowerShell -ExecutionPolicy ByPass "dotnet nuget locals all -l | ForEach-Object { $_.Split(' ')[1]} | Where-Object{$_ -like '*cache'} | Get-ChildItem -Recurse -File -Filter '*.dat' | Measure"
dotnet nuget add source %DOTNET_ROOT%\.nuget --configfile %TestExecutionDirectory%\nuget.config
if exist %TestExecutionDirectory%\Testpackages dotnet nuget add source %TestExecutionDirectory%\Testpackages --name testpackages --configfile %TestExecutionDirectory%\nuget.config

dotnet nuget remove source dotnet6-transport --configfile %TestExecutionDirectory%\nuget.config
dotnet nuget remove source dotnet6-internal-transport --configfile %TestExecutionDirectory%\nuget.config
Expand Down
1 change: 1 addition & 0 deletions build/RunTestsOnHelix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dotnet new --debug:ephemeral-hive
# We downloaded a special zip of files to the .nuget folder so add that as a source
dotnet nuget list source --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget add source $DOTNET_ROOT/.nuget --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget add source $TestExecutionDirectory/Testpackages --configfile $TestExecutionDirectory/NuGet.config
#Remove feeds not needed for tests
dotnet nuget remove source dotnet6-transport --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget remove source dotnet6-internal-transport --configfile $TestExecutionDirectory/NuGet.config
Expand Down
4 changes: 2 additions & 2 deletions documentation/general/workloads/workload-diagnosis.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ _Installation rollback failed: Workload manifest dependency 'Microsoft.NET.Workl

## Diagnosing Issues With Installed Workloads

### Common Workload State Failrues
### Common Workload State Failures

1. Workload is not installed. Try running `dotnet workload restore`. If that does not work, try running `dotnet build -getItem:MissingWorkloadPack` to determine what workload packs are missing. Our workload detection logic could be wrong and you could need a different workload than we list. This call should provide the pack we need and file an issue in the SDK repo with this information.
_NETSDK1147: To build this project, the following workloads must be installed:_
2. You installed workloads previously but now your workload templates are missing (Aspire and MAUI templates are installed by the workloads). This could be because your workloads were installed correctly at some point in the past but are now out of sync.
1. You installed a new band of the SDK. Workloads are installed per band so installing a new SDK could lead to your workloads not working. [Workload versions](https://github.com/dotnet/designs/pull/294)s should improve that.
1. You installed a new band of the SDK. Workloads are installed per band so installing a new SDK could lead to your workloads not working. [Workload versions](https://github.com/dotnet/designs/pull/294) should improve that.
2. You installed a different workload from the dotnet CLI. We've improved this a few times but it's still possible to install a different workload which updates your workload manifests without updating your workloads. Please file a bug if this happens to you.
3. You install a new version of Visual Studio that doesn't have worklaods selected. Visual Studio should include all available workloads so make sure to select them in Visual Studio setup.

Expand Down
37 changes: 37 additions & 0 deletions documentation/project-docs/Localization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Localization
## Summary
The .NET SDK is translated into 14 languages. In our codebase, you can see the primary resx file lists the strings to be translated.

### Making changes
The local dev build automatically generates updates to the xlf files that contain the translations. You can see the UpdateXlf task in the binlog to see that in action.

When making string changes, update the resx, build, and check in all xlf file changes. Developers should never need to update the xlf files directly and should always rely on the local build for updates to those files. This will leave the files in english initially and they will get translated eventually.

For internal folks, see https://aka.ms/allaboutloc

### Loc issues
Never manually update the xlf file even if a translation is wrong. Report a bug instead.

External -- https://aka.ms/provide-feedback
Internal -- https://aka.ms/icxLocFeedback

### Loc Updates
These are triggered automatically by the loc system as new translations come in. We generally accept these unless we notice it removing translations.
https://github.com/dotnet/sdk/pulls?q=is%3Apr+author%3Adotnet-bot+onelocbuild

### Loc Builds
We typically only localize the primary development branch. We move to vNext once we get to RC1 and only then, localize all new strings introduced in that release. That way we can continue to add messages in the 4xx release of an SDK.

This is controlled https://github.com/dotnet/sdk/blob/main/eng/pipelines/templates/jobs/sdk-job-matrix.yml#L86 and requires a change both here and in the loc system to align branches.

### Translation directives
There are a ton of translations directives our localization system understands. Here are some of the most common in this repo:

#### Locking translations
If a string or partial string should not be translated, add `{Locked=""}` with the details in the appropriate resx files. If `{Locked}` is used the entire string is locked. This can be specified multiple times, each locking different sections.

#### Contextual comments
You can use `<comment>` elements inside the `<data>` tags to provide context to translators.

### String formatting constraints
You can use `{StrBegins=}`, `{StrContains=}` and `{StrEnds=}` to ensure that after translation the string contains the specified values
39 changes: 39 additions & 0 deletions documentation/project-docs/external-component-telemetry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Responsibly managing telemetry in external components

Many components are _delivered_ with or by the .NET SDK but want to collect and
manage telemetry. The SDK has telemetry collection mechanisms that may appear
attractive, but present down-sides for these authors.

This document clarifies some guidelines for authors of components that are consumed by the .NET SDK but want to own their own telemetry.

## Sending telemetry

### DO create and manage your own MSBuild Task for sending telemetry

This allows you to have full control over the telemetry you send, where it is
sent, and any PII masking requirements that are unique to your product.
Attempting to use the .NET SDK's `AllowEmptyTelemetry` mechanism is not
recommended for most internal partners and all external users. This is because
`AllowEmptyTelemetry`
* is allow-listed for known events only, so your telemetry will not be sent
* sends to the SDK's telemetry storage, which your team may not have access to
* is dependent on the SDK version the user uses, which may lag behind the latest available

### DO NOT use the MSBuild Engine telemetry APIs for logging telemetry

These APIs, while convenient, require the MSBuild Engine Host (`dotnet build`,
`msbuild.exe`, Visual Studio Project system) to have configured a telemetry
collector. This is not guaranteed to be the case for all users of your component,
and the collector configured may not send telemetry in the manner you expect, or
to destinations you expect.

## Managing telemetry

### DO adhere to the SDK telemetry opt-out

The SDK has an [opt out](https://learn.microsoft.com/dotnet/core/tools/telemetry#how-to-opt-out) mechanism for telemetry that all SDK-generated
telemetry should adhere to. When running in the context of the SDK that means your
telemetry should adhere to this signal as well. This opt-out mechanism is an
environment variable, but the default value of this variable changes for
Microsoft-authored and source-built SDKs. The SDK should provide a unified
mechanism for tooling authors to rely on instead of probing for this value.
21 changes: 14 additions & 7 deletions eng/ManualVersions.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@
Basically: In this file, choose the highest version when resolving merge conflicts.
-->
<PropertyGroup>
<MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>10.0.17763.34</MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>10.0.18362.34</MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>10.0.19041.34</MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_20348PackageVersion>10.0.20348.34</MicrosoftWindowsSDKNETRef10_0_20348PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>10.0.22000.34</MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_22621PackageVersion>10.0.22621.34</MicrosoftWindowsSDKNETRef10_0_22621PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_26100PackageVersion>10.0.26100.34</MicrosoftWindowsSDKNETRef10_0_26100PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>10.0.17763.39</MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>10.0.18362.39</MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>10.0.19041.39</MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_20348PackageVersion>10.0.20348.39</MicrosoftWindowsSDKNETRef10_0_20348PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>10.0.22000.39</MicrosoftWindowsSDKNETRef10_0_22000PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_22621PackageVersion>10.0.22621.39</MicrosoftWindowsSDKNETRef10_0_22621PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_26100PackageVersion>10.0.26100.39</MicrosoftWindowsSDKNETRef10_0_26100PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_17763PackageVersionNet6>10.0.17763.38</MicrosoftWindowsSDKNETRef10_0_17763PackageVersionNet6>
<MicrosoftWindowsSDKNETRef10_0_18362PackageVersionNet6>10.0.18362.38</MicrosoftWindowsSDKNETRef10_0_18362PackageVersionNet6>
<MicrosoftWindowsSDKNETRef10_0_19041PackageVersionNet6>10.0.19041.38</MicrosoftWindowsSDKNETRef10_0_19041PackageVersionNet6>
<MicrosoftWindowsSDKNETRef10_0_20348PackageVersionNet6>10.0.20348.38</MicrosoftWindowsSDKNETRef10_0_20348PackageVersionNet6>
<MicrosoftWindowsSDKNETRef10_0_22000PackageVersionNet6>10.0.22000.38</MicrosoftWindowsSDKNETRef10_0_22000PackageVersionNet6>
<MicrosoftWindowsSDKNETRef10_0_22621PackageVersionNet6>10.0.22621.38</MicrosoftWindowsSDKNETRef10_0_22621PackageVersionNet6>
<MicrosoftWindowsSDKNETRef10_0_26100PackageVersionNet6>10.0.26100.38</MicrosoftWindowsSDKNETRef10_0_26100PackageVersionNet6>
</PropertyGroup>

</Project>
Loading

0 comments on commit 54aaccf

Please sign in to comment.