8000 [main] Source code updates from dotnet/sdk, nuget/nuget.client (#333) · dotnet/dotnet@2b91732 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2b91732

Browse files
[main] Source code updates from dotnet/sdk, nuget/nuget.client (#333)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
1 parent 83f0c72 commit 2b91732

File tree

273 files changed

+12792
-6821
lines changed

Some content is hidden

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

273 files changed

+12792
-6821
lines changed

prereqs/git-info/nuget-client.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4-
<GitCommitHash>d535886475b1eeda1813eb1947af23bd046abb25</GitCommitHash>
5-
<OfficialBuildId>20250416.1</OfficialBuildId>
6-
<OutputPackageVersion>6.15.0-preview.1.7</OutputPackageVersion>
4+
<GitCommitHash>86c695c5bdd02ca0aa735eed42508b57f695baa7</GitCommitHash>
5+
<OfficialBuildId>6.15.0.31</OfficialBuildId>
6+
<OutputPackageVersion>6.15.0-preview.1.31</OutputPackageVersion>
77
</PropertyGroup>
88
</Project>

prereqs/git-info/sdk.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4-
<GitCommitHash>2e6a71352a5312f8b136f6530891f4d208c2a83b</GitCommitHash>
5-
<OfficialBuildId>20250424.4</OfficialBuildId>
6-
<OutputPackageVersion>10.0.100-preview.5.25224.4</OutputPackageVersion>
4+
<GitCommitHash>7601b9cae2f49701609df537fe81ae73425109ed</GitCommitHash>
5+
<OfficialBuildId>20250501.4</OfficialBuildId>
6+
<OutputPackageVersion>10.0.100-preview.5.25251.4</OutputPackageVersion>
77
</PropertyGroup>
88
</Project>

repo-projects/Directory.Build.props

Lines changed: 5 additions & 0 deletions
< 10000 td data-grid-cell-id="diff-286a660bb4e6dd0a44616c4cc3037852cbf59f542a46f6d8ebffe15e0a1d88db-21-22-1" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-additionNum-bgColor, var(--diffBlob-addition-bgColor-num));text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative left-side">22
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
https://github.com/dotnet/source-build/issues/4922 -->
2020
<Import Project="$(GitInfoRepoPropsFile)" Condition="Exists('$(GitInfoRepoPropsFile)') and '$(DotNetBuildSourceOnly)' == 'true' and '$(DisableDevBuildAsDefaultForSourceOnly)' == 'true'" />
2121

+
<!-- The OfficialBuildId in nuget-client.props isn't parse-able. Replace it with the current datetime value. The OfficialBuildId isn't important for source-only builds. -->
23+
<PropertyGroup Condition="Exists('$(GitInfoRepoPropsFile)') and '$(DotNetBuildSourceOnly)' == 'true' and '$(DisableDevBuildAsDefaultForSourceOnly)' == 'true'">
24+
<OfficialBuildId Condition="'$(RepositoryName)' == 'nuget-client'">$([System.DateTime]::Now.ToString("yyyyMMdd")).1</OfficialBuildId>
25+
</PropertyGroup>
26+
2227
<PropertyGroup>
2328
<!-- Fake, to satisfy the SDK. -->
2429
<TargetFramework>netstandard2.0</TargetFramework>

src/nuget-client/.gdn/.gdnsuppress

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"version": "latest",
3+
"suppressionSets": {
4+
"default": {
5+
"name": "default",
6+
"createdDate": "2025-04-14T13:30:47Z",
7+
"lastUpdatedDate": "2025-04-14T13:30:47Z"
8+
}
9+
},
10+
"results": {
11+
"94b262a20d21544c9527803ee2109eec43f13edee79db6408106a7bf15ffaa0b": {
12+
"signature": "94b262a20d21544c9527803ee2109eec43f13edee79db6408106a7bf15ffaa0b",
13+
"target": "artifacts/NuGet.VisualStudio.Implementation/bin/release/net472/Microsoft.VisualStudio.ManagedInterfaces.dll",
14+
"memberOf": ["default"],
15+
"tool": "BinSkim",
16+
"ruleId": "BA2009",
17+
"justification": "This DLL is not shipped and is not built by our team.",
18+
"createdDate": "2025-04-15 17:38:54Z",
19+
"expirationDate": null,
20+
"type": null
21+
},
22+
"dadf10d994d221e4d43842f89921d1eca4a2185ef8afa6c6894e5a8faf96afc6": {
23+
"signature": "dadf10d994d221e4d43842f89921d1eca4a2185ef8afa6c6894e5a8faf96afc6",
24+
"target": "artifacts/NuGet.VisualStudio.Implementation/bin/release/net472/Microsoft.VisualStudio.ManagedInterfaces.dll",
25+
"memberOf": ["default"],
26+
"tool": "BinSkim",
27+
"ruleId": "BA2016",
28+
"justification": "This DLL is not shipped and is not built by our team.",
29+
"createdDate": "2025-04-15 17:38:54Z",
30+
"expirationDate": null,
31+
"type": null
32+
}
33+
}
34+
}
35+

src/nuget-client/docs/workflow.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ These are guidelines to follow but unless indicated, they are not required.
2929
- Try your best not to take feedback personally, we're all working towards the same goals.
3030
- When conflict arises try to address it directly with the commentor offline, preferably synchronously.
3131
- Provide an explanation if you decide not to implement a recommendation.
32+
- Feel free to resolve conversations for which you've made the suggested code changes.
3233

3334
### Merging Pull Requests
3435

src/nuget-client/eng/Publishing.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,10 @@
77
</Artifact>
88
</ItemGroup>
99

10+
<!-- Update Artifacts with Kind=Package to have additional metadata item Category="ToolingPackage".
11+
Depending on channel configuration, this means that these assets could be pushed to a different feed. -->
12+
<ItemGroup>
13+
<Artifact Update="@(Artifact->WithMetadataValue('Kind', 'Package'))" Category="ToolingPackage" />
14+
</ItemGroup>
15+
1016
</Project>

src/nuget-client/eng/dotnet-build/build.ps1

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11

22
# The VMR orchestrator passes a number of stnadar
33
param (
4-
[string]$Configuration,
5-
[switch]$ci,
6-
[switch]$bl,
7-
[Parameter(ValueFromRemainingArguments = $true)]
8-
[string[]]$AdditionalArgs
4+
[string][Alias('c')]$configuration = "Release",
5+
[string][Alias('v')]$verbosity = "minimal",
6+
[switch]$ci,
7+
[switch]$bl,
8+
[Parameter(ValueFromRemainingArguments = $true)]
9+
[string[]]$AdditionalArgs
910
)
1011

1112
# This will exec a process using the console and return it's exit code.
@@ -55,6 +56,8 @@ $env:NUGET_PACKAGES=$nugetPackagesRoot
5556
# MSBuild arguments
5657
# Add the dotnet tool...
5758
$dotnetArguments += $dotnetTool
59+
# Add the verbosity flag
60+
$dotnetArguments += "-v:$verbosity"
5861
# Then project file...
5962
$dotnetArguments += "$PSScriptRoot/dotnet-build.proj"
6063
# Then remaining arguments.

src/nuget-client/eng/dotnet-build/build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ git config --global protocol.file.allow always
66
source="${BASH_SOURCE[0]}"
77
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
88
configuration='Release'
9+
verbosity='minimal'
910
source_build=false
1011
properties=''
1112

@@ -25,6 +26,10 @@ repo_root="${repo_root}/"
2526
while [[ $# > 0 ]]; do
2627
lowerI="$(echo $1 | awk '{print tolower($0)}')"
2728
case $lowerI in
29+
--verbosity|-v)
30+
verbosity=$2
31+
shift
32+
;;
2833
--configuration|-c)
2934
configuration=$2
3035
shift
@@ -91,4 +96,4 @@ properties="$properties /p:Configuration=$configuration"
9196
properties="$properties /p:DotNetBuildRepo=true"
9297
properties="$properties /p:RepoRoot=$repo_root"
9398

94-
"$DOTNET" msbuild "$scriptroot/dotnet-build.proj" "/bl:${repo_root}artifacts/sb/log/source-inner-build.binlog" $properties $args
99+
"$DOTNET" msbuild -v:$verbosity "$scriptroot/dotnet-build.proj" "/bl:${repo_root}artifacts/sb/log/source-inner-build.binlog" $properties $args

src/nuget-client/eng/pipelines/official.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ extends:
7171
enabled: true
7272
credscan:
7373
enabled: false
74+
suppression:
75+
suppressionFile: $(Build.SourcesDirectory)\.gdn\.gdnsuppress
7476
pool:
7577
name: AzurePipelines-EO
7678
image: 1ESPT-Windows2022

src/nuget-client/eng/pipelines/pull_request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ extends:
7575
enabled: true
7676
credscan:
7777
enabled: false
78+
suppression:
79+
suppressionFile: $(Build.SourcesDirectory)\.gdn\.gdnsuppress
7880
pool:
7981
name: AzurePipelines-EO
8082
image: 1ESPT-Windows2022

src/nuget-client/src/NuGet.Clients/NuGet.CommandLine/Commands/RestoreCommand.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -834,8 +834,7 @@ private void GetInputsFromFile(string projectFilePath, PackageRestoreInputs pack
834834
{
835835
packageRestoreInputs.RestoreV3Context.Inputs.Add(projectFilePath);
836836
}
837-
else if (projectFileName.EndsWith(".sln", StringComparison.OrdinalIgnoreCase)
838-
|| projectFileName.EndsWith(".slnf", StringComparison.OrdinalIgnoreCase))
837+
else if (projectFileName.IsSolutionFile())
839838
{
840839
ProcessSolutionFile(projectFilePath, packageRestoreInputs);
841840
}
@@ -859,9 +858,7 @@ private void GetInputsFromDirectory(string directory, PackageRestoreInputs packa
859858
var topLevelFiles = Directory.GetFiles(directory, "*.*", SearchOption.TopDirectoryOnly);
860859

861860
// Solution files
862-
var solutionFiles = topLevelFiles.Where(file =>
863-
file.EndsWith(".sln", StringComparison.OrdinalIgnoreCase))
864-
.ToArray();
861+
var solutionFiles = topLevelFiles.Where(file => file.IsSolutionFile()).ToArray();
865862

866863
if (solutionFiles.Length > 0)
867864
{
@@ -925,7 +922,7 @@ private static bool IsSolutionOrProjectFile(string fileName)
925922
lastFourCharacters = extension.Substring(length - 4);
926923
}
927924

928-
return (string.Equals(extension, ".sln", StringComparison.OrdinalIgnoreCase)
925+
return (fileName.IsSolutionFile()
929926
|| string.Equals(lastFourCharacters, "proj", StringComparison.OrdinalIgnoreCase));
930927
}
931928
return false;
@@ -998,6 +995,16 @@ private string GetPackageReferenceFile(string projectFile)
998995

999996
private void ProcessSolutionFile(string solutionFileFullPath, PackageRestoreInputs restoreInputs)
1000997
{
998+
var msBuildToolset = MsBuildDirectory.Value;
999+
if (Path.GetExtension(solutionFileFullPath).Equals(".slnx", StringComparison.OrdinalIgnoreCase)
1000+
&& msBuildToolset.ParsedVersion < new Version(17, 13))
1001+
{
1002+
throw new InvalidOperationException(string.Format(
1003+
CultureInfo.InvariantCulture,
1004+
LocalizedResourceManager.GetString(nameof(NuGetResources.Error_UnsupportedMsBuildForSlnx)),
1005+
msBuildToolset.Version));
1006+
}
1007+
10011008
restoreInputs.DirectoryOfSolutionFile = Path.GetDirectoryName(solutionFileFullPath);
10021009
restoreInputs.NameOfSolutionFile = Path.GetFileNameWithoutExtension(solutionFileFullPath);
10031010

src/nuget-client/src/NuGet.Clients/NuGet.CommandLine/Commands/UpdateCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ private string GetInputFile()
238238
return GetPackagesConfigPath(path);
239239
}
240240

241-
if (extension.Equals(".sln", StringComparison.OrdinalIgnoreCase))
241+
if (path.IsSolutionFile())
242242
{
243243
return Path.GetFullPath(path);
244244
}

src/nuget-client/src/NuGet.Clients/NuGet.CommandLine/Common/ProjectHelper.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ public static HashSet<string> SupportedProjectExtensions
2727
}
2828
}
2929

30+
public static bool IsSolutionFile(this string filepath) => filepath.EndsWith(".sln", StringComparison.OrdinalIgnoreCase)
31+
|| filepath.EndsWith(".slnf", StringComparison.OrdinalIgnoreCase)
32+
|| filepath.EndsWith(".slnx", StringComparison.OrdinalIgnoreCase);
33+
3034
public static bool TryGetProjectFile(string directory, out string projectFile)
3135
{
3236
projectFile = null;
@@ -70,7 +74,7 @@ public static string GetSolutionDir(string projectDirectory)
7074

7175
private static bool SolutionFileExists(string path)
7276
{
73-
return Directory.GetFiles(path, "*.sln").Any();
77+
return Directory.EnumerateFiles(path, "*.*").Any(f => f.IsSolutionFile());
7478
}
7579
}
7680
}

src/nuget-client/src/NuGet.Clients/NuGet.CommandLine/NuGetResources.Designer.cs

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/nuget-client/src/NuGet.Clients/NuGet.CommandLine/NuGetResources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,9 @@ Do not localize `SDK`, `dotnet pack`, msbuild -t:pack` and 'true'.</comment>
726726
<data name="Error_UnsupportedMsBuildForSolutionFilter" xml:space="preserve">
727727
<value>This version of MSBuild not support Solution filter: '{0}'. Please use a MSBuild version greater or equal to 16.7 to use this feature.</value>
728728
</data>
729+
<data name="Error_UnsupportedMsBuildForSlnx" xml:space="preserve">
730+
<value>This version of MSBuild not support the slnx format: '{0}'. Please use a MSBuild version greater or equal to 17.13 to use this feature.</value>
731+
</data>
729732
<data name="Error_InvalidCultureInfo" xml:space="preserve">
730733
<value>Invalid culture identifier in {0} environment variable. Value read is '{1}'</value>
731734
<comment>0 - Environment variable name, 1 - value set in environment variable</comment>

src/nuget-client/src/NuGet.Clients/NuGet.PackageManagement.UI/Design/PackageItemListViewSampleData.xaml

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

src/nuget-client/src/NuGet.Clients/NuGet.PackageManagement.UI/Models/DetailControlModel.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Threading.Tasks;
1010
using System.Windows.Media.Imaging;
1111
using Microsoft.ServiceHub.Framework;
12+
using NuGet.PackageManagement.UI.Models.Package;
1213
using NuGet.PackageManagement.UI.ViewModels;
1314
using NuGet.PackageManagement.VisualStudio;
1415
using NuGet.Packaging.Core;
@@ -474,9 +475,9 @@ public string ExplainPackageDeprecationReasons(IReadOnlyCollection<string> reaso
474475
{
475476
return Resources.Label_DeprecationReasons_Unknown;
476477
}
477-
else if (reasons.Contains(PackageDeprecationReason.CriticalBugs, StringComparer.OrdinalIgnoreCase))
478+
else if (reasons.Contains(PackageDeprecationReasonConstants.CriticalBugs, StringComparer.OrdinalIgnoreCase))
478479
{
479-
if (reasons.Contains(PackageDeprecationReason.Legacy, StringComparer.OrdinalIgnoreCase))
480+
if (reasons.Contains(PackageDeprecationReasonConstants.Legacy, StringComparer.OrdinalIgnoreCase))
480481
{
481482
return Resources.Label_DeprecationReasons_LegacyAndCriticalBugs;
482483
}
@@ -485,7 +486,7 @@ public string ExplainPackageDeprecationReasons(IReadOnlyCollection<string> reaso
485486
return Resources.Label_DeprecationReasons_CriticalBugs;
486487
}
487488
}
488-
else if (reasons.Contains(PackageDeprecationReason.Legacy, StringComparer.OrdinalIgnoreCase))
489+
else if (reasons.Contains(PackageDeprecationReasonConstants.Legacy, StringComparer.OrdinalIgnoreCase))
489490
{
490491
return Resources.Label_DeprecationReasons_Legacy;
491492
}
@@ -495,12 +496,6 @@ public string ExplainPackageDeprecationReasons(IReadOnlyCollection<string> reaso
495496
}
496497
}
497498

498-
private static class PackageDeprecationReason
499-
{
500-
public const string CriticalBugs = nameof(CriticalBugs);
501-
public const string Legacy = nameof(Legacy);
502-
}
503-
504499
private DetailedPackageMetadata _packageMetadata;
505500

506501
public DetailedPackageMetadata PackageMetadata

0 commit comments

Comments
 (0)
0