Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
c5a9b26
[release/9.0.1xx] Upgrade latest Alpine to 3.21 for VMR builds (#45416)
github-actions[bot] Dec 12, 2024
20d85a1
Workaround for MSbuildProjectLoader.LoadProjectInfoAsync throwing on …
tmat Dec 12, 2024
9809204
Refresh browser for all transitively referencing projects (#45096)
tmat Dec 12, 2024
40c57de
[release/9.0.1xx] Fix incorrect apphost being used when publishing fo…
github-actions[bot] Dec 13, 2024
0d56966
Fix `Change failed to apply (error code: ...)` intermittent failures …
tmat Dec 13, 2024
8a09f12
Update dependencies from https://github.com/dotnet/roslyn build 20241…
dotnet-maestro[bot] Dec 19, 2024
fdb2040
Update dependencies from https://github.com/dotnet/roslyn build 20241…
dotnet-maestro[bot] Dec 20, 2024
dde48a6
Update dependencies from https://github.com/dotnet/roslyn build 20241…
dotnet-maestro[bot] Dec 20, 2024
7a043cc
Update dependencies from https://github.com/dotnet/roslyn build 20241…
dotnet-maestro[bot] Dec 20, 2024
56a10e0
Update dependencies from https://github.com/dotnet/roslyn build 20241…
dotnet-maestro[bot] Dec 20, 2024
41afff6
Update dependencies from https://github.com/dotnet/roslyn build 20241…
dotnet-maestro[bot] Dec 20, 2024
452ce21
Update dependencies from https://github.com/dotnet/roslyn build 20241…
dotnet-maestro[bot] Dec 20, 2024
a1a1c90
Update dependencies from https://github.com/nuget/nuget.client build …
dotnet-maestro[bot] Dec 20, 2024
3121f43
Update dependencies from https://github.com/dotnet/roslyn build 20241…
dotnet-maestro[bot] Dec 20, 2024
56eac13
Update dependencies from https://github.com/dotnet/scenario-tests bui…
dotnet-maestro[bot] Dec 20, 2024
a2e7b5a
Update dependencies from https://github.com/dotnet/roslyn build 20241…
dotnet-maestro[bot] Dec 20, 2024
637ebee
Update dependencies from https://github.com/dotnet/roslyn build 20241…
dotnet-maestro[bot] Dec 20, 2024
7f16345
Update dependencies from https://github.com/nuget/nuget.client build …
dotnet-maestro[bot] Dec 21, 2024
993eece
[release/9.0.2xx] Update dependencies from dotnet/roslyn (#45570)
Dec 23, 2024
3b9c212
[release/9.0.2xx] Update dependencies from dotnet/scenario-tests (#45…
Dec 23, 2024
84a453a
[release/9.0.1xx] dotnetcli.azureedge.net -> builds.dotnet.microsoft.…
mmitche Dec 27, 2024
f61e78d
Update dependencies from https://github.com/nuget/nuget.client build …
dotnet-maestro[bot] Dec 28, 2024
365ebcc
Merge branch 'release/9.0.1xx' into release/9.0.2xx
Dec 30, 2024
ac10497
Remove duplicate code
Dec 30, 2024
8776039
[release/9.0.2xx] Update dependencies from nuget/nuget.client (#45589)
Dec 30, 2024
e8a3400
[release/9.0.2xx] Update dependencies from dotnet/roslyn (#45650)
dotnet-maestro[bot] Dec 30, 2024
6062d02
Look up the target OS for crossgen2 using the full target RID (#45566)
jkoritzinsky Dec 30, 2024
03c7e20
[automated] Merge branch 'release/9.0.1xx' => 'release/9.0.2xx' (#45636)
Dec 31, 2024
0e33e75
Update dependencies from https://github.com/dotnet/scenario-tests bui…
dotnet-maestro[bot] Jan 1, 2025
7a9c5ec
Update dependencies from https://github.com/dotnet/razor build 202501…
dotnet-maestro[bot] Jan 2, 2025
2be56f8
Update dependencies from https://github.com/dotnet/razor build 202501…
dotnet-maestro[bot] Jan 2, 2025
82bb563
Update dependencies from https://github.com/dotnet/roslyn build 20250…
dotnet-maestro[bot] Jan 2, 2025
d65d049
[release/9.0.2xx] Update dependencies from dotnet/razor (#45679)
Jan 2, 2025
e796edf
[release/9.0.2xx] Update dependencies from dotnet/scenario-tests (#45…
Jan 2, 2025
b136e8b
Update dependencies from https://github.com/dotnet/roslyn build 20250…
dotnet-maestro[bot] Jan 2, 2025
4e1f5b3
[release/9.0.2xx] Update dependencies from dotnet/source-build-exter…
kasperk81 Jan 2, 2025
362c12d
Don't require there to be a supported runtime pack runtime identifier…
jkoritzinsky Jan 2, 2025
815155a
Update dependencies from https://github.com/dotnet/roslyn build 20250…
dotnet-maestro[bot] Jan 2, 2025
d412687
Update dependencies from https://github.com/dotnet/roslyn build 20250…
dotnet-maestro[bot] Jan 2, 2025
aa97483
Update dependencies from https://github.com/dotnet/roslyn build 20250…
dotnet-maestro[bot] Jan 3, 2025
2415221
Update dependencies from https://github.com/dotnet/razor build 202501…
dotnet-maestro[bot] Jan 3, 2025
dced46a
Update dependencies from https://github.com/dotnet/roslyn build 20250…
dotnet-maestro[bot] Jan 3, 2025
d43ac14
Update dependencies from https://github.com/dotnet/razor build 202501…
dotnet-maestro[bot] Jan 3, 2025
a5414a8
[release/9.0.2xx] Update dependencies from dotnet/roslyn (#45680)
Jan 3, 2025
ba6cdeb
[release/9.0.2xx] Update dependencies from dotnet/razor (#45689)
Jan 3, 2025
de402fb
Update dependencies from https://github.com/dotnet/razor build 202501…
dotnet-maestro[bot] Jan 3, 2025
eb575da
Update dependencies from https://github.com/dotnet/roslyn build 20250…
dotnet-maestro[bot] Jan 3, 2025
40318dc
[release/9.0.2xx] Update dependencies from dotnet/roslyn (#45699)
Jan 3, 2025
fe535b3
Invoke dotnet nuget why directly through API (#44614)
zivkan Jan 4, 2025
da770b7
Update dependencies from https://github.com/dotnet/roslyn build 20250…
dotnet-maestro[bot] Jan 4, 2025
ecad732
Update dependencies from https://github.com/dotnet/roslyn build 20250…
dotnet-maestro[bot] Jan 4, 2025
aed4711
Update dependencies from https://github.com/dotnet/roslyn build 20250…
dotnet-maestro[bot] Jan 4, 2025
33ee615
Update dependencies from https://github.com/nuget/nuget.client build …
dotnet-maestro[bot] Jan 4, 2025
da9feb7
Update dependencies from https://github.com/dotnet/roslyn build 20250…
dotnet-maestro[bot] Jan 4, 2025
9f4675d
Update dependencies from https://github.com/dotnet/roslyn build 20250…
dotnet-maestro[bot] Jan 5, 2025
93b4820
[release/9.0.2xx] Update dependencies from nuget/nuget.client (#45713)
Jan 6, 2025
6e03f20
[release/9.0.2xx] Update dependencies from dotnet/roslyn (#45705)
Jan 6, 2025
05c6f52
[release/9.0.2xx] Update dependencies from dotnet/razor (#45698)
Jan 6, 2025
0f02d88
Update dependencies from https://github.com/dotnet/razor build 202501…
dotnet-maestro[bot] Jan 6, 2025
a262d4c
[release/9.0.2xx] Update dependencies from dotnet/razor (#45723)
Jan 6, 2025
877ff60
[dotnet-watch] Misc test fixes (#45575)
tmat Jan 6, 2025
5876707
Update dependencies from https://github.com/dotnet/razor build 202501…
dotnet-maestro[bot] Jan 6, 2025
5bf9b9d
Update dependencies from https://github.com/dotnet/fsharp build 20250…
dotnet-maestro[bot] Jan 6, 2025
2d8e2ed
Update dependencies from https://github.com/dotnet/razor build 202501…
dotnet-maestro[bot] Jan 7, 2025
c5797c5
Update dependencies from https://github.com/dotnet/razor build 202501…
dotnet-maestro[bot] Jan 7, 2025
ac0327f
[release/9.0.2xx] Update dependencies from dotnet/fsharp (#45739)
Jan 7, 2025
4fca7aa
[release/9.0.2xx] Update dependencies from dotnet/razor (#45737)
Jan 7, 2025
2dce632
Merge branch 'main' into merge/release/9.0.2xx-to-main
ViktorHofer Jan 7, 2025
67fe7c4
Delete src/SourceBuild/patches/fsharp/0001-Upgrade-some-runtime-packa…
ViktorHofer Jan 7, 2025
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
8 changes: 4 additions & 4 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@
<Sha>8d395fd2729ad43428252f37656eb5c97a180987</Sha>
<SourceBuild RepoName="msbuild" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.FSharp.Compiler" Version="13.9.200-beta.24617.1">
<Dependency Name="Microsoft.FSharp.Compiler" Version="13.9.200-beta.25056.5">
<Uri>https://github.com/dotnet/fsharp</Uri>
<Sha>5af96504f10836eca6ce804ab3cdd28c042fa35a</Sha>
<Sha>63a09289745da5c256e7baf5f4194a750b1ec878</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.fsharp" Version="9.0.200-beta.24617.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.fsharp" Version="9.0.200-beta.25056.5">
<Uri>https://github.com/dotnet/fsharp</Uri>
<Sha>5af96504f10836eca6ce804ab3cdd28c042fa35a</Sha>
<Sha>63a09289745da5c256e7baf5f4194a750b1ec878</Sha>
<SourceBuild RepoName="fsharp" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.13.0-3.25055.1">
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/Microsoft/visualfsharp -->
<MicrosoftFSharpCompilerPackageVersion>13.9.200-beta.24617.1</MicrosoftFSharpCompilerPackageVersion>
<MicrosoftFSharpCompilerPackageVersion>13.9.200-beta.25056.5</MicrosoftFSharpCompilerPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/roslyn -->
Expand Down
7 changes: 7 additions & 0 deletions src/Cli/dotnet/commands/dotnet-help/HelpCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
using Microsoft.DotNet.Cli.Utils;
using Microsoft.TemplateEngine.Cli.Commands;

using NuGetDocumentedCommand = NuGet.CommandLine.XPlat.Commands.DocumentedCommand;

namespace Microsoft.DotNet.Tools.Help
{
public class HelpCommand(string[] helpArgs)
Expand Down Expand Up @@ -107,6 +109,11 @@ private bool TryGetDocsLink(string[] command, out string docsLink)
docsLink = dc.DocsLink;
return true;
}
else if (parsedCommand?.CommandResult?.Command is NuGetDocumentedCommand ndc)
{
docsLink = ndc.HelpUrl;
return true;
}
docsLink = null;
return false;
}
Expand Down
16 changes: 1 addition & 15 deletions src/Cli/dotnet/commands/dotnet-nuget/NuGetCommandParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private static CliCommand ConstructCommand()
command.Subcommands.Add(GetVerifyCommand());
command.Subcommands.Add(GetTrustCommand());
command.Subcommands.Add(GetSignCommand());
command.Subcommands.Add(GetWhyCommand());
NuGet.CommandLine.XPlat.Commands.Why.WhyCommand.GetWhyCommand(command);

command.SetAction(NuGetCommand.Run);

Expand Down Expand Up @@ -218,19 +218,5 @@ private static CliCommand GetSignCommand()

return signCommand;
}

private static CliCommand GetWhyCommand()
{
DocumentedCommand whyCommand = new("why", "https://learn.microsoft.com/dotnet/core/tools/dotnet-nuget-why");
whyCommand.Arguments.Add(new CliArgument<string>("PROJECT|SOLUTION") { Arity = ArgumentArity.ExactlyOne });
whyCommand.Arguments.Add(new CliArgument<string>("PACKAGE") { Arity = ArgumentArity.ExactlyOne });

whyCommand.Options.Add(new ForwardedOption<IEnumerable<string>>("--framework", "-f") { Arity = ArgumentArity.ZeroOrMore }
.ForwardAsManyArgumentsEachPrefixedByOption("--framework")
.AllowSingleArgPerToken());

whyCommand.SetAction(NuGetCommand.Run);
return whyCommand;
}
}
}
1 change: 1 addition & 0 deletions src/Cli/dotnet/dotnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" />
<PackageReference Include="Microsoft.VisualStudio.SolutionPersistence" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NuGet.CommandLine.XPlat" />
<PackageReference Include="Microsoft.ApplicationInsights" />
<PackageReference Include="Microsoft.Build" />
<PackageReference Include="Microsoft.NET.HostModel" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,8 @@ private ToolPackSupport AddToolPack(
runtimePackToDownload.SetMetadata(MetadataKeys.Version, packVersion);
}

runtimePackItem.SetMetadata(MetadataKeys.RuntimeIdentifier, hostRuntimeIdentifier);

switch (toolPackType)
{
case ToolPackType.Crossgen2:
Expand Down
85 changes: 41 additions & 44 deletions src/Tasks/Microsoft.NET.Build.Tasks/ResolveReadyToRunCompilers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,7 @@ protected override void ExecuteCore()
_runtimePack = GetNETCoreAppRuntimePack();
_targetRuntimeIdentifier = _runtimePack?.GetMetadata(MetadataKeys.RuntimeIdentifier);

// Get the list of runtime identifiers that we support and can target
ITaskItem targetingPack = GetNETCoreAppTargetingPack();
string supportedRuntimeIdentifiers = targetingPack?.GetMetadata(MetadataKeys.RuntimePackRuntimeIdentifiers);

var runtimeGraph = new RuntimeGraphCache(this).GetRuntimeGraph(RuntimeGraphPath);
var supportedRIDsList = supportedRuntimeIdentifiers == null ? Array.Empty<string>() : supportedRuntimeIdentifiers.Split(';');

// Get the best RID for the host machine, which will be used to validate that we can run crossgen for the target platform and architecture
_hostRuntimeIdentifier = NuGetUtils.GetBestMatchingRid(
runtimeGraph,
NETCoreSdkRuntimeIdentifier,
supportedRIDsList,
out _);

if (_hostRuntimeIdentifier == null || _targetRuntimeIdentifier == null)
if (_targetRuntimeIdentifier == null)
{
Log.LogError(Strings.ReadyToRunNoValidRuntimePackageError);
return;
Expand Down Expand Up @@ -96,6 +82,13 @@ protected override void ExecuteCore()

private bool ValidateCrossgenSupport()
{
_hostRuntimeIdentifier = GetHostRuntimeIdentifierForCrossgen();
if (_hostRuntimeIdentifier == null)
{
Log.LogError(Strings.ReadyToRunNoValidRuntimePackageError);
return false;
}

_crossgenTool.PackagePath = _runtimePack?.GetMetadata(MetadataKeys.PackageDirectory);
if (_crossgenTool.PackagePath == null)
{
Expand All @@ -121,12 +114,39 @@ private bool ValidateCrossgenSupport()
}

return true;

string GetHostRuntimeIdentifierForCrossgen()
{
// Crossgen's host RID comes from the runtime pack that Crossgen will be loaded from.

// Get the list of runtime identifiers that we support and can target
ITaskItem targetingPack = GetNETCoreAppTargetingPack();
string supportedRuntimeIdentifiers = targetingPack?.GetMetadata(MetadataKeys.RuntimePackRuntimeIdentifiers);

var runtimeGraph = new RuntimeGraphCache(this).GetRuntimeGraph(RuntimeGraphPath);
var supportedRIDsList = supportedRuntimeIdentifiers == null ? Array.Empty<string>() : supportedRuntimeIdentifiers.Split(';');

// Get the best RID for the host machine, which will be used to validate that we can run crossgen for the target platform and architecture
return NuGetUtils.GetBestMatchingRid(
runtimeGraph,
NETCoreSdkRuntimeIdentifier,
supportedRIDsList,
out _);
}
}

private bool ValidateCrossgen2Support()
{
ITaskItem crossgen2Pack = Crossgen2Packs?.FirstOrDefault();
_crossgen2Tool.PackagePath = crossgen2Pack?.GetMetadata(MetadataKeys.PackageDirectory);

_hostRuntimeIdentifier = crossgen2Pack?.GetMetadata(MetadataKeys.RuntimeIdentifier);
if (_hostRuntimeIdentifier == null)
{
Log.LogError(Strings.ReadyToRunNoValidRuntimePackageError);
return false;
}

_crossgen2Tool.PackagePath = crossgen2Pack.GetMetadata(MetadataKeys.PackageDirectory);

if (string.IsNullOrEmpty(_crossgen2Tool.PackagePath) ||
!NuGetVersion.TryParse(crossgen2Pack.GetMetadata(MetadataKeys.NuGetPackageVersion), out NuGetVersion crossgen2PackVersion))
Expand Down Expand Up @@ -181,42 +201,19 @@ private bool GetCrossgen2TargetOS(out string targetOS)

// Determine targetOS based on target rid.
// Use the runtime graph to support non-portable target rids.
// Use the full target rid instead of just the target OS as the runtime graph
// may only have the full target rid and not an OS-only rid for non-portable target rids
// added by our source-build partners.
var runtimeGraph = new RuntimeGraphCache(this).GetRuntimeGraph(RuntimeGraphPath);
string portablePlatform = NuGetUtils.GetBestMatchingRid(
runtimeGraph,
_targetPlatform,
new[] { "linux", "linux-musl", "osx", "win", "freebsd", "illumos" },
_targetRuntimeIdentifier,
new[] { "linux", "osx", "win", "freebsd", "illumos" },
out _);

// For source-build, allow the bootstrap SDK rid to be unknown to the runtime repo graph.
if (portablePlatform == null && _targetRuntimeIdentifier == _hostRuntimeIdentifier)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
portablePlatform = "win";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
portablePlatform = "linux";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD")))
{
portablePlatform = "freebsd";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("ILLUMOS")))
{
portablePlatform = "illumos";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
portablePlatform = "osx";
}
}

targetOS = portablePlatform switch
{
"linux" => "linux",
"linux-musl" => "linux",
"osx" => "osx",
"win" => "windows",
"freebsd" => "freebsd",
Expand Down
27 changes: 24 additions & 3 deletions test/dotnet-nuget.UnitTests/GivenANuGetCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ public GivenANuGetCommand(ITestOutputHelper log) : base(log)
"--interactive",
"--verbosity", "detailed",
"--format", "json"}, 0)]
[InlineData(new[] { "why" }, 0)]
[InlineData(new[] { "why", "C:\\path", "Fake.Package" }, 0)]
[InlineData(new[] { "why", "C:\\path", "Fake.Package", "--framework", "net472", "-f", "netcoreapp5.0" }, 0)]

public void ItPassesCommandIfSupported(string[] inputArgs, int result)
{
Expand Down Expand Up @@ -112,5 +109,29 @@ public void ItAcceptsPrefixedOption()
.And
.HaveStdErrContaining("Required argument missing for option: '-ss'.");
}

[Fact]
public void ItHasAWhySubcommand()
{
var testAssetName = "NewtonSoftDependentProject";
var testAsset = _testAssetsManager
.CopyTestAsset(testAssetName)
.WithSource();
var projectDirectory = testAsset.Path;

new RestoreCommand(testAsset)
.Execute()
.Should()
.Pass()
.And.NotHaveStdErr();

new DotnetCommand(Log)
.WithWorkingDirectory(projectDirectory)
.Execute("nuget", "why", "newtonsoft.json")
.Should()
.Pass()
.And.NotHaveStdErr()
.And.HaveStdOutContaining("has the following dependency");
}
}
}
Loading