Skip to content

Commit 89dc287

Browse files
committed
Merge branch 'main' of https://github.com/dotnet/templating into merge/release/9.0.3xx-to-main
2 parents 8fec3e9 + fd2db2b commit 89dc287

File tree

123 files changed

+1415
-788
lines changed

Some content is hidden

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

123 files changed

+1415
-788
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,12 @@ dotnet_diagnostic.IDE0022.severity = suggestion
198198
dotnet_diagnostic.IDE0028.severity = suggestion
199199
#Use auto-implemented property
200200
dotnet_diagnostic.IDE0032.severity = suggestion
201+
#Add accessibility modifiers
202+
dotnet_diagnostic.IDE0040.severity = suggestion
201203
#Use conditional expression for return
202204
dotnet_diagnostic.IDE0046.severity = suggestion
205+
#Remove unused private member
206+
dotnet_diagnostic.IDE0051.severity = suggestion
203207
#Remove unnecessary expression value
204208
dotnet_diagnostic.IDE0058.severity = suggestion
205209
#Add missing cases to switch expression
@@ -220,6 +224,8 @@ dotnet_diagnostic.IDE0300.severity = suggestion
220224
dotnet_diagnostic.IDE0301.severity = suggestion
221225
#Collection initialization can be simplified
222226
dotnet_diagnostic.IDE0305.severity = suggestion
227+
#Collection initialization can be simplified
228+
dotnet_diagnostic.IDE0306.severity = suggestion
223229

224230
# License header
225231
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.

.github/policies/breaking-change.yml

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: 12 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,21 @@
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>
3343
</PropertyGroup>
3444

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

Directory.Packages.props

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,31 @@
2727
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsLoggingAbstractionsPackageVersion)" />
2828
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="$(MicrosoftExtensionsLoggingConsolePackageVersion)" />
2929
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsLoggingPackageVersion)" />
30-
<PackageVersion Include="Microsoft.IO.Redist" Version="6.0.1" />
31-
<PackageVersion Include="System.Formats.Asn1" Version="$(SystemFormatsAsn1Version)" />
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. -->
3237
</ItemGroup>
3338

3439
<!-- External dependencies -->
3540
<ItemGroup>
36-
<PackageVersion Include="FakeItEasy" Version="8.0.0" />
37-
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
38-
<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" />
3944
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
4045
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
4146
<PackageVersion Include="Verify.DiffPlex" Version="3.0.0" />
4247
<PackageVersion Include="Verify.XUnit" Version="25.0.2" />
48+
<PackageVersion Include="XUnit" Version="$(XUnitVersion)" />
4349
<PackageVersion Include="xunit.abstractions" Version="2.0.3" />
4450
<!-- Xunit version is managed by Arcade. -->
4551
<PackageVersion Include="xunit.extensibility.execution" Version="$(XUnitVersion)" />
4652
</ItemGroup>
4753

48-
<!-- DotNetBuild overrides -->
54+
<!-- DotNetBuild overrides needed until https://github.com/dotnet/source-build/issues/4467 is implemented. -->
4955
<ItemGroup>
5056
<PackageVersion Update="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" Condition="'$(MicrosoftBuildFrameworkVersion)' != ''" />
5157
<PackageVersion Update="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCoreVersion)" Condition="'$(MicrosoftBuildUtilitiesCoreVersion)' != ''" />
@@ -57,5 +63,7 @@
5763
<PackageVersion Update="NuGet.Configuration" Version="$(NuGetConfigurationVersion)" Condition="'$(NuGetConfigurationVersion)' != ''" />
5864
<PackageVersion Update="NuGet.Credentials" Version="$(NuGetCredentialsVersion)" Condition="'$(NuGetCredentialsVersion)' != ''" />
5965
<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)' != ''" />
6068
</ItemGroup>
61-
</Project>
69+
</Project>

NuGet.config

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@
1414
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
1515
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
1616
<add key="dotnet9-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
17+
<add key="dotnet10" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json" />
18+
<add key="dotnet10-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-transport/nuget/v3/index.json" />
1719
</packageSources>
20+
<auditSources>
21+
<clear />
22+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
23+
</auditSources>
1824
<disabledPackageSources>
25+
<clear />
1926
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
2027
<!-- Begin: Package sources from dotnet-runtime -->
2128
<!-- 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: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ extends:
7878
enablePublishTestResults: true
7979
enablePublishBuildAssets: true
8080
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
81-
enableSourceBuild: false
81+
enableSourceBuild: true
8282
publishAssetsImmediately: true
8383
sourceBuildParameters:
8484
enableInternalSources: true
@@ -87,7 +87,7 @@ extends:
8787
templateContext:
8888
sdl:
8989
binskim:
90-
analyzeTargetGlob: +:f|artifacts\bin\**\*.dll;+:f|artifacts\bin\**\*.exe;
90+
analyzeTargetGlob: +:f|artifacts\bin\**\*.dll;+:f|artifacts\bin\**\*.exe;-:f|artifacts\bin\**\xunit*.dll;-:f|artifacts\bin\**\verify*.dll;
9191
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
9292
preSteps:
9393
- powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force
@@ -116,9 +116,6 @@ extends:
116116
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
117117
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
118118
steps:
119-
- checkout: self
120-
clean: true
121-
122119
# Use utility script to run script command dependent on agent OS.
123120
- script: eng/common/cibuild.cmd
124121
-configuration $(_BuildConfig)

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.

eng/Signing.props

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
</PropertyGroup>
66

77
<!--
8-
These are third party libraries that we use in Arcade. We need to sign them even if they
9-
are already signed. However, they must be signed with a 3rd party certificate.
8+
Arcade no longer signs so signing the test binaries used in arcade is no longer needed. Don't sign the test binaries.
109
-->
1110
<ItemGroup>
1211
<FileSignInfo Include="Argon.dll" CertificateName="3PartySHA2" />
@@ -16,8 +15,11 @@
1615
<FileSignInfo Include="Verify.dll" CertificateName="3PartySHA2" />
1716
<FileSignInfo Include="Verify.Xunit.dll" CertificateName="3PartySHA2" />
1817
<FileSignInfo Include="EmptyFiles.dll" CertificateName="3PartySHA2" />
19-
<FileSignInfo Include="FluentAssertions.dll" CertificateName="3PartySHA2" />
2018
<FileSignInfo Include="SimpleInfoName.dll" CertificateName="3PartySHA2" />
19+
<ItemsToSign Remove="$(ArtifactsNonShippingPackagesDir)**\Microsoft.TemplateEngine.Mocks.*.nupkg" />
20+
<ItemsToSign Remove="$(ArtifactsNonShippingPackagesDir)**\Microsoft.TemplateEngine.TestHelper.*.nupkg" />
21+
<ItemsToSign Remove="$(ArtifactsNonShippingPackagesDir)**\Microsoft.TemplateEngine.TestTemplates.*.nupkg" />
22+
<ItemsToSign Remove="$(ArtifactsNonShippingPackagesDir)**\Microsoft.TemplateSearch.TemplateDiscovery.*.nupkg" />
2123
</ItemGroup>
2224

2325
</Project>

eng/SourceBuildPrebuiltBaseline.xml

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

0 commit comments

Comments
 (0)