Skip to content

Commit fa017a3

Browse files
author
Simon Zhao (BEYONDSOFT CONSULTING INC)
committed
Merge branch 'release/10.0.1xx' of https://github.com/dotnet/templating into merge/release/9.0.3xx-to-release/10.0.1xx
2 parents cb70723 + 304a982 commit fa017a3

File tree

142 files changed

+2431
-1119
lines changed

Some content is hidden

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

142 files changed

+2431
-1119
lines changed

.editorconfig

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,12 @@ dotnet_diagnostic.IDE0022.severity = suggestion
202202
dotnet_diagnostic.IDE0028.severity = suggestion
203203
#Use auto-implemented property
204204
dotnet_diagnostic.IDE0032.severity = suggestion
205+
#Add accessibility modifiers
206+
dotnet_diagnostic.IDE0040.severity = suggestion
205207
#Use conditional expression for return
206208
dotnet_diagnostic.IDE0046.severity = suggestion
207209
#Remove unused private member
208210
dotnet_diagnostic.IDE0051.severity = suggestion
209-
#Remove unread private member
210-
dotnet_diagnostic.IDE0052.severity = suggestion
211211
#Remove unnecessary expression value
212212
dotnet_diagnostic.IDE0058.severity = suggestion
213213
#Add missing cases to switch expression
@@ -228,10 +228,8 @@ dotnet_diagnostic.IDE0300.severity = suggestion
228228
dotnet_diagnostic.IDE0301.severity = suggestion
229229
#Collection initialization can be simplified
230230
dotnet_diagnostic.IDE0305.severity = suggestion
231-
#Simplify collection initialization
231+
#Collection initialization can be simplified
232232
dotnet_diagnostic.IDE0306.severity = suggestion
233-
#Lambda expression can be simplified
234-
dotnet_diagnostic.IDE0350.severity = suggestion
235233

236234
# License header
237235
file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.
@@ -690,4 +688,4 @@ dotnet_analyzer_diagnostic.severity = none
690688
insert_final_newline = false
691689

692690
[test/**/{Approvals,Snapshots}/**]
693-
trim_trailing_whitespace = false
691+
trim_trailing_whitespace = false
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Automation in the `/.github/policies` folder is processed by the dotnet-policy-service app,
2+
# operated by the [microsoft1estools](https://github.com/microsoft1estools) team.
3+
# See https://github.com/apps/dotnet-policy-service for more info.
4+
id: breaking-change
5+
name: breaking-change
6+
description: When an issue or PR is labeled as a breaking change, add the label that a breaking change doc is needed, and comment with the breaking change process.
7+
owner:
8+
resource: repository
9+
disabled: false
10+
where:
11+
configuration:
12+
resourceManagementConfiguration:
13+
eventResponderTasks:
14+
- if:
15+
- payloadType: Issues
16+
- labelAdded:
17+
label: breaking-change
18+
then:
19+
- addReply:
20+
reply: >-
21+
Refer to the [.NET SDK breaking change guidelines](https://github.com/dotnet/sdk/blob/main/documentation/project-docs/breaking-change-guidelines.md#required-process-for-all-net-sdk-breaking-changes)
22+
description: Add breaking change doc instructions to issue
23+
- if:
24+
- payloadType: Pull_Request
25+
- labelAdded:
26+
label: breaking-change
27+
then:
28+
- addLabel:
29+
label: needs-breaking-change-doc-created
30+
- addReply:
31+
reply: >-
32+
Added `needs-breaking-change-doc-created` label because this PR has the `breaking-change` label.
33+
34+
35+
When you commit this breaking change:
36+
37+
38+
1. [ ] Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the [breaking change documentation template](https://aka.ms/dotnet/docs/new-breaking-change-issue), then remove this `needs-breaking-change-doc-created` label.
39+
40+
2. [ ] Ask a committer to mail the `.NET SDK Breaking Change Notification` email list.
41+
42+
43+
You can refer to the [.NET SDK breaking change guidelines](https://github.com/dotnet/sdk/blob/main/documentation/project-docs/breaking-change-guidelines.md)
44+
description: Add breaking change instructions to PR.
45+
onFailure:
46+
onSuccess:

Directory.Build.props

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<Product>Microsoft .NET</Product>
88
<Copyright>$(CopyrightNetFoundation)</Copyright>
99
<PackageLicenseExpression>MIT</PackageLicenseExpression>
10+
<PackageProjectUrl>https://github.com/dotnet/templating</PackageProjectUrl>
1011
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1112
<NoWarn>$(NoWarn);NU5105;NU5128;NU5100;NU5118;0419,0649</NoWarn>
1213
<EnableNETAnalyzers>true</EnableNETAnalyzers>
@@ -24,12 +25,23 @@
2425
<TemplateEnginePublicKey>0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb</TemplateEnginePublicKey>
2526
<DynamicProxyGenAssembly2PublicKey>0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7</DynamicProxyGenAssembly2PublicKey>
2627

28+
<!-- Only upgrade NuGetAudit warnings to errors for official builds. -->
29+
<WarningsNotAsErrors Condition="'$(OfficialBuild)' != 'true'">$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
30+
2731
<EnableAnalyzers>true</EnableAnalyzers>
2832
<!-- Disable analyzers in sourcebuild -->
2933
<EnableAnalyzers Condition="'$(DotNetBuildSourceOnly)' == 'true'">false</EnableAnalyzers>
3034

31-
<!-- Make packages target net472 instead of net481 for compatibility with the msbuild task package. -->
32-
<NetFrameworkCurrent>net472</NetFrameworkCurrent>
35+
<!-- Enable reproducible build per binskim -->
36+
<Deterministic>true</Deterministic>
37+
38+
<!-- The minimum .NET Framework version supported by templating packages. -->
39+
<NetFrameworkMinimum>net472</NetFrameworkMinimum>
40+
41+
<!-- Only build the latest .NETCoreApp TFM when building source-only. -->
42+
<NetMinimum Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(NetCurrent)</NetMinimum>
43+
44+
<PublishWindowsPdb>false</PublishWindowsPdb>
3345
</PropertyGroup>
3446

3547
<ItemGroup Condition="'$(EnableAnalyzers)' == 'true'">

Directory.Packages.props

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,54 @@
1616
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.8.3" />
1717

1818
<!-- NuGet dependencies -->
19-
<PackageVersion Include="NuGet.Configuration" Version="$(NuGetConfigurationVersion)" />
20-
<PackageVersion Include="NuGet.Credentials" Version="$(NuGetCredentialsVersion)" />
21-
<PackageVersion Include="NuGet.Protocol" Version="$(NuGetProtocolVersion)" />
19+
<PackageVersion Include="NuGet.Configuration" Version="6.13.2" />
20+
<PackageVersion Include="NuGet.Credentials" Version="6.13.2" />
21+
<PackageVersion Include="NuGet.Protocol" Version="6.13.2" />
2222

2323
<!-- Roslyn-analyzers dependencies -->
2424
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" />
2525

2626
<!-- Runtime dependencies -->
27-
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsLoggingAbstractionsVersion)" />
28-
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="$(MicrosoftExtensionsLoggingConsoleVersion)" />
29-
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsLoggingVersion)" />
30-
<PackageVersion Include="Microsoft.IO.Redist" Version="6.0.1" />
31-
<PackageVersion Include="System.Formats.Asn1" Version="$(SystemFormatsAsn1Version)" />
32-
<PackageVersion Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
27+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsLoggingAbstractionsPackageVersion)" />
28+
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="$(MicrosoftExtensionsLoggingConsolePackageVersion)" />
29+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsLoggingPackageVersion)" />
30+
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="$(MicrosoftBclAsyncInterfacesPackageVersion)" />
31+
<PackageVersion Include="Microsoft.IO.Redist" Version="6.0.1" /> <!-- Pin transitive dependency to avoid vulnerable 6.0.0 version. -->
32+
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourcePackageVersion)" />
33+
<PackageVersion Include="System.Formats.Asn1" Version="8.0.1" /> <!-- Pin transitive dependency to avoid vulnerable 8.0.0 version. -->
34+
<PackageVersion Include="System.IO.Pipelines" Version="$(SystemIOPipelinesPackageVersion)" />
35+
<PackageVersion Include="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebPackageVersion)" />
36+
<PackageVersion Include="System.Text.Json" Version="$(SystemTextJsonPackageVersion)" /> <!-- Pin transitive dependency to avoid vulnerable 8.0.0 version. -->
3337
</ItemGroup>
3438

3539
<!-- External dependencies -->
3640
<ItemGroup>
37-
<PackageVersion Include="FakeItEasy" Version="8.0.0" />
38-
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
39-
<PackageVersion Include="Newtonsoft.Json.Schema" Version="3.0.15" />
41+
<PackageVersion Include="FakeItEasy" Version="8.1.0" />
42+
<PackageVersion Include="AwesomeAssertions" Version="8.0.2" />
43+
<PackageVersion Include="Newtonsoft.Json.Schema" Version="4.0.1" />
4044
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
4145
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
4246
<PackageVersion Include="Verify.DiffPlex" Version="3.0.0" />
4347
<PackageVersion Include="Verify.XUnit" Version="25.0.2" />
48+
<PackageVersion Include="XUnit" Version="$(XUnitVersion)" />
4449
<PackageVersion Include="xunit.abstractions" Version="2.0.3" />
4550
<!-- Xunit version is managed by Arcade. -->
4651
<PackageVersion Include="xunit.extensibility.execution" Version="$(XUnitVersion)" />
4752
</ItemGroup>
4853

49-
<!-- DotNetBuild overrides -->
54+
<!-- Overrides needed until https://github.com/dotnet/source-build/issues/4467 is implemented. -->
5055
<ItemGroup>
5156
<PackageVersion Update="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" Condition="'$(MicrosoftBuildFrameworkVersion)' != ''" />
5257
<PackageVersion Update="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCoreVersion)" Condition="'$(MicrosoftBuildUtilitiesCoreVersion)' != ''" />
5358
<PackageVersion Update="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="$(MicrosoftCodeAnalysisPublicApiAnalyzersVersion)" Condition="'$(MicrosoftCodeAnalysisPublicApiAnalyzersVersion)' != ''" />
59+
<PackageVersion Update="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsLoggingAbstractionsVersion)" Condition="'$(MicrosoftExtensionsLoggingAbstractionsVersion)' != ''" />
60+
<PackageVersion Update="Microsoft.Extensions.Logging.Console" Version="$(MicrosoftExtensionsLoggingConsoleVersion)" Condition="'$(MicrosoftExtensionsLoggingConsoleVersion)' != ''" />
61+
<PackageVersion Update="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsLoggingVersion)" Condition="'$(MicrosoftExtensionsLoggingVersion)' != ''" />
5462
<PackageVersion Update="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" Condition="'$(NewtonsoftJsonVersion)' != ''" />
63+
<PackageVersion Update="NuGet.Configuration" Version="$(NuGetConfigurationVersion)" Condition="'$(NuGetConfigurationVersion)' != ''" />
64+
<PackageVersion Update="NuGet.Credentials" Version="$(NuGetCredentialsVersion)" Condition="'$(NuGetCredentialsVersion)' != ''" />
65+
<PackageVersion Update="NuGet.Protocol" Version="$(NuGetProtocolVersion)" Condition="'$(NuGetProtocolVersion)' != ''" />
66+
<PackageVersion Update="System.Formats.Asn1" Version="$(SystemFormatsAsn1Version)" Condition="'$(SystemFormatsAsn1Version)' != ''" />
67+
<PackageVersion Update="System.Text.Json" Version="$(SystemTextJsonVersion)" Condition="'$(SystemTextJsonVersion)' != ''" />
5568
</ItemGroup>
56-
</Project>
69+
</Project>

NuGet.config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<packageSources>
44
<clear />
55
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
6+
<!-- Begin: Package sources from dotnet-dotnet -->
7+
<add key="darc-pub-dotnet-dotnet-862de94" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-862de94f/nuget/v3/index.json" />
8+
<!-- End: Package sources from dotnet-dotnet -->
69
<!-- Begin: Package sources from dotnet-runtime -->
710
<!-- End: Package sources from dotnet-runtime -->
811
<!-- Begin: Package sources from dotnet-templating -->
@@ -14,8 +17,15 @@
1417
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
1518
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
1619
<add key="dotnet9-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
20+
<add key="dotnet10" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json" />
21+
<add key="dotnet10-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-transport/nuget/v3/index.json" />
1722
</packageSources>
23+
<auditSources>
24+
<clear />
25+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
26+
</auditSources>
1827
<disabledPackageSources>
28+
<clear />
1929
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
2030
<!-- Begin: Package sources from dotnet-runtime -->
2131
<!-- End: Package sources from dotnet-runtime -->

azure-pipelines-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ stages:
5151
enablePublishTestResults: true
5252
enablePublishBuildAssets: true
5353
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
54-
enableSourceBuild: false
54+
enableSourceBuild: true
5555
sourceBuildParameters:
5656
enableInternalSources: true
5757
enableTelemetry: true

azure-pipelines.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extends:
8181
enablePublishTestResults: true
8282
enablePublishBuildAssets: true
8383
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
84-
enableSourceBuild: false
84+
enableSourceBuild: true
8585
publishAssetsImmediately: true
8686
sourceBuildParameters:
8787
enableInternalSources: true
@@ -90,7 +90,7 @@ extends:
9090
templateContext:
9191
sdl:
9292
binskim:
93-
analyzeTargetGlob: +:f|artifacts\bin\**\*.dll;+:f|artifacts\bin\**\*.exe;
93+
analyzeTargetGlob: +:f|artifacts\bin\**\*.dll;+:f|artifacts\bin\**\*.exe;-:f|artifacts\bin\**\xunit*.dll;-:f|artifacts\bin\**\verify*.dll;
9494
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
9595
preSteps:
9696
- powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force
@@ -119,10 +119,8 @@ extends:
119119
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
120120
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
121121
steps:
122-
- checkout: self
123-
clean: true
124-
125122
# Use utility script to run script command dependent on agent OS.
123+
- template: /eng/common/templates-official/steps/enable-internal-sources.yml@self
126124
- script: eng/common/cibuild.cmd
127125
-configuration $(_BuildConfig)
128126
-prepareMachine
@@ -140,6 +138,7 @@ extends:
140138
- _BuildConfig: ${{ config.buildConfig }}
141139
- _SignType: none
142140
steps:
141+
- template: /eng/common/templates-official/steps/enable-internal-sources.yml@self
143142
- script: eng/common/cibuild.sh
144143
--configuration $(_BuildConfig)
145144
--prepareMachine
@@ -164,6 +163,7 @@ extends:
164163
- _BuildConfig: ${{ config.buildConfig }}
165164
- _SignType: none
166165
steps:
166+
- template: /eng/common/templates-official/steps/enable-internal-sources.yml@self
167167
- script: eng/common/cibuild.sh
168168
--configuration $(_BuildConfig)
169169
--prepareMachine

docs/Available-templates-for-dotnet-new.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Below is a list of selected NuGet.org templates which are available for use with
2424
| Name | Quick Install |
2525
|----------|:--------------|
2626
| [.NET Boxed](https://github.com/Dotnet-Boxed/Templates) | `dotnet new install "Boxed.Templates"`|
27-
| [Auth0 Templates](https://github.com/auth0/auth0-dotnet-templates) | `dotnet new install Auth0.Templates::2.0.0"` |
27+
| [Auth0 Templates](https://github.com/auth0/auth0-dotnet-templates) | `dotnet new install Auth0.Templates` |
2828
| [AWS Lambda .NET Core Templates](https://github.com/aws/aws-lambda-dotnet/tree/master/Blueprints) | `dotnet new install "Amazon.Lambda.Templates"`|
2929
| [Avalonia UI Templates](https://github.com/AvaloniaUI/Avalonia) - Avalonia is a framework for creating cross platform UI | `dotnet new install "Avalonia.Templates"`|
3030
| [Blazor](http://blazor.net) - Full stack web development with C# and WebAssembly | `dotnet new install "Microsoft.AspNetCore.Blazor.Templates::3.0.0-*"`|

docs/Binding-and-project-context-evaluation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Example - binds `DefaultNamespace` symbol to `RootNamespace` of the project:
8484

8585
Visual Studio supports binding to host parameters, environment variables and MSBuild properties.
8686
In addition to that, there is additional `context` source supporting:
87-
- `context:cratesolutiondirectory` - indicates whether a solution directory is to be created as a result of project creation (Place solution and project in same directory is UNCHECKED in NPD).
87+
- `context:createsolutiondirectory` - indicates whether a solution directory is to be created as a result of project creation (Place solution and project in same directory is UNCHECKED in NPD).
8888
- `context:isexclusive` - indicates whether the template instantiation is a result of a new project being created (true) vs result of adding to an existing solution (false).
8989
- `context:solutionname` - the name of the solution, which may be different from the project name.
9090

@@ -99,4 +99,4 @@ or
9999
```json
100100
"type": "bind"
101101
"binding": "host:namespace"
102-
```
102+
```

eng/DotNetBuild.props

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)