Skip to content

Commit 60bd0a9

Browse files
authored
Merge branch 'main' into merge/vs17.7-to-main
2 parents d6990bc + 5e535b6 commit 60bd0a9

File tree

285 files changed

+5068
-5231
lines changed

Some content is hidden

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

285 files changed

+5068
-5231
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ dotnet_analyzer_diagnostic.category-Style.severity = warning
210210
dotnet_diagnostic.IDE0004.severity = suggestion
211211

212212
# IDE0005: Remove unnecessary usings/imports
213-
dotnet_diagnostic.IDE0005.severity = warning
213+
dotnet_diagnostic.IDE0005.severity = none
214214

215215
# Use explicit type instead of 'var'
216216
dotnet_diagnostic.IDE0008.severity = suggestion

.vsts-dotnet-ci.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,4 @@ jobs:
234234
continueOnError: true
235235
condition: always()
236236

237-
- template: /eng/common/templates/job/source-build.yml
238-
parameters:
239-
platform:
240-
name: 'Managed'
241-
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7'
237+
- template: /eng/common/templates/jobs/source-build.yml

.vsts-dotnet.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,19 +265,15 @@ stages:
265265
- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
266266
displayName: Execute cleanup tasks
267267
condition: succeededOrFailed()
268-
268+
269269
- template: /eng/common/templates/steps/component-governance.yml
270270
parameters:
271271
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/vs'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
272272
disableComponentGovernance: false
273273
${{ else }}:
274274
disableComponentGovernance: true
275275

276-
- template: /eng/common/templates/job/source-build.yml
277-
parameters:
278-
platform:
279-
name: 'Managed'
280-
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7'
276+
- template: /eng/common/templates/jobs/source-build.yml
281277

282278
- template: /eng/common/templates/job/publish-build-assets.yml
283279
parameters:

Directory.Build.props

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,8 @@
2424
scripts/Deploy-MSBuild.ps1
2525
src/Framework/README.md
2626
src/Utilities/README.md
27-
28-
Special-case while MSBuild uses Arcade 6 to build: 17.7 should
29-
continue to target .NET 7, so bump a 6 here to 7.
3027
-->
3128
<LatestDotNetCoreForMSBuild>$(NetCurrent)</LatestDotNetCoreForMSBuild>
32-
<LatestDotNetCoreForMSBuild Condition=" '$(NetCurrent)' == 'net6.0' ">net7.0</LatestDotNetCoreForMSBuild>
3329
</PropertyGroup>
3430

3531
<PropertyGroup>
@@ -47,6 +43,14 @@
4743
<PropertyGroup>
4844
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
4945

46+
<!--
47+
Serialization/Deserialization of BinaryFormatter throws out System.NotSupportedException with latest .NET.
48+
To work around temporarily add this property. The issues below are tracking this problem.
49+
https://github.com/dotnet/msbuild/issues/9051
50+
https://github.com/dotnet/msbuild/issues/8823
51+
-->
52+
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
53+
5054
<!--
5155
NU1507: ManagePackageVersionsCentrally implies source mapping, which we should consider turning on but it's nontrivial
5256
NU1603: Microsoft.xunit.netcore.extensions package has dependencies to versions which aren't published, so ignore those warnings

NuGet.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
77
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
88
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
9+
<add key="msbuild17.7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-DotNet-msbuild-Trusted-5785ed5c/nuget/v3/index.json" />
910
</packageSources>
1011
<disabledPackageSources />
1112
</configuration>

documentation/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The folder contains collection of docs and references for MSBuild, detailed info
7474
### Logging
7575

7676
* [Binary log](wiki/Binary-Log.md)
77-
* [Live logger: how to opt in](livelogger/Opt-In-Mechanism.md)
77+
* [Terminal logger: how to opt in](terminallogger/Opt-In-Mechanism.md)
7878

7979
## Archived Designs
8080
* [Resolve Assembly Reference as a service](specs/rar-as-service.md)

documentation/livelogger/Opt-In-Mechanism.md

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# TerminalLogger Opt-in
2+
3+
## When should we use TerminalLogger
4+
5+
The TerminalLogger presents the user with the build's most relevant information at the time, automatically hiding all the information that is no longer relevant (as to prevent huge log outputs). However, many users might find this not very useful (or even counterproductive) such as those using a terminal without proper ANSI support or when redirecting the output to a file. For that reason, the users must be able to turn this feature on/off at will.
6+
7+
## Proposal
8+
9+
### Enabling for a single build
10+
11+
Using the `/terminallogger` or `/tl` command line switches, users are able to opt-in and use the TerminalLogger, EXCEPT when:
12+
13+
- The terminal does not support ANSI codes or color
14+
- Output is redirected to a file or pipe
15+
16+
### Enabling for all builds
17+
18+
Users can set the `MSBUILDTERMINALLOGGER` environment variable to enable TerminalLogger without adding a swtich to all build invocations.
19+
20+
### TerminalLogger parameters
21+
22+
Both methods accept parameters:
23+
24+
- `true` forces TerminalLogger to be used even wwhen it would be disabled
25+
- `false` forces TerminalLogger to not be used even when it would be enabled
26+
- `auto` enables TerminalLogger when the terminal supports it and the session doesn't have redirected stdout/stderr
27+
28+
In cases where the TerminalLogger should not be enabled, the default ConsoleLogger should be used instead.
29+
30+
## Considerations
31+
32+
### Should TerminalLogger be used with other loggers (eg, BinaryLogger, FileLogger, custom loggers)?
33+
34+
TerminalLogger should only replace the current ConsoleLogger for the aforementioned cases. Additionally, other loggers can be used in conjunction.
35+
36+
### Should output be ignored with the `/noconsolelogger` flag enabled?
37+
38+
TerminalLogger serves as a replacement for ConsoleLogger, so it should behave similarly. When attaching the `/noconsolelogger` flag, it should not output anything.

documentation/wiki/ChangeWaves.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ A wave of features is set to "rotate out" (i.e. become standard functionality) t
2727
- [[RAR] Don't do I/O on SDK-provided references](https://github.com/dotnet/msbuild/pull/8688)
2828
- [Delete destination file before copy](https://github.com/dotnet/msbuild/pull/8685)
2929
- [New serialization approach for transferring build exceptions between processes](https://github.com/dotnet/msbuild/pull/8779)
30+
- [Moving from SHA1 to SHA256 for Hash task](https://github.com/dotnet/msbuild/pull/8812)
3031

3132
### 17.6
3233
- [Parse invalid property under target](https://github.com/dotnet/msbuild/pull/8190)

eng/BootStrapMSBuild.targets

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@
3333
<Target Name="GatherNuGetDependencies" AfterTargets="ResolvePackageAssets">
3434
<ItemGroup>
3535
<!-- Collect known NuGet dependencies after resolving packages -->
36-
<_NuGetRuntimeDependencies Include="%(RuntimeCopyLocalItems.Identity)" Condition="'@(RuntimeCopyLocalItems->Contains('NuGet.'))' == 'True'" />
37-
<_NuGetRuntimeDependencies Include="%(RuntimeCopyLocalItems.Identity)" Condition="'@(RuntimeCopyLocalItems->Contains('Newtonsoft.Json'))' == 'True'" />
38-
<_NuGetRuntimeDependencies Include="%(RuntimeCopyLocalItems.Identity)" Condition="'@(RuntimeCopyLocalItems->Contains('NuGetSdkResolver'))' == 'True'" />
39-
<_NuGetRuntimeDependencies Include="%(RuntimeCopyLocalItems.Identity)" Condition="'@(RuntimeCopyLocalItems->Contains('Microsoft.Extensions.'))' == 'True'" />
36+
<_NuGetRuntimeDependencies Include="%(RuntimeCopyLocalItems.Identity)" Condition="'@(RuntimeCopyLocalItems->Contains('NuGet.'))' == 'true'" />
37+
<_NuGetRuntimeDependencies Include="%(RuntimeCopyLocalItems.Identity)" Condition="'@(RuntimeCopyLocalItems->Contains('Newtonsoft.Json'))' == 'true'" />
38+
<_NuGetRuntimeDependencies Include="%(RuntimeCopyLocalItems.Identity)" Condition="'@(RuntimeCopyLocalItems->Contains('NuGetSdkResolver'))' == 'true'" />
39+
<_NuGetRuntimeDependencies Include="%(RuntimeCopyLocalItems.Identity)" Condition="'@(RuntimeCopyLocalItems->Contains('Microsoft.Extensions.'))' == 'true'" />
4040

4141
<!-- NuGet.targets and NuGet.RestoreEx.targets will be in the RuntimeTargetsCopyLocalItems ItemGroup -->
42-
<_NuGetRuntimeDependencies Include="%(RuntimeTargetsCopyLocalItems.Identity)" Condition="'@(RuntimeTargetsCopyLocalItems->Contains('NuGet.'))' == 'True'" />
42+
<_NuGetRuntimeDependencies Include="%(RuntimeTargetsCopyLocalItems.Identity)" Condition="'@(RuntimeTargetsCopyLocalItems->Contains('NuGet.'))' == 'true'" />
4343

4444
<!-- NuGet.Build.Tasks.Console.exe will be in the None ItemGroup -->
45-
<_NuGetRuntimeDependencies Include="%(None.Identity)" Condition="'@(None->Contains('NuGet.'))' == 'True'" />
45+
<_NuGetRuntimeDependencies Include="%(None.Identity)" Condition="'@(None->Contains('NuGet.'))' == 'true'" />
4646

4747
<_NuGetRuntimeDependencies Include="$(DOTNET_INSTALL_DIR)\sdk\$(DotNetCliVersion)\RuntimeIdentifierGraph.json" />
4848
</ItemGroup>
@@ -56,11 +56,11 @@
5656
need to be in a specific location that does not mesh with NuGet. To resolve this, we include the default
5757
PackageReference assets but will remove them from the Reference ItemGroup before RAR runs and avoid the warnings -->
5858
<ItemGroup>
59-
<Reference Remove="%(Reference.Identity)" Condition="'@(Reference->Contains('Microsoft.Build'))' == 'True'" />
60-
<Reference Remove="%(Reference.Identity)" Condition="'@(Reference->Contains('NuGet.'))' == 'True'" />
61-
<Reference Remove="%(Reference.Identity)" Condition="'@(Reference->Contains('Newtonsoft.Json'))' == 'True'" />
62-
<Reference Remove="%(Reference.Identity)" Condition="'@(Reference->Contains('NuGetSdkResolver'))' == 'True'" />
63-
<Reference Remove="%(Reference.Identity)" Condition="'@(Reference->Contains('Microsoft.Extensions.'))' == 'True'" />
59+
<Reference Remove="%(Reference.Identity)" Condition="'@(Reference->Contains('Microsoft.Build'))' == 'true'" />
60+
<Reference Remove="%(Reference.Identity)" Condition="'@(Reference->Contains('NuGet.'))' == 'true'" />
61+
<Reference Remove="%(Reference.Identity)" Condition="'@(Reference->Contains('Newtonsoft.Json'))' == 'true'" />
62+
<Reference Remove="%(Reference.Identity)" Condition="'@(Reference->Contains('NuGetSdkResolver'))' == 'true'" />
63+
<Reference Remove="%(Reference.Identity)" Condition="'@(Reference->Contains('Microsoft.Extensions.'))' == 'true'" />
6464
</ItemGroup>
6565
</Target>
6666

@@ -246,6 +246,9 @@
246246
<Copy SourceFiles="$(RepoRoot)src\MSBuild.Bootstrap\RedirectNuGetConsoleProcess.After.Microsoft.Common.targets"
247247
DestinationFolder="$(BootstrapDestination)\Current\Microsoft.Common.targets\ImportAfter" />
248248

249+
<Copy SourceFiles="$(RepoRoot)src\MSBuild.Bootstrap\RedirectNuGetConsoleProcess.After.Microsoft.Common.targets"
250+
DestinationFolder="$(BootstrapDestination)\Current\SolutionFile\ImportAfter" />
251+
249252
<!-- Disable workload resolver until we can figure out whether it can work in the bootstrap
250253
https://github.com/dotnet/msbuild/issues/6566 -->
251254
<Touch Files="$(BootstrapDestination)\DisableWorkloadResolver.sentinel" AlwaysCreate="true" />

0 commit comments

Comments
 (0)