Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths.
# See https://help.github.com/articles/about-code-owners/

/eng/SourceBuild* @dotnet/source-build-internal
/eng/ @dotnet/kitten
/.github/ @dotnet/kitten
/global.json @dotnet/kitten
/.exp-insertions.yml @dotnet/kitten
/.opt-prof.yml @dotnet/kitten
/.vsts-dotnet-ci.yml @dotnet/kitten
/.vsts-dotnet.yml @dotnet/kitten
/NuGet.config @dotnet/kitten
/Directory.Build* @dotnet/kitten
/.git* @dotnet/kitten
2 changes: 0 additions & 2 deletions .vsts-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ stages:
value: 'int.main'
- name: VisualStudio.DropName
value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)
- name: NUGET_PACKAGES
value:

steps:
- task: NuGetToolInstaller@0
Expand Down
1 change: 1 addition & 0 deletions documentation/wiki/ChangeWaves.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ A wave of features is set to "rotate out" (i.e. become standard functionality) t
- [Cache SDK resolver data process-wide](https://github.com/dotnet/msbuild/pull/9335)
- [Target parameters will be unquoted](https://github.com/dotnet/msbuild/pull/9452), meaning the ';' symbol in the parameter target name will always be treated as separator
- [Change Version switch output to finish with a newline](https://github.com/dotnet/msbuild/pull/9485)
- [Load Microsoft.DotNet.MSBuildSdkResolver into default load context (MSBuild.exe only)](https://github.com/dotnet/msbuild/pull/9439)

### 17.8
- [[RAR] Don't do I/O on SDK-provided references](https://github.com/dotnet/msbuild/pull/8688)
Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23463.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23580.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1d451c32dda2314c721adbf8829e1c0cd4e681ff</Sha>
<Sha>efc3da96e5ac110513e92ebd9ef87c73f44d8540</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23426.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23475.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/xliff-tasks</Uri>
<Sha>194f32828726c3f1f63f79f3dc09b9e99c157b11</Sha>
<Sha>73f0850939d96131c28cf6ea6ee5aacb4da0083a</Sha>
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
</Dependency>
<Dependency Name="NuGet.Build.Tasks" Version="6.9.0-preview.1.50">
Expand All @@ -77,9 +77,9 @@
<Sha>8e4ab418a8f9703f7dfe3a66adc9b3876ef9382f</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="8.0.0-beta.23463.1">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="8.0.0-beta.23580.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1d451c32dda2314c721adbf8829e1c0cd4e681ff</Sha>
<Sha>efc3da96e5ac110513e92ebd9ef87c73f44d8540</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
Otherwise, this version of dotnet will not be installed and the build will error out. -->
<DotNetCliVersion>$([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\global.json')), '"dotnet": "([^"]*)"').Groups.get_Item(1))</DotNetCliVersion>
<MicrosoftCodeAnalysisCollectionsVersion>4.2.0-1.22102.8</MicrosoftCodeAnalysisCollectionsVersion>
<MicrosoftDotNetXUnitExtensionsVersion>8.0.0-beta.23463.1</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitExtensionsVersion>8.0.0-beta.23580.1</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftExtensionsDependencyModelVersion>7.0.0</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftIORedistVersion>6.0.0</MicrosoftIORedistVersion>
<MicrosoftNetCompilersToolsetVersion>4.9.0-3.23608.9</MicrosoftNetCompilersToolsetVersion>
Expand Down
2 changes: 1 addition & 1 deletion eng/common/darc-init.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion eng/common/darc-init.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion eng/common/post-build/add-build-to-channel.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion eng/common/post-build/publish-using-darc.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion eng/common/post-build/trigger-subscriptions.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion eng/common/sdk-task.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion eng/common/templates/job/publish-build-assets.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion eng/common/templates/post-build/common-variables.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions eng/common/tools.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"allowPrerelease": true
},
"tools": {
"dotnet": "8.0.100-rc.1.23463.5",
"dotnet": "8.0.100",
"vs": {
"version": "17.7.0"
"version": "17.8.0"
},
"xcopy-msbuild": "17.7.4"
"xcopy-msbuild": "17.8.1-2"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23463.1"
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23580.1"
}
}
14 changes: 14 additions & 0 deletions src/Build/BackEnd/Components/SdkResolution/SdkResolverLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,20 @@ protected virtual IEnumerable<Type> GetResolverTypes(Assembly assembly)
protected virtual Assembly LoadResolverAssembly(string resolverPath)
{
#if !FEATURE_ASSEMBLYLOADCONTEXT
if (ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave17_10))
{
string resolverFileName = Path.GetFileNameWithoutExtension(resolverPath);
if (resolverFileName.Equals("Microsoft.DotNet.MSBuildSdkResolver", StringComparison.OrdinalIgnoreCase))
{
// This will load the resolver assembly into the default load context if possible, and fall back to LoadFrom context.
// We very much prefer the default load context because it allows native images to be used by the CLR, improving startup perf.
AssemblyName assemblyName = new AssemblyName(resolverFileName)
{
CodeBase = resolverPath,
};
return Assembly.Load(assemblyName);
}
}
return Assembly.LoadFrom(resolverPath);
#else
return s_loader.LoadFromPath(resolverPath);
Expand Down
8 changes: 4 additions & 4 deletions src/Build/Logging/BinaryLogger/BuildEventArgsReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ private BuildEventArgs ReadBuildErrorEventArgs()
fields.Arguments)
{
ProjectFile = fields.ProjectFile,
ExtendedMetadata = fields.Extended.ExtendedMetadata,
ExtendedMetadata = fields.Extended.ExtendedMetadataAsDictionary,
ExtendedData = fields.Extended.ExtendedData,
};
}
Expand Down Expand Up @@ -694,7 +694,7 @@ private BuildEventArgs ReadBuildWarningEventArgs()
fields.Arguments)
{
ProjectFile = fields.ProjectFile,
ExtendedMetadata = fields.Extended.ExtendedMetadata,
ExtendedMetadata = fields.Extended.ExtendedMetadataAsDictionary,
ExtendedData = fields.Extended.ExtendedData,
};
}
Expand Down Expand Up @@ -747,7 +747,7 @@ private BuildEventArgs ReadBuildMessageEventArgs()
fields.Arguments)
{
ProjectFile = fields.ProjectFile,
ExtendedMetadata = fields.Extended?.ExtendedMetadata,
ExtendedMetadata = fields.Extended?.ExtendedMetadataAsDictionary,
ExtendedData = fields.Extended?.ExtendedData,
};
}
Expand Down Expand Up @@ -836,7 +836,7 @@ private BuildEventArgs ReadCriticalBuildMessageEventArgs()
fields.Arguments)
{
ProjectFile = fields.ProjectFile,
ExtendedMetadata = fields.Extended?.ExtendedMetadata,
ExtendedMetadata = fields.Extended?.ExtendedMetadataAsDictionary,
ExtendedData = fields.Extended?.ExtendedData,
};
}
Expand Down
10 changes: 10 additions & 0 deletions src/Build/Logging/BinaryLogger/ExtendedDataFields.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,14 @@ public ExtendedDataFields(string extendedType, IDictionary<string, string?>? ext
public string ExtendedType { get; }
public IDictionary<string, string?>? ExtendedMetadata { get; }
public string? ExtendedData { get; }

/// <summary>
/// We need to this for Extended event args have Dictionary as ExtendedMetadata.
/// </summary>
public Dictionary<string, string?>? ExtendedMetadataAsDictionary =>
ExtendedMetadata == null ?
null :
ExtendedMetadata is Dictionary<string, string?> asDictionary ?
asDictionary :
new Dictionary<string, string?>(ExtendedMetadata);
}
2 changes: 1 addition & 1 deletion src/Framework/ExtendedBuildErrorEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed class ExtendedBuildErrorEventArgs : BuildErrorEventArgs, IExtended
public string ExtendedType { get; set; }

/// <inheritdoc />
public IDictionary<string, string?>? ExtendedMetadata { get; set; }
public Dictionary<string, string?>? ExtendedMetadata { get; set; }

/// <inheritdoc />
public string? ExtendedData { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/ExtendedBuildMessageEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed class ExtendedBuildMessageEventArgs : BuildMessageEventArgs, IExte
public string ExtendedType { get; set; }

/// <inheritdoc />
public IDictionary<string, string?>? ExtendedMetadata { get; set; }
public Dictionary<string, string?>? ExtendedMetadata { get; set; }

/// <inheritdoc />
public string? ExtendedData { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/ExtendedBuildWarningEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed class ExtendedBuildWarningEventArgs : BuildWarningEventArgs, IExte
public string ExtendedType { get; set; }

/// <inheritdoc />
public IDictionary<string, string?>? ExtendedMetadata { get; set; }
public Dictionary<string, string?>? ExtendedMetadata { get; set; }

/// <inheritdoc />
public string? ExtendedData { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/ExtendedCriticalBuildMessageEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed class ExtendedCriticalBuildMessageEventArgs : CriticalBuildMessage
public string ExtendedType { get; set; }

/// <inheritdoc />
public IDictionary<string, string?>? ExtendedMetadata { get; set; }
public Dictionary<string, string?>? ExtendedMetadata { get; set; }

/// <inheritdoc />
public string? ExtendedData { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/ExtendedCustomBuildEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed class ExtendedCustomBuildEventArgs : CustomBuildEventArgs, IExtend
public string ExtendedType { get; set; }

/// <inheritdoc />
public IDictionary<string, string?>? ExtendedMetadata { get; set; }
public Dictionary<string, string?>? ExtendedMetadata { get; set; }

/// <inheritdoc />
public string? ExtendedData { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/IExtendedBuildEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public interface IExtendedBuildEventArgs
/// - data which needed in custom code to properly routing this message without interpreting/deserializing <see cref="ExtendedData"/>.
/// - simple extended data can be transferred in form of dictionary key-value per one extended property.
/// </summary>
IDictionary<string, string?>? ExtendedMetadata { get; set; }
Dictionary<string, string?>? ExtendedMetadata { get; set; }

/// <summary>
/// Transparent data as string.
Expand Down
9 changes: 9 additions & 0 deletions src/Framework/Logging/AnsiCodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,13 @@ public static string MakeBold(string? s)

return $"{CSI}{SetBold}{s}{SetDefaultColor}";
}

public static string MoveCursorBackward(int count) => $"{CSI}{count}{MoveBackward}";

/// <summary>
/// Moves cursor to the specified column, or the rightmost column if <paramref name="column"/> is greater than the width of the terminal.
/// </summary>
/// <param name="column">Column index.</param>
/// <returns>Control codes to set the desired position.</returns>
public static string SetCursorHorizontal(int column) => $"{CSI}{column}G";
}
62 changes: 62 additions & 0 deletions src/MSBuild.UnitTests/NodeStatus_Tests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Microsoft.Build.Logging.TerminalLogger;

using VerifyTests;
using VerifyXunit;
using Xunit;

using static VerifyXunit.Verifier;


namespace Microsoft.Build.CommandLine.UnitTests;

[UsesVerify]
public class NodeStatus_Tests
{
private readonly NodeStatus _status = new("Namespace.Project", "TargetFramework", "Target", new());

public NodeStatus_Tests()
{
UseProjectRelativeDirectory("Snapshots");
}

[Fact]
public async Task EverythingFits()
{
NodesFrame frame = new(new[] { _status }, width: 80, height: 5);

await Verify(frame.RenderNodeStatus(_status).ToString());
}

[Fact]
public async Task TargetIsTruncatedFirst()
{
NodesFrame frame = new(new[] { _status }, width: 45, height: 5);

await Verify(frame.RenderNodeStatus(_status).ToString());
}

[Fact]
public async Task NamespaceIsTruncatedNext()
{
NodesFrame frame = new(new[] { _status }, width: 40, height: 5);

await Verify(frame.RenderNodeStatus(_status).ToString());
}

[Fact]
public async Task GoesToProject()
{
NodesFrame frame = new(new[] { _status }, width: 10, height: 5);

await Verify(frame.RenderNodeStatus(_status).ToString());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
 Namespace.Project TargetFramework Target (0.0s)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Project
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
 Project TargetFramework  (0.0s)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
 Namespace.Project TargetFramework  (0.0s)
Loading