From b5617dd89b259b249b34efa3ce82972f2e5da044 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 29 Jul 2022 16:07:28 -0700 Subject: [PATCH 001/185] Add basic function to call the api later --- src/Tasks/Common/FileUtilities.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index ef6e8355d9f6..423a7d5b3708 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -35,5 +35,13 @@ public static Version TryGetAssemblyVersion(string sourcePath) return s_assemblyExtensions.Contains(extension) ? GetAssemblyVersion(sourcePath) : null; } + public static string CreateTempPath() + { + // TODO: Make this call the API once it is complete. + string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + Directory.CreateDirectory(path); + return path; + } + } } From 2403aae1e8e12d0b7222ed8011111e3aeaa8ca72 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 29 Jul 2022 16:43:20 -0700 Subject: [PATCH 002/185] Add call to tool package installer --- .../ToolPackage/ToolPackageInstaller.cs | 28 ++++++++----------- src/Cli/dotnet/dotnet.csproj | 1 + .../ToolPackageInstallerNugetCacheTests.cs | 2 +- .../ToolPackageInstallerTests.cs | 2 +- 4 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index 1f3a37d9ee0f..d3a5a4fdbbae 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -13,6 +13,7 @@ using Microsoft.Extensions.EnvironmentAbstractions; using NuGet.ProjectModel; using NuGet.Versioning; +using Microsoft.NET.Build.Tasks; namespace Microsoft.DotNet.ToolPackage { @@ -53,7 +54,7 @@ public IToolPackage InstallPackage( Directory.CreateDirectory(stageDirectory.Value); rollbackDirectory = stageDirectory.Value; - var tempProject = CreateTempProject( + Tuple tempProjectDetails = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -65,13 +66,13 @@ public IToolPackage InstallPackage( try { _projectRestorer.Restore( - tempProject, + new FilePath(tempProjectDetails.Item1.ToString() + tempProjectDetails.Item2), packageLocation, verbosity: verbosity); } finally { - File.Delete(tempProject.Value); + Directory.Delete(tempProjectDetails.Item1.ToString(), recursive: true); } var version = _store.GetStagedPackageVersion(stageDirectory, packageId); @@ -131,7 +132,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( Directory.CreateDirectory(tempDirectoryForAssetJson.Value); - var tempProject = CreateTempProject( + var tempProject = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -155,7 +156,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( return ToolPackageInstance.CreateFromAssetFile(packageId, tempDirectoryForAssetJson); } - private FilePath CreateTempProject( + private Tuple CreateDirectoryWithTempProject( PackageId packageId, VersionRange versionRange, string targetFramework, @@ -164,16 +165,9 @@ private FilePath CreateTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - var tempProject = _tempProject ?? new DirectoryPath(Path.GetTempPath()) - .WithSubDirectories(Path.GetRandomFileName()) - .WithFile("restore.csproj"); - - if (Path.GetExtension(tempProject.Value) != "csproj") - { - tempProject = new FilePath(Path.ChangeExtension(tempProject.Value, "csproj")); - } - - Directory.CreateDirectory(tempProject.GetDirectoryPath().Value); + string tempProjectName = "restore.csproj"; + string tempProjectDir = _tempProject.ToString() ?? FileUtilities.CreateTempPath(); + File.WriteAllText(Path.Combine(tempProjectDir, tempProjectName), null); var tempProjectContent = new XDocument( new XElement("Project", @@ -203,8 +197,8 @@ private FilePath CreateTempProject( new XAttribute("Project", "Sdk.targets"), new XAttribute("Sdk", "Microsoft.NET.Sdk")))); - File.WriteAllText(tempProject.Value, tempProjectContent.ToString()); - return tempProject; + File.WriteAllText(Path.Combine(tempProjectDir, tempProjectName), tempProjectContent.ToString()); + return new Tuple(new FilePath(tempProjectDir), tempProjectName); } private string JoinSourceAndOfflineCache(string[] additionalFeeds) diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj index 9c0dab5d3326..43f86755fd61 100644 --- a/src/Cli/dotnet/dotnet.csproj +++ b/src/Cli/dotnet/dotnet.csproj @@ -19,6 +19,7 @@ + diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs b/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs index 87e65c490cab..41e71c959799 100644 --- a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs +++ b/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs @@ -167,7 +167,7 @@ private static List GetMockFeedsForConfigFile(FilePath nugetConfig) installer = new ToolPackageInstaller( store: store, projectRestorer: new Stage2ProjectRestorer(Log, reporter), - tempProject: tempProject ?? GetUniqueTempProjectPathEachTest(testDirectory), + tempProject: tempProject ?? GetUniqueTempProjectPathEachTest(testDirectory), // <-- is this a concern? offlineFeed: offlineFeed ?? new DirectoryPath("does not exist")); } diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerTests.cs b/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerTests.cs index e2593cc86abb..5b2b70c70647 100644 --- a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerTests.cs +++ b/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerTests.cs @@ -738,7 +738,7 @@ public void GivenARootWithNonAsciiCharacterInstallSucceeds() var installer = new ToolPackageInstaller( store: store, projectRestorer: new Stage2ProjectRestorer(Log, reporter), - tempProject: GetUniqueTempProjectPathEachTest(), + tempProject: GetUniqueTempProjectPathEachTest(), // <-- is this a concern? offlineFeed: new DirectoryPath("does not exist")); var package = installer.InstallPackage(new PackageLocation(nugetConfig: nugetConfigPath), From f6d903766800f9615be2b5781c34af796fed68c1 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 29 Jul 2022 16:57:10 -0700 Subject: [PATCH 003/185] Work on ToolPackageInstaller security --- .../ToolPackage/ToolPackageInstaller.cs | 26 +++++++++---------- src/Cli/dotnet/dotnet.csproj | 1 + 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index d3a5a4fdbbae..e67699232a63 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -54,7 +54,7 @@ public IToolPackage InstallPackage( Directory.CreateDirectory(stageDirectory.Value); rollbackDirectory = stageDirectory.Value; - Tuple tempProjectDetails = CreateDirectoryWithTempProject( + Tuple tempProjectDetails = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -66,13 +66,13 @@ public IToolPackage InstallPackage( try { _projectRestorer.Restore( - new FilePath(tempProjectDetails.Item1.ToString() + tempProjectDetails.Item2), + new FilePath(tempProjectDetails.Item1 + tempProjectDetails.Item2), packageLocation, verbosity: verbosity); } finally { - Directory.Delete(tempProjectDetails.Item1.ToString(), recursive: true); + Directory.Delete(tempProjectDetails.Item1, recursive: true); } var version = _store.GetStagedPackageVersion(stageDirectory, packageId); @@ -127,16 +127,14 @@ public IToolPackage InstallPackageToExternalManagedLocation( string targetFramework = null, string verbosity = null) { - var tempDirectoryForAssetJson = new DirectoryPath(Path.GetTempPath()) - .WithSubDirectories(Path.GetRandomFileName()); + var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); + File.WriteAllText(Path.Combine(tempDirectoryForAssetJson, "file1.txt"), null); - Directory.CreateDirectory(tempDirectoryForAssetJson.Value); - - var tempProject = CreateDirectoryWithTempProject( + Tuple tempProjectDetails = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, - assetJsonOutputDirectory: tempDirectoryForAssetJson, + assetJsonOutputDirectory: new DirectoryPath(tempDirectoryForAssetJson), restoreDirectory: null, rootConfigDirectory: packageLocation.RootConfigDirectory, additionalFeeds: packageLocation.AdditionalFeeds); @@ -144,19 +142,19 @@ public IToolPackage InstallPackageToExternalManagedLocation( try { _projectRestorer.Restore( - tempProject, + new FilePath(tempProjectDetails.Item1 + tempProjectDetails.Item2), packageLocation, verbosity: verbosity); } finally { - File.Delete(tempProject.Value); + Directory.Delete(tempProjectDetails.Item1, recursive:true); } - return ToolPackageInstance.CreateFromAssetFile(packageId, tempDirectoryForAssetJson); + return ToolPackageInstance.CreateFromAssetFile(packageId, new DirectoryPath(tempDirectoryForAssetJson)); } - private Tuple CreateDirectoryWithTempProject( + private Tuple CreateDirectoryWithTempProject( PackageId packageId, VersionRange versionRange, string targetFramework, @@ -198,7 +196,7 @@ private Tuple CreateDirectoryWithTempProject( new XAttribute("Sdk", "Microsoft.NET.Sdk")))); File.WriteAllText(Path.Combine(tempProjectDir, tempProjectName), tempProjectContent.ToString()); - return new Tuple(new FilePath(tempProjectDir), tempProjectName); + return new Tuple(tempProjectDir, tempProjectName); } private string JoinSourceAndOfflineCache(string[] additionalFeeds) diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj index 43f86755fd61..883ee9000809 100644 --- a/src/Cli/dotnet/dotnet.csproj +++ b/src/Cli/dotnet/dotnet.csproj @@ -20,6 +20,7 @@ + From abdd3e5b552849390be0638585463ae3b87d99db Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Mon, 1 Aug 2022 14:45:00 -0700 Subject: [PATCH 004/185] Dont use a tuple and make code less bad --- .../ToolPackage/ToolPackageInstaller.cs | 30 +++++++++---------- src/Tasks/Common/FileUtilities.cs | 7 +++++ 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index e67699232a63..6dace3c792a6 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -47,17 +47,18 @@ public IToolPackage InstallPackage( string rollbackDirectory = null; return TransactionalAction.Run( - action: () => { + action: () => + { try { var stageDirectory = _store.GetRandomStagingDirectory(); Directory.CreateDirectory(stageDirectory.Value); rollbackDirectory = stageDirectory.Value; - Tuple tempProjectDetails = CreateDirectoryWithTempProject( + string tempProjectPath = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, - targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, + targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, restoreDirectory: stageDirectory, assetJsonOutputDirectory: stageDirectory, rootConfigDirectory: packageLocation.RootConfigDirectory, @@ -66,13 +67,13 @@ public IToolPackage InstallPackage( try { _projectRestorer.Restore( - new FilePath(tempProjectDetails.Item1 + tempProjectDetails.Item2), + new FilePath(tempProjectPath), packageLocation, verbosity: verbosity); } finally { - Directory.Delete(tempProjectDetails.Item1, recursive: true); + Directory.Delete(Path.GetDirectoryName(tempProjectPath), recursive: true); } var version = _store.GetStagedPackageVersion(stageDirectory, packageId); @@ -105,7 +106,8 @@ public IToolPackage InstallPackage( ex); } }, - rollback: () => { + rollback: () => + { if (!string.IsNullOrEmpty(rollbackDirectory) && Directory.Exists(rollbackDirectory)) { Directory.Delete(rollbackDirectory, true); @@ -130,7 +132,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); File.WriteAllText(Path.Combine(tempDirectoryForAssetJson, "file1.txt"), null); - Tuple tempProjectDetails = CreateDirectoryWithTempProject( + string tempProjectDetails = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -142,19 +144,19 @@ public IToolPackage InstallPackageToExternalManagedLocation( try { _projectRestorer.Restore( - new FilePath(tempProjectDetails.Item1 + tempProjectDetails.Item2), + new FilePath(tempProjectDetails + tempProjectDetails), packageLocation, verbosity: verbosity); } finally { - Directory.Delete(tempProjectDetails.Item1, recursive:true); + Directory.Delete(Path.GetDirectoryName(tempProjectDetails), recursive: true); } return ToolPackageInstance.CreateFromAssetFile(packageId, new DirectoryPath(tempDirectoryForAssetJson)); } - private Tuple CreateDirectoryWithTempProject( + private string CreateDirectoryWithTempProject( PackageId packageId, VersionRange versionRange, string targetFramework, @@ -163,9 +165,7 @@ private Tuple CreateDirectoryWithTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - string tempProjectName = "restore.csproj"; - string tempProjectDir = _tempProject.ToString() ?? FileUtilities.CreateTempPath(); - File.WriteAllText(Path.Combine(tempProjectDir, tempProjectName), null); + string tempProject = _tempProject.ToString() ?? FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj"); var tempProjectContent = new XDocument( new XElement("Project", @@ -195,8 +195,8 @@ private Tuple CreateDirectoryWithTempProject( new XAttribute("Project", "Sdk.targets"), new XAttribute("Sdk", "Microsoft.NET.Sdk")))); - File.WriteAllText(Path.Combine(tempProjectDir, tempProjectName), tempProjectContent.ToString()); - return new Tuple(tempProjectDir, tempProjectName); + File.WriteAllText(tempProject, tempProjectContent.ToString()); + return tempProject; } private string JoinSourceAndOfflineCache(string[] additionalFeeds) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 423a7d5b3708..8c984d3a2295 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -43,5 +43,12 @@ public static string CreateTempPath() return path; } + public static string CreateTempFile(string tempDirectory, string extension) + { + string fileName = Path.ChangeExtension(Path.Combine(tempDirectory, Path.GetTempFileName()), extension); + File.Create(fileName); + return fileName; + } + } } From ff4a71ee2020dbdcdcc523fb754346f9a5096200 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Mon, 1 Aug 2022 16:25:58 -0700 Subject: [PATCH 005/185] Use filepath instead of str --- .../ToolPackage/ToolPackageInstaller.cs | 23 +++++++++++-------- src/Tasks/Common/FileUtilities.cs | 2 +- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index 6dace3c792a6..fec1bb34f600 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -55,7 +55,7 @@ public IToolPackage InstallPackage( Directory.CreateDirectory(stageDirectory.Value); rollbackDirectory = stageDirectory.Value; - string tempProjectPath = CreateDirectoryWithTempProject( + FilePath tempProject = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -67,13 +67,13 @@ public IToolPackage InstallPackage( try { _projectRestorer.Restore( - new FilePath(tempProjectPath), + tempProject, packageLocation, verbosity: verbosity); } finally { - Directory.Delete(Path.GetDirectoryName(tempProjectPath), recursive: true); + Directory.Delete(tempProject.GetDirectoryPath().ToString(), recursive: true); } var version = _store.GetStagedPackageVersion(stageDirectory, packageId); @@ -132,7 +132,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); File.WriteAllText(Path.Combine(tempDirectoryForAssetJson, "file1.txt"), null); - string tempProjectDetails = CreateDirectoryWithTempProject( + FilePath tempProject = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -144,19 +144,19 @@ public IToolPackage InstallPackageToExternalManagedLocation( try { _projectRestorer.Restore( - new FilePath(tempProjectDetails + tempProjectDetails), + tempProject, packageLocation, verbosity: verbosity); } finally { - Directory.Delete(Path.GetDirectoryName(tempProjectDetails), recursive: true); + Directory.Delete(tempProject.GetDirectoryPath().ToString(), recursive: true); } return ToolPackageInstance.CreateFromAssetFile(packageId, new DirectoryPath(tempDirectoryForAssetJson)); } - private string CreateDirectoryWithTempProject( + private FilePath CreateDirectoryWithTempProject( PackageId packageId, VersionRange versionRange, string targetFramework, @@ -165,7 +165,12 @@ private string CreateDirectoryWithTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - string tempProject = _tempProject.ToString() ?? FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj"); + FilePath tempProject = _tempProject ?? new FilePath(FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj")); + if (_tempProject != null) + { + tempProject = new FilePath(Path.ChangeExtension(tempProject.Value, "csproj")); + Directory.CreateDirectory(tempProject.GetDirectoryPath().Value); + } var tempProjectContent = new XDocument( new XElement("Project", @@ -195,7 +200,7 @@ private string CreateDirectoryWithTempProject( new XAttribute("Project", "Sdk.targets"), new XAttribute("Sdk", "Microsoft.NET.Sdk")))); - File.WriteAllText(tempProject, tempProjectContent.ToString()); + File.WriteAllText(tempProject.ToString(), tempProjectContent.ToString()); return tempProject; } diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 8c984d3a2295..e6c607d3444c 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -46,7 +46,7 @@ public static string CreateTempPath() public static string CreateTempFile(string tempDirectory, string extension) { string fileName = Path.ChangeExtension(Path.Combine(tempDirectory, Path.GetTempFileName()), extension); - File.Create(fileName); + File.Create(fileName.ToString()); return fileName; } From 1ce5b84578176f71215f843d1f029b6e86820a5f Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 2 Aug 2022 11:30:29 -0700 Subject: [PATCH 006/185] Fix bug/misleading code in FilePath with string --- .../FilePath.cs | 2 +- .../ToolPackage/ToolPackageInstaller.cs | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs b/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs index 06ed28ab76d7..3532e058decf 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs @@ -30,7 +30,7 @@ public string ToQuotedString() public override string ToString() { - return ToQuotedString(); + return $"{Value}"; } public DirectoryPath GetDirectoryPath() diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index fec1bb34f600..d2ec50c5dcf9 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -55,7 +55,7 @@ public IToolPackage InstallPackage( Directory.CreateDirectory(stageDirectory.Value); rollbackDirectory = stageDirectory.Value; - FilePath tempProject = CreateDirectoryWithTempProject( + string tempProject = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -67,13 +67,13 @@ public IToolPackage InstallPackage( try { _projectRestorer.Restore( - tempProject, + new FilePath(tempProject), packageLocation, verbosity: verbosity); } finally { - Directory.Delete(tempProject.GetDirectoryPath().ToString(), recursive: true); + Directory.Delete(Path.GetDirectoryName(tempProject), recursive: true); } var version = _store.GetStagedPackageVersion(stageDirectory, packageId); @@ -132,7 +132,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); File.WriteAllText(Path.Combine(tempDirectoryForAssetJson, "file1.txt"), null); - FilePath tempProject = CreateDirectoryWithTempProject( + string tempProject = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -144,19 +144,19 @@ public IToolPackage InstallPackageToExternalManagedLocation( try { _projectRestorer.Restore( - tempProject, + new FilePath(tempProject), packageLocation, verbosity: verbosity); } finally { - Directory.Delete(tempProject.GetDirectoryPath().ToString(), recursive: true); + Directory.Delete(Path.GetDirectoryName(tempProject), recursive: true); } return ToolPackageInstance.CreateFromAssetFile(packageId, new DirectoryPath(tempDirectoryForAssetJson)); } - private FilePath CreateDirectoryWithTempProject( + private string CreateDirectoryWithTempProject( PackageId packageId, VersionRange versionRange, string targetFramework, @@ -165,11 +165,11 @@ private FilePath CreateDirectoryWithTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - FilePath tempProject = _tempProject ?? new FilePath(FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj")); + string tempProject = _tempProject.ToString() ?? (FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj")); if (_tempProject != null) { - tempProject = new FilePath(Path.ChangeExtension(tempProject.Value, "csproj")); - Directory.CreateDirectory(tempProject.GetDirectoryPath().Value); + tempProject = Path.ChangeExtension(tempProject, "csproj"); + Directory.CreateDirectory(Path.GetDirectoryName(tempProject)); } var tempProjectContent = new XDocument( @@ -200,7 +200,7 @@ private FilePath CreateDirectoryWithTempProject( new XAttribute("Project", "Sdk.targets"), new XAttribute("Sdk", "Microsoft.NET.Sdk")))); - File.WriteAllText(tempProject.ToString(), tempProjectContent.ToString()); + File.WriteAllText(tempProject, tempProjectContent.ToString()); return tempProject; } From 63eb2f5c962ee6d053248ce31c0c79472a7bb322 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 3 Aug 2022 11:38:35 -0700 Subject: [PATCH 007/185] Fix biggest vulnerability. NEED TO TEST ON MAC --- .../SudoEnvironmentDirectoryOverride.cs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index 799c99fbec39..3e4072bd2842 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -8,6 +8,7 @@ using System.Linq; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools.Common; +using Microsoft.NET.Build.Tasks; using NuGet.Common; using NuGet.Configuration; @@ -18,8 +19,6 @@ namespace Microsoft.DotNet.Cli /// public static class SudoEnvironmentDirectoryOverride { - private const string SudoHomeDirectory = "/tmp/dotnet_sudo_home/"; - /// /// Not for security use. Detect if command is running under sudo /// via if SUDO_UID being set. @@ -38,22 +37,10 @@ public static void OverrideEnvironmentVariableToTmp(ParseResult parseResult) { if (!OperatingSystem.IsWindows() && IsRunningUnderSudo() && IsRunningWorkloadCommand(parseResult)) { - if (!TempHomeIsOnlyRootWritable(SudoHomeDirectory)) - { - try - { - Directory.Delete(SudoHomeDirectory, recursive: true); - } - catch (DirectoryNotFoundException) - { - // Avoid read after write race condition - } - } - - Directory.CreateDirectory(SudoHomeDirectory); + string newProcessHomeDirectory = FileUtilities.CreateTempPath(); var homeBeforeOverride = Path.Combine(Environment.GetEnvironmentVariable("HOME")); - Environment.SetEnvironmentVariable("HOME", SudoHomeDirectory); + Environment.SetEnvironmentVariable("HOME", newProcessHomeDirectory); CopyUserNuGetConfigToOverriddenHome(homeBeforeOverride); } From 9576b8138002e80742b797def6795cdefdcd278f Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 3 Aug 2022 15:03:50 -0700 Subject: [PATCH 008/185] Watchlist uses temp folder, need to verify .txt extension is OK --- .../dotnet-watch/Internal/MsBuildFileSetFactory.cs | 3 ++- src/BuiltInTools/dotnet-watch/dotnet-watch.csproj | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs index 77e0a621cdce..98ce0345592a 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Microsoft.DotNet.Watcher.Tools; using Microsoft.Extensions.Tools.Internal; +using Microsoft.NET.Build.Tasks; using IReporter = Microsoft.Extensions.Tools.Internal.IReporter; namespace Microsoft.DotNet.Watcher.Internal @@ -63,7 +64,7 @@ internal MsBuildFileSetFactory( public async Task CreateAsync(CancellationToken cancellationToken) { - var watchList = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + var watchList = FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), ".txt"); try { var projectDir = Path.GetDirectoryName(_projectFile); diff --git a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj index 636f43d119b4..c3746d05d6c6 100644 --- a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj +++ b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj @@ -23,6 +23,8 @@ + + From 4ee8f19a3e2d4a65cdae107445e84579845c5cd9 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 10 Aug 2022 16:06:50 -0700 Subject: [PATCH 009/185] use temp path for nupkg. audited all of the varialbes relying on tempdir and seems fine --- .../install/ToolInstallGlobalOrToolPathCommand.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs index 7e06aae182b1..987fc0a16d00 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs @@ -19,6 +19,7 @@ using NuGet.Common; using NuGet.Frameworks; using NuGet.Versioning; +using Microsoft.NET.Build.Tasks; namespace Microsoft.DotNet.Tools.Tool.Install { @@ -72,7 +73,7 @@ public ToolInstallGlobalOrToolPathCommand( _environmentPathInstruction = environmentPathInstruction ?? EnvironmentPathFactory.CreateEnvironmentPathInstruction(); _createShellShimRepository = createShellShimRepository ?? ShellShimRepositoryFactory.CreateShellShimRepository; - var tempDir = new DirectoryPath(Path.Combine(Path.GetTempPath(), "dotnet-tool-install")); + var tempDir = new DirectoryPath(FileUtilities.CreateTempPath()); var configOption = parseResult.GetValueForOption(ToolInstallCommandParser.ConfigOption); var sourceOption = parseResult.GetValueForOption(ToolInstallCommandParser.AddSourceOption); var packageSourceLocation = new PackageSourceLocation(string.IsNullOrEmpty(configOption) ? null : new FilePath(configOption), additionalSourceFeeds: sourceOption); @@ -143,7 +144,7 @@ public override int Execute() } else { - framework = string.IsNullOrEmpty(_framework) ? + framework = string.IsNullOrEmpty(_framework) ? null : NuGetFramework.Parse(_framework); } From 14491d5ea79a493e40391d40397560c67eefa3c8 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 10 Aug 2022 16:32:05 -0700 Subject: [PATCH 010/185] Apply change to shellshimremover --- src/Cli/dotnet/ShellShim/ShellShimRepository.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index 4dee9748d079..6a653eee5887 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -9,6 +9,7 @@ using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools; using Microsoft.Extensions.EnvironmentAbstractions; +using Microsoft.NET.Build.Tasks; namespace Microsoft.DotNet.ShellShim { @@ -85,7 +86,8 @@ public void CreateShim(FilePath targetExecutablePath, ToolCommandName commandNam ex); } }, - rollback: () => { + rollback: () => + { foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value))) { File.Delete(file.Value); @@ -97,12 +99,13 @@ public void RemoveShim(ToolCommandName commandName) { var files = new Dictionary(); TransactionalAction.Run( - action: () => { + action: () => + { try { foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value))) { - var tempPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + var tempPath = FileUtilities.CreateTempPath(); FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(file.Value, tempPath)); files[file.Value] = tempPath; } @@ -118,13 +121,15 @@ public void RemoveShim(ToolCommandName commandName) ex); } }, - commit: () => { + commit: () => + { foreach (var value in files.Values) { _fileSystem.File.Delete(value); } }, - rollback: () => { + rollback: () => + { foreach (var kvp in files) { FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(kvp.Value, kvp.Key)); From 35cf02496b139e052a0648661217f81866ae556e Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 11 Aug 2022 09:27:27 -0700 Subject: [PATCH 011/185] Catch race condition on file set factory delete --- .../dotnet-watch/Internal/MsBuildFileSetFactory.cs | 9 ++++++++- .../dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs index 98ce0345592a..809d39b9c58f 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs @@ -196,7 +196,14 @@ public async Task CreateAsync(CancellationToken cancellationToken) { if (File.Exists(watchList)) { - File.Delete(watchList); + try + { + File.Delete(watchList); + } + catch(System.IO.IOException) + { + // Catch file locking problems on deletion. + } } } } diff --git a/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs b/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs index 00f749ca9d66..b8728a654057 100644 --- a/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs +++ b/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs @@ -308,7 +308,7 @@ public async Task TransitiveProjectReferences_TwoLevels() Assert.All(fileset, f => Assert.False(f.IsStaticFile, $"File {f.FilePath} should not be a static file.")); } - [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/29213")] + [Fact] public async Task ProjectReferences_Graph() { // A->B,F,W(Watch=False) From 00d4028a555dcee4c7151614ad22f4ebedd2b94c Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 11 Aug 2022 17:00:51 -0700 Subject: [PATCH 012/185] Security check on workload command base --- .../dotnet/commands/dotnet-workload/WorkloadCommandBase.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs index 55bd273ae1c2..83c092b16672 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs @@ -8,6 +8,7 @@ using Microsoft.DotNet.Cli.NuGetPackageDownloader; using Microsoft.DotNet.Cli.Utils; using Microsoft.Extensions.EnvironmentAbstractions; +using Microsoft.NET.Build.Tasks; using NuGet.Common; namespace Microsoft.DotNet.Workloads.Workload @@ -104,9 +105,10 @@ public WorkloadCommandBase(ParseResult parseResult, ? tempDirPath : !string.IsNullOrWhiteSpace(parseResult.GetValueForOption(WorkloadInstallCommandParser.TempDirOption)) ? parseResult.GetValueForOption(WorkloadInstallCommandParser.TempDirOption) - : Path.GetTempPath(); + : ""; - TempPackagesDirectory = new DirectoryPath(Path.Combine(TempDirectoryPath, "dotnet-sdk-advertising-temp")); + // The security owness on a custom tempDir is on the user according to docs. + TempPackagesDirectory = new DirectoryPath(TempDirectoryPath == "" ? FileUtilities.CreateTempPath() : Path.Combine(TempDirectoryPath, "dotnet-sdk-advertising-temp")); PackageDownloader = nugetPackageDownloader ?? new NuGetPackageDownloader(TempPackagesDirectory, filePermissionSetter: null, From fdb7f1b1238339cc12f1ea743ed163e91851703e Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 12 Aug 2022 14:28:44 -0700 Subject: [PATCH 013/185] Dispose file and fix problem in shellshimrepo. We dont use move anymore because we need someone to make a file with secure permissions and gettempfilename does that but getrandomfilename does not. Moving a file would override the permissions so we copy file contents over. --- src/Cli/dotnet/ShellShim/ShellShimRepository.cs | 12 +++++++++--- src/Tasks/Common/FileUtilities.cs | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index 6a653eee5887..79c02050afe3 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -105,9 +105,15 @@ public void RemoveShim(ToolCommandName commandName) { foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value))) { - var tempPath = FileUtilities.CreateTempPath(); - FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(file.Value, tempPath)); - files[file.Value] = tempPath; + using (var tempPath = File.OpenWrite(FileUtilities.CreateTempFile())) + { + Stream oldFile = _fileSystem.File.OpenRead(file.Value); + oldFile.Seek(0, SeekOrigin.Begin); + oldFile.CopyTo(tempPath); + oldFile.Dispose(); + File.Delete(file.Value); + files[file.Value] = tempPath.Name; + } } } catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index e6c607d3444c..0ef0f61acfb6 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -43,12 +43,25 @@ public static string CreateTempPath() return path; } - public static string CreateTempFile(string tempDirectory, string extension) + public static string CreateTempFile(string tempDirectory, string extension="") { + if(extension == "") + { + extension = Path.GetExtension(Path.GetRandomFileName()); + } string fileName = Path.ChangeExtension(Path.Combine(tempDirectory, Path.GetTempFileName()), extension); File.Create(fileName.ToString()); return fileName; } + /// + /// + /// + /// The full path of a newly created temp file with OK permissions. + public static string CreateTempFile() + { + return Path.GetTempFileName(); + } + } } From 9f4ac8a9197900ef1c92cc736ad8b100c8f746ec Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 12 Aug 2022 15:34:08 -0700 Subject: [PATCH 014/185] [wip] add some code to try to fix directory bug. Not sure how to use this new lib, need to ask some people --- src/Tasks/Common/FileUtilities.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 0ef0f61acfb6..199c8eda7200 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -7,6 +7,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Runtime.InteropServices; +using Microsoft.DotNet.Cli; namespace Microsoft.NET.Build.Tasks { @@ -35,11 +37,19 @@ public static Version TryGetAssemblyVersion(string sourcePath) return s_assemblyExtensions.Contains(extension) ? GetAssemblyVersion(sourcePath) : null; } + [DllImport("libc", SetLastError = true)] + public static extern int mkdir(string pathname, UnixFileMode mode); public static string CreateTempPath() { - // TODO: Make this call the API once it is complete. string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); - Directory.CreateDirectory(path); + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + mkdir(path, StatInterop.Permissions.S_IRWXU) + } + else + { + Directory.CreateDirectory(path, StatInterop.Permissions.S_IRWXU); + } return path; } From 9ef2facd1bd9fc2c9f936991c6907ac268c5c6f3 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 10:14:30 -0700 Subject: [PATCH 015/185] Do the secure thing for temp files in fileutilities --- src/Tasks/Common/FileUtilities.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 199c8eda7200..ef205fb3f32c 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -38,24 +38,28 @@ public static Version TryGetAssemblyVersion(string sourcePath) } [DllImport("libc", SetLastError = true)] - public static extern int mkdir(string pathname, UnixFileMode mode); + public static extern int mkdir(string pathname, uint mode); public static string CreateTempPath() { string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - mkdir(path, StatInterop.Permissions.S_IRWXU) + int dotnet_version = 7; // Changed in backported code. This can be out of date for .NET 8+ and still be fine. + if (dotnet_version < 7) + mkdir(path, 007000); + else + Directory.CreateDirectory(path, UnixFileMode.UserWrite | UnixFileMode.UserExecute | UnixFileMode.UserRead); } else { - Directory.CreateDirectory(path, StatInterop.Permissions.S_IRWXU); + Directory.CreateDirectory(path); } return path; } - public static string CreateTempFile(string tempDirectory, string extension="") + public static string CreateTempFile(string tempDirectory, string extension = "") { - if(extension == "") + if (extension == "") { extension = Path.GetExtension(Path.GetRandomFileName()); } From faea41cd3f3e9addcee6f78c807f600c3e4d0bfe Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 11:15:36 -0700 Subject: [PATCH 016/185] Fix security bug in file based installer --- src/Cli/dotnet/commands/InstallingWorkloadCommand.cs | 3 ++- .../commands/dotnet-workload/install/FileBasedInstaller.cs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index 6253cb93224a..98690dfea13e 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -19,6 +19,7 @@ using Microsoft.DotNet.Workloads.Workload.Install; using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord; using Microsoft.Extensions.EnvironmentAbstractions; +using Microsoft.NET.Build.Tasks; using Microsoft.NET.Sdk.WorkloadManifestReader; using NuGet.Versioning; using Command = System.CommandLine.Command; @@ -87,7 +88,7 @@ protected async Task> GetDownloads(IEnumerable workloadIds, SdkFeatureBand Directory.Delete(dir, true); } } - }); + }); } } From 85afebd66740b41e94912c352141bdc93976e34e Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 11:19:16 -0700 Subject: [PATCH 017/185] Apply change to workloadmanifestupdater --- .../install/WorkloadManifestUpdater.cs | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index 6fe1fb375903..5e44216a4e66 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -17,6 +17,7 @@ using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord; using Microsoft.Extensions.EnvironmentAbstractions; +using Microsoft.NET.Build.Tasks; using Microsoft.NET.Sdk.WorkloadManifestReader; using NuGet.Common; using NuGet.Versioning; @@ -68,7 +69,7 @@ private static WorkloadManifestUpdater GetInstance(string userProfileDir) var sdkVersion = Product.Version; var workloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(dotnetPath, sdkVersion, userProfileDir); var workloadResolver = WorkloadResolver.Create(workloadManifestProvider, dotnetPath, sdkVersion, userProfileDir); - var tempPackagesDir = new DirectoryPath(Path.Combine(Path.GetTempPath(), "dotnet-sdk-advertising-temp")); + var tempPackagesDir = new DirectoryPath(FileUtilities.CreateTempPath()); var nugetPackageDownloader = new NuGetPackageDownloader(tempPackagesDir, filePermissionSetter: null, new FirstPartyNuGetPackageSigningVerifier(), @@ -188,9 +189,9 @@ Dictionary Workloads } if (advertisingManifestVersionAndWorkloads != null && - ((advertisingManifestVersionAndWorkloads.Value.ManifestVersion.CompareTo(currentManifestVersion.manifestVersion) > 0 + ((advertisingManifestVersionAndWorkloads.Value.ManifestVersion.CompareTo(currentManifestVersion.manifestVersion) > 0 && advertisingManifestVersionAndWorkloads.Value.ManifestFeatureBand.Equals(currentManifestVersion.sdkFeatureBand)) || - advertisingManifestVersionAndWorkloads.Value.ManifestFeatureBand.CompareTo(currentManifestVersion.sdkFeatureBand) > 0)) + advertisingManifestVersionAndWorkloads.Value.ManifestFeatureBand.CompareTo(currentManifestVersion.sdkFeatureBand) > 0)) { manifestUpdates.Add((new ManifestVersionUpdate(manifestId, currentManifestVersion.manifestVersion, currentManifestVersion.sdkFeatureBand.ToString(), advertisingManifestVersionAndWorkloads.Value.ManifestVersion, advertisingManifestVersionAndWorkloads.Value.ManifestFeatureBand.ToString()), @@ -275,7 +276,7 @@ private async Task UpdateAdvertisingManifestAsync(WorkloadManifestInfo manifest, try { var adManifestPath = GetAdvertisingManifestPath(_sdkFeatureBand, manifestId); - + bool success; (success, packagePath) = await GetManifestPackageUpdate(_sdkFeatureBand, manifestId, includePreviews, offlineCache); if (!success) @@ -291,7 +292,7 @@ private async Task UpdateAdvertisingManifestAsync(WorkloadManifestInfo manifest, _reporter.WriteLine(string.Format(LocalizableStrings.AdManifestPackageDoesNotExist, manifestId)); return; } - + await _workloadManifestInstaller.ExtractManifestAsync(packagePath, adManifestPath); // add file that contains the advertisted manifest feature band so GetAdvertisingManifestVersionAndWorkloads will use correct feature band, regardless of if rollback occurred or not @@ -352,7 +353,7 @@ private async Task UpdateAdvertisingManifestAsync(WorkloadManifestInfo manifest, { adManifestFeatureBand = new SdkFeatureBand(File.ReadAllText(adManifestFeatureBandPath)); } - + return (new ManifestVersion(manifest.Version), adManifestFeatureBand, manifest.Workloads.Values.OfType().ToDictionary(w => w.Id)); } @@ -438,12 +439,12 @@ private async Task NewerManifestPackageExists(ManifestId manifest) ManifestVersion manifestVersion; SdkFeatureBand manifestFeatureBand; var parts = manifest.Value.Split('/'); - + string manifestVersionString = (parts[0]); if (!FXVersion.TryParse(manifestVersionString, out FXVersion version)) { throw new FormatException(String.Format(LocalizableStrings.InvalidVersionForWorkload, manifest.Key, manifestVersionString)); - } + } manifestVersion = new ManifestVersion(parts[0]); if (parts.Length == 1) @@ -467,15 +468,15 @@ private bool BackgroundUpdatesAreDisabled() => private static string GetAdvertisingWorkloadsFilePath(string userProfileDir, SdkFeatureBand featureBand) => Path.Combine(userProfileDir, $".workloadAdvertisingUpdates{featureBand}"); - private async Task GetOnlinePackagePath(SdkFeatureBand sdkFeatureBand, ManifestId manifestId, bool includePreviews) - { - string packagePath = await _nugetPackageDownloader.DownloadPackageAsync( - _workloadManifestInstaller.GetManifestPackageId(manifestId, sdkFeatureBand), - packageSourceLocation: _packageSourceLocation, - includePreview: includePreviews); - - return packagePath; - } + private async Task GetOnlinePackagePath(SdkFeatureBand sdkFeatureBand, ManifestId manifestId, bool includePreviews) + { + string packagePath = await _nugetPackageDownloader.DownloadPackageAsync( + _workloadManifestInstaller.GetManifestPackageId(manifestId, sdkFeatureBand), + packageSourceLocation: _packageSourceLocation, + includePreview: includePreviews); + + return packagePath; + } private string GetOfflinePackagePath(SdkFeatureBand sdkFeatureBand, ManifestId manifestId, DirectoryPath? offlineCache = null) { @@ -495,7 +496,7 @@ private string GetOfflinePackagePath(SdkFeatureBand sdkFeatureBand, ManifestId m { if (offlineCache == null || !offlineCache.HasValue) { - try + try { string packagePath = await GetOnlinePackagePath(sdkFeatureBand, manifestId, includePreviews); return (true, packagePath); From aa5cdc7e0fdc5e41fcd1ee5a9845af8e949f4d70 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 11:31:16 -0700 Subject: [PATCH 018/185] Fix uint perm --- src/Tasks/Common/FileUtilities.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index ef205fb3f32c..0de7f99b8c28 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -8,7 +8,6 @@ using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; -using Microsoft.DotNet.Cli; namespace Microsoft.NET.Build.Tasks { @@ -46,7 +45,7 @@ public static string CreateTempPath() { int dotnet_version = 7; // Changed in backported code. This can be out of date for .NET 8+ and still be fine. if (dotnet_version < 7) - mkdir(path, 007000); + mkdir(path, 0000700); else Directory.CreateDirectory(path, UnixFileMode.UserWrite | UnixFileMode.UserExecute | UnixFileMode.UserRead); } From e22b6e22ea13245a1c946a66a12c6b2c8a341087 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 11:32:31 -0700 Subject: [PATCH 019/185] Ditch unix file mode --- src/Tasks/Common/FileUtilities.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 0de7f99b8c28..b93077d34602 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -43,11 +43,7 @@ public static string CreateTempPath() string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - int dotnet_version = 7; // Changed in backported code. This can be out of date for .NET 8+ and still be fine. - if (dotnet_version < 7) - mkdir(path, 0000700); - else - Directory.CreateDirectory(path, UnixFileMode.UserWrite | UnixFileMode.UserExecute | UnixFileMode.UserRead); + mkdir(path, 0000700); } else { From 903da3fa5521ba93d14c7b1050d69e7087f83423 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 11:58:42 -0700 Subject: [PATCH 020/185] Fix silly bug with temp path. --- src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs index 83c092b16672..33c6eed92276 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs @@ -105,7 +105,7 @@ public WorkloadCommandBase(ParseResult parseResult, ? tempDirPath : !string.IsNullOrWhiteSpace(parseResult.GetValueForOption(WorkloadInstallCommandParser.TempDirOption)) ? parseResult.GetValueForOption(WorkloadInstallCommandParser.TempDirOption) - : ""; + : FileUtilities.CreateTempPath(); // The security owness on a custom tempDir is on the user according to docs. TempPackagesDirectory = new DirectoryPath(TempDirectoryPath == "" ? FileUtilities.CreateTempPath() : Path.Combine(TempDirectoryPath, "dotnet-sdk-advertising-temp")); From f5f250b6c1daf0e39fbde6d759cd39a7b4a923ce Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 15:18:25 -0700 Subject: [PATCH 021/185] Override chown and chmod use to give user perm instead of sudo perm --- .../SudoEnvironmentDirectoryOverride.cs | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index 3e4072bd2842..9071e4c4c68f 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -6,6 +6,7 @@ using System.CommandLine.Parsing; using System.IO; using System.Linq; +using System.Runtime.InteropServices; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools.Common; using Microsoft.NET.Build.Tasks; @@ -33,12 +34,26 @@ public static bool IsRunningUnderSudo() return false; } + + [DllImport("libc", SetLastError = true)] + public static extern int chown(string username, string path); + [DllImport("libc", SetLastError = true)] + private static extern int chmod(string pathname, uint mode); + private static void OverridePathFromSudoPermToSudoUserPerm(string path) + { + if (!OperatingSystem.IsWindows() && IsRunningUnderSudo()) + { + chown(Environment.GetEnvironmentVariable("SUDO_USER"), path); + chmod(path, 0000700); + } + } + public static void OverrideEnvironmentVariableToTmp(ParseResult parseResult) { if (!OperatingSystem.IsWindows() && IsRunningUnderSudo() && IsRunningWorkloadCommand(parseResult)) { string newProcessHomeDirectory = FileUtilities.CreateTempPath(); - + OverridePathFromSudoPermToSudoUserPerm(newProcessHomeDirectory); var homeBeforeOverride = Path.Combine(Environment.GetEnvironmentVariable("HOME")); Environment.SetEnvironmentVariable("HOME", newProcessHomeDirectory); @@ -108,12 +123,12 @@ private static bool TempHomeIsOnlyRootWritable(string path) private static bool OtherUserCannotWrite(StatInterop.FileStatus fileStat) { - return (fileStat.Mode & (int) StatInterop.Permissions.S_IWOTH) == 0; + return (fileStat.Mode & (int)StatInterop.Permissions.S_IWOTH) == 0; } private static bool GroupCannotWrite(StatInterop.FileStatus fileStat) { - return (fileStat.Mode & (int) StatInterop.Permissions.S_IWGRP) == 0; + return (fileStat.Mode & (int)StatInterop.Permissions.S_IWGRP) == 0; } private static bool IsOwnedByRoot(StatInterop.FileStatus fileStat) From 7eb80e5266ae64ab802375ce74edc2f5da1dfa2a Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 18 Aug 2022 11:19:17 -0700 Subject: [PATCH 022/185] Drop lock on file --- .../dotnet-watch/Internal/MsBuildFileSetFactory.cs | 2 +- src/Tasks/Common/FileUtilities.cs | 3 ++- src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs index 809d39b9c58f..2b0751881b3a 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs @@ -64,7 +64,7 @@ internal MsBuildFileSetFactory( public async Task CreateAsync(CancellationToken cancellationToken) { - var watchList = FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), ".txt"); + var watchList = FileUtilities.CreateTempFile(FileUtilities.CreateTempPath()); try { var projectDir = Path.GetDirectoryName(_projectFile); diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index b93077d34602..aeeb1c4c1437 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -59,7 +59,8 @@ public static string CreateTempFile(string tempDirectory, string extension = "") extension = Path.GetExtension(Path.GetRandomFileName()); } string fileName = Path.ChangeExtension(Path.Combine(tempDirectory, Path.GetTempFileName()), extension); - File.Create(fileName.ToString()); + var fstream = File.Create(fileName.ToString()); + fstream.Close(); return fileName; } diff --git a/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs b/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs index b8728a654057..00f749ca9d66 100644 --- a/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs +++ b/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs @@ -308,7 +308,7 @@ public async Task TransitiveProjectReferences_TwoLevels() Assert.All(fileset, f => Assert.False(f.IsStaticFile, $"File {f.FilePath} should not be a static file.")); } - [Fact] + [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/29213")] public async Task ProjectReferences_Graph() { // A->B,F,W(Watch=False) From 67a96ba67d3f4eb6788821f4931f49ec8fb1baf0 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 18 Aug 2022 11:30:55 -0700 Subject: [PATCH 023/185] Use my createtempfile function in toolcmd --- src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index d2ec50c5dcf9..4b86af94aa59 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -130,7 +130,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( string verbosity = null) { var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); - File.WriteAllText(Path.Combine(tempDirectoryForAssetJson, "file1.txt"), null); + FileUtilities.CreateTempFile(tempDirectoryForAssetJson); string tempProject = CreateDirectoryWithTempProject( packageId: packageId, From 1b6f325e16c2f0f3cc4617fba2d0621a1456558b Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 19 Aug 2022 14:27:54 -0700 Subject: [PATCH 024/185] make changes to lock file --- src/Cli/dotnet/ShellShim/ShellShimRepository.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index 79c02050afe3..9913180f14ba 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -107,7 +107,9 @@ public void RemoveShim(ToolCommandName commandName) { using (var tempPath = File.OpenWrite(FileUtilities.CreateTempFile())) { - Stream oldFile = _fileSystem.File.OpenRead(file.Value); + if (!File.Exists(file.Value)) + continue; + Stream oldFile = new FileStream(file.Value, FileMode.Open, FileAccess.ReadWrite, FileShare.None); oldFile.Seek(0, SeekOrigin.Begin); oldFile.CopyTo(tempPath); oldFile.Dispose(); From 7e54ad4107cdaee776762741d5c82b5c85cbcfee Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 23 Aug 2022 14:06:01 -0700 Subject: [PATCH 025/185] catch trying to del non existent file --- .../dotnet/ShellShim/ShellShimRepository.cs | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index 79c02050afe3..34f9eed4900c 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -105,14 +105,24 @@ public void RemoveShim(ToolCommandName commandName) { foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value))) { - using (var tempPath = File.OpenWrite(FileUtilities.CreateTempFile())) + if (File.Exists(file.ToString())) { - Stream oldFile = _fileSystem.File.OpenRead(file.Value); - oldFile.Seek(0, SeekOrigin.Begin); - oldFile.CopyTo(tempPath); - oldFile.Dispose(); - File.Delete(file.Value); - files[file.Value] = tempPath.Name; + try + { + Stream oldFile = _fileSystem.File.OpenRead(file.Value); + using (var tempPath = File.OpenWrite(FileUtilities.CreateTempFile())) + { + oldFile.Seek(0, SeekOrigin.Begin); + oldFile.CopyTo(tempPath); + oldFile.Dispose(); + File.Delete(file.Value); + files[file.Value] = tempPath.Name; + } + } + catch (Exception ex) when (ex is System.IO.FileNotFoundException || ex is System.IO.IOException) // catch race condition on file lock + { + continue; + } } } } From 2a5f1d548b0be87dda31534047ddf2355e1396b3 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 23 Aug 2022 14:24:18 -0700 Subject: [PATCH 026/185] Fix bug with secure file moving --- .../dotnet/ShellShim/ShellShimRepository.cs | 24 ++++--------------- .../SudoEnvironmentDirectoryOverride.cs | 4 +--- src/Tasks/Common/FileUtilities.cs | 11 +++++++++ 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index 34f9eed4900c..515033241bf1 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -105,25 +105,11 @@ public void RemoveShim(ToolCommandName commandName) { foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value))) { - if (File.Exists(file.ToString())) - { - try - { - Stream oldFile = _fileSystem.File.OpenRead(file.Value); - using (var tempPath = File.OpenWrite(FileUtilities.CreateTempFile())) - { - oldFile.Seek(0, SeekOrigin.Begin); - oldFile.CopyTo(tempPath); - oldFile.Dispose(); - File.Delete(file.Value); - files[file.Value] = tempPath.Name; - } - } - catch (Exception ex) when (ex is System.IO.FileNotFoundException || ex is System.IO.IOException) // catch race condition on file lock - { - continue; - } - } + string tempPath = FileUtilities.CreateTempFile(); + File.Delete(tempPath); + FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(file.Value, tempPath)); + FileUtilities.ResetTempFilePermissions(tempPath); + files[file.Value] = tempPath; } } catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException) diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index 9071e4c4c68f..be1e5e83f402 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -37,14 +37,12 @@ public static bool IsRunningUnderSudo() [DllImport("libc", SetLastError = true)] public static extern int chown(string username, string path); - [DllImport("libc", SetLastError = true)] - private static extern int chmod(string pathname, uint mode); private static void OverridePathFromSudoPermToSudoUserPerm(string path) { if (!OperatingSystem.IsWindows() && IsRunningUnderSudo()) { chown(Environment.GetEnvironmentVariable("SUDO_USER"), path); - chmod(path, 0000700); + FileUtilities.ResetTempFilePermissions(path); } } diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index aeeb1c4c1437..1c73015c7c3f 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -73,5 +73,16 @@ public static string CreateTempFile() return Path.GetTempFileName(); } + + [DllImport("libc", SetLastError = true)] + private static extern int chmod(string pathname, uint mode); + public static void ResetTempFilePermissions(string path) + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + chmod(path, 0000700); + } + } + } } From 9ff44314325047aa052fde8dcaa58260e40a555a Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 23 Aug 2022 14:55:17 -0700 Subject: [PATCH 027/185] Fix it runs with specified verbosity --- src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index 4b86af94aa59..8bbc9d182689 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -14,6 +14,7 @@ using NuGet.ProjectModel; using NuGet.Versioning; using Microsoft.NET.Build.Tasks; +using System.Diagnostics; namespace Microsoft.DotNet.ToolPackage { @@ -165,7 +166,7 @@ private string CreateDirectoryWithTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - string tempProject = _tempProject.ToString() ?? (FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj")); + string tempProject = _tempProject != null ? _tempProject.ToString() : (FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj")); if (_tempProject != null) { tempProject = Path.ChangeExtension(tempProject, "csproj"); From 633c9ba497cf053c51184bbdc827537af5f8a810 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 22 Aug 2022 11:23:32 -0400 Subject: [PATCH 028/185] Work around analyzer bug --- src/Microsoft.Win32.Msi/NativeMethods.cs | 3 +++ src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/Microsoft.Win32.Msi/NativeMethods.cs b/src/Microsoft.Win32.Msi/NativeMethods.cs index eb60d99ac393..52936f2346b0 100644 --- a/src/Microsoft.Win32.Msi/NativeMethods.cs +++ b/src/Microsoft.Win32.Msi/NativeMethods.cs @@ -5,6 +5,9 @@ using System.Runtime.InteropServices; using System.Text; +// Work around https://github.com/dotnet/roslyn-analyzers/issues/6094 +#pragma warning disable CA1420 + namespace Microsoft.Win32.Msi { /// diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs index a407c81d0f5c..fb0329d275c4 100644 --- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs +++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs @@ -8,6 +8,9 @@ #nullable disable +// Work around https://github.com/dotnet/roslyn-analyzers/issues/6094 +#pragma warning disable CA1420 + namespace Microsoft.DotNet.NativeWrapper { public static partial class Interop From ded6ab0bcf6e51f246b22d489417bbdbd1151853 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 25 Aug 2022 12:34:51 -0700 Subject: [PATCH 029/185] Try using chown in other places where sudo might be used in a workload install --- .../SudoEnvironmentDirectoryOverride.cs | 4 --- src/Tasks/Common/FileUtilities.cs | 26 ++++++++++++++++--- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index be1e5e83f402..7e1861d100e7 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -34,14 +34,10 @@ public static bool IsRunningUnderSudo() return false; } - - [DllImport("libc", SetLastError = true)] - public static extern int chown(string username, string path); private static void OverridePathFromSudoPermToSudoUserPerm(string path) { if (!OperatingSystem.IsWindows() && IsRunningUnderSudo()) { - chown(Environment.GetEnvironmentVariable("SUDO_USER"), path); FileUtilities.ResetTempFilePermissions(path); } } diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 1c73015c7c3f..075ea805975a 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -37,13 +37,18 @@ public static Version TryGetAssemblyVersion(string sourcePath) } [DllImport("libc", SetLastError = true)] - public static extern int mkdir(string pathname, uint mode); + public static extern int mkdir(string pathname, int mode); public static string CreateTempPath() { string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - mkdir(path, 0000700); + const int S_IRUSR = 256; + const int S_IWUSR = 128; + const int S_IXUSR = 64; + int _700 = S_IRUSR | S_IWUSR | S_IXUSR; + mkdir(path, _700); + ResetTempFilePermissions(path); } else { @@ -61,6 +66,7 @@ public static string CreateTempFile(string tempDirectory, string extension = "") string fileName = Path.ChangeExtension(Path.Combine(tempDirectory, Path.GetTempFileName()), extension); var fstream = File.Create(fileName.ToString()); fstream.Close(); + ResetTempFilePermissions(fileName); return fileName; } @@ -75,12 +81,24 @@ public static string CreateTempFile() [DllImport("libc", SetLastError = true)] - private static extern int chmod(string pathname, uint mode); + private static extern int chmod(string pathname, int mode); + [DllImport("libc", SetLastError = true)] + public static extern int chown(string path, int owner, int group); public static void ResetTempFilePermissions(string path) { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - chmod(path, 0000700); + if(Environment.GetEnvironmentVariable("SUDO_USER") != null) + { + string UID = Environment.GetEnvironmentVariable("SUDO_UID"); + string GID = Environment.GetEnvironmentVariable("SUDO_GID"); + chown(path, Int32.Parse(UID), Int32.Parse(GID)); + } + const int S_IRUSR = 256; + const int S_IWUSR = 128; + const int S_IXUSR = 64; + int _700 = S_IRUSR | S_IWUSR | S_IXUSR; + chmod(path, _700); } } From 3403cb93f0e381922d1948e2395a6ad7dfadc74a Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 25 Aug 2022 17:02:42 -0700 Subject: [PATCH 030/185] try not calling chown --- src/Tasks/Common/FileUtilities.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 075ea805975a..f29507f9abe3 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -92,7 +92,7 @@ public static void ResetTempFilePermissions(string path) { string UID = Environment.GetEnvironmentVariable("SUDO_UID"); string GID = Environment.GetEnvironmentVariable("SUDO_GID"); - chown(path, Int32.Parse(UID), Int32.Parse(GID)); + //chown(path, Int32.Parse(UID), Int32.Parse(GID)); } const int S_IRUSR = 256; const int S_IWUSR = 128; From 75b221bedde4724debfa31b9a4bf8211b7b1fb35 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 26 Aug 2022 11:55:48 -0700 Subject: [PATCH 031/185] Fix ugly things I did in toolpackageinstaller --- src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index 8bbc9d182689..324897160085 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -131,7 +131,6 @@ public IToolPackage InstallPackageToExternalManagedLocation( string verbosity = null) { var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); - FileUtilities.CreateTempFile(tempDirectoryForAssetJson); string tempProject = CreateDirectoryWithTempProject( packageId: packageId, @@ -166,13 +165,9 @@ private string CreateDirectoryWithTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - string tempProject = _tempProject != null ? _tempProject.ToString() : (FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj")); - if (_tempProject != null) - { - tempProject = Path.ChangeExtension(tempProject, "csproj"); - Directory.CreateDirectory(Path.GetDirectoryName(tempProject)); - } + string tempProject = _tempProject != null && _tempProject.HasValue ? _tempProject.Value.Value : FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj"); + Directory.CreateDirectory(Path.GetDirectoryName(tempProject)); var tempProjectContent = new XDocument( new XElement("Project", new XElement("PropertyGroup", From 327dc013c034d5c85ea663ef4c7bf26f38d78c9f Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Mon, 29 Aug 2022 21:41:38 +0000 Subject: [PATCH 032/185] Make output very verbose --- src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs b/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs index 4e954d6cd20e..769aee9afbc5 100644 --- a/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs +++ b/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs @@ -91,6 +91,9 @@ public void ItListsAutoReferencedPackages() .WithProjectChanges(ChangeTargetFrameworkTo2_1); var projectDirectory = testAsset.Path; + var debugCmd = new DotnetCommand(Log); + debugCmd.Execute($"dotnet", "msbuild", "--pp", $"{projectDirectory + "\\TestAppSimple.csproj"}"); + new RestoreCommand(testAsset) .Execute() .Should() From a7eee337035f0145d0ec6e139620dc2eeb86a41a Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 29 Jul 2022 16:07:28 -0700 Subject: [PATCH 033/185] Add basic function to call the api later --- src/Tasks/Common/FileUtilities.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index ef6e8355d9f6..423a7d5b3708 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -35,5 +35,13 @@ public static Version TryGetAssemblyVersion(string sourcePath) return s_assemblyExtensions.Contains(extension) ? GetAssemblyVersion(sourcePath) : null; } + public static string CreateTempPath() + { + // TODO: Make this call the API once it is complete. + string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + Directory.CreateDirectory(path); + return path; + } + } } From e1a7cce0d5dc3a127277d3b00a0159772f0af6b2 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 29 Jul 2022 16:43:20 -0700 Subject: [PATCH 034/185] Add call to tool package installer --- .../ToolPackage/ToolPackageInstaller.cs | 28 ++++++++----------- src/Cli/dotnet/dotnet.csproj | 1 + .../ToolPackageInstallerNugetCacheTests.cs | 2 +- .../ToolPackageInstallerTests.cs | 2 +- 4 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index 1f3a37d9ee0f..d3a5a4fdbbae 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -13,6 +13,7 @@ using Microsoft.Extensions.EnvironmentAbstractions; using NuGet.ProjectModel; using NuGet.Versioning; +using Microsoft.NET.Build.Tasks; namespace Microsoft.DotNet.ToolPackage { @@ -53,7 +54,7 @@ public IToolPackage InstallPackage( Directory.CreateDirectory(stageDirectory.Value); rollbackDirectory = stageDirectory.Value; - var tempProject = CreateTempProject( + Tuple tempProjectDetails = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -65,13 +66,13 @@ public IToolPackage InstallPackage( try { _projectRestorer.Restore( - tempProject, + new FilePath(tempProjectDetails.Item1.ToString() + tempProjectDetails.Item2), packageLocation, verbosity: verbosity); } finally { - File.Delete(tempProject.Value); + Directory.Delete(tempProjectDetails.Item1.ToString(), recursive: true); } var version = _store.GetStagedPackageVersion(stageDirectory, packageId); @@ -131,7 +132,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( Directory.CreateDirectory(tempDirectoryForAssetJson.Value); - var tempProject = CreateTempProject( + var tempProject = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -155,7 +156,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( return ToolPackageInstance.CreateFromAssetFile(packageId, tempDirectoryForAssetJson); } - private FilePath CreateTempProject( + private Tuple CreateDirectoryWithTempProject( PackageId packageId, VersionRange versionRange, string targetFramework, @@ -164,16 +165,9 @@ private FilePath CreateTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - var tempProject = _tempProject ?? new DirectoryPath(Path.GetTempPath()) - .WithSubDirectories(Path.GetRandomFileName()) - .WithFile("restore.csproj"); - - if (Path.GetExtension(tempProject.Value) != "csproj") - { - tempProject = new FilePath(Path.ChangeExtension(tempProject.Value, "csproj")); - } - - Directory.CreateDirectory(tempProject.GetDirectoryPath().Value); + string tempProjectName = "restore.csproj"; + string tempProjectDir = _tempProject.ToString() ?? FileUtilities.CreateTempPath(); + File.WriteAllText(Path.Combine(tempProjectDir, tempProjectName), null); var tempProjectContent = new XDocument( new XElement("Project", @@ -203,8 +197,8 @@ private FilePath CreateTempProject( new XAttribute("Project", "Sdk.targets"), new XAttribute("Sdk", "Microsoft.NET.Sdk")))); - File.WriteAllText(tempProject.Value, tempProjectContent.ToString()); - return tempProject; + File.WriteAllText(Path.Combine(tempProjectDir, tempProjectName), tempProjectContent.ToString()); + return new Tuple(new FilePath(tempProjectDir), tempProjectName); } private string JoinSourceAndOfflineCache(string[] additionalFeeds) diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj index bb202db43721..b799e224f712 100644 --- a/src/Cli/dotnet/dotnet.csproj +++ b/src/Cli/dotnet/dotnet.csproj @@ -20,6 +20,7 @@ + diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs b/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs index 87e65c490cab..41e71c959799 100644 --- a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs +++ b/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs @@ -167,7 +167,7 @@ private static List GetMockFeedsForConfigFile(FilePath nugetConfig) installer = new ToolPackageInstaller( store: store, projectRestorer: new Stage2ProjectRestorer(Log, reporter), - tempProject: tempProject ?? GetUniqueTempProjectPathEachTest(testDirectory), + tempProject: tempProject ?? GetUniqueTempProjectPathEachTest(testDirectory), // <-- is this a concern? offlineFeed: offlineFeed ?? new DirectoryPath("does not exist")); } diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerTests.cs b/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerTests.cs index e8dc0fb3e36c..0c1d2a0b434c 100644 --- a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerTests.cs +++ b/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerTests.cs @@ -738,7 +738,7 @@ public void GivenARootWithNonAsciiCharacterInstallSucceeds() var installer = new ToolPackageInstaller( store: store, projectRestorer: new Stage2ProjectRestorer(Log, reporter), - tempProject: GetUniqueTempProjectPathEachTest(), + tempProject: GetUniqueTempProjectPathEachTest(), // <-- is this a concern? offlineFeed: new DirectoryPath("does not exist")); var package = installer.InstallPackage(new PackageLocation(nugetConfig: nugetConfigPath), From e8407bf75881f95580d1e4218cd5ff4874d5b0d6 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 29 Jul 2022 16:57:10 -0700 Subject: [PATCH 035/185] Work on ToolPackageInstaller security --- .../ToolPackage/ToolPackageInstaller.cs | 26 +++++++++---------- src/Cli/dotnet/dotnet.csproj | 1 + 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index d3a5a4fdbbae..e67699232a63 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -54,7 +54,7 @@ public IToolPackage InstallPackage( Directory.CreateDirectory(stageDirectory.Value); rollbackDirectory = stageDirectory.Value; - Tuple tempProjectDetails = CreateDirectoryWithTempProject( + Tuple tempProjectDetails = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -66,13 +66,13 @@ public IToolPackage InstallPackage( try { _projectRestorer.Restore( - new FilePath(tempProjectDetails.Item1.ToString() + tempProjectDetails.Item2), + new FilePath(tempProjectDetails.Item1 + tempProjectDetails.Item2), packageLocation, verbosity: verbosity); } finally { - Directory.Delete(tempProjectDetails.Item1.ToString(), recursive: true); + Directory.Delete(tempProjectDetails.Item1, recursive: true); } var version = _store.GetStagedPackageVersion(stageDirectory, packageId); @@ -127,16 +127,14 @@ public IToolPackage InstallPackageToExternalManagedLocation( string targetFramework = null, string verbosity = null) { - var tempDirectoryForAssetJson = new DirectoryPath(Path.GetTempPath()) - .WithSubDirectories(Path.GetRandomFileName()); + var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); + File.WriteAllText(Path.Combine(tempDirectoryForAssetJson, "file1.txt"), null); - Directory.CreateDirectory(tempDirectoryForAssetJson.Value); - - var tempProject = CreateDirectoryWithTempProject( + Tuple tempProjectDetails = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, - assetJsonOutputDirectory: tempDirectoryForAssetJson, + assetJsonOutputDirectory: new DirectoryPath(tempDirectoryForAssetJson), restoreDirectory: null, rootConfigDirectory: packageLocation.RootConfigDirectory, additionalFeeds: packageLocation.AdditionalFeeds); @@ -144,19 +142,19 @@ public IToolPackage InstallPackageToExternalManagedLocation( try { _projectRestorer.Restore( - tempProject, + new FilePath(tempProjectDetails.Item1 + tempProjectDetails.Item2), packageLocation, verbosity: verbosity); } finally { - File.Delete(tempProject.Value); + Directory.Delete(tempProjectDetails.Item1, recursive:true); } - return ToolPackageInstance.CreateFromAssetFile(packageId, tempDirectoryForAssetJson); + return ToolPackageInstance.CreateFromAssetFile(packageId, new DirectoryPath(tempDirectoryForAssetJson)); } - private Tuple CreateDirectoryWithTempProject( + private Tuple CreateDirectoryWithTempProject( PackageId packageId, VersionRange versionRange, string targetFramework, @@ -198,7 +196,7 @@ private Tuple CreateDirectoryWithTempProject( new XAttribute("Sdk", "Microsoft.NET.Sdk")))); File.WriteAllText(Path.Combine(tempProjectDir, tempProjectName), tempProjectContent.ToString()); - return new Tuple(new FilePath(tempProjectDir), tempProjectName); + return new Tuple(tempProjectDir, tempProjectName); } private string JoinSourceAndOfflineCache(string[] additionalFeeds) diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj index b799e224f712..1004b10a6322 100644 --- a/src/Cli/dotnet/dotnet.csproj +++ b/src/Cli/dotnet/dotnet.csproj @@ -21,6 +21,7 @@ + From 45e4705fdb6efb58f574c328d3643398c233990f Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Mon, 1 Aug 2022 14:45:00 -0700 Subject: [PATCH 036/185] Dont use a tuple and make code less bad --- .../ToolPackage/ToolPackageInstaller.cs | 30 +++++++++---------- src/Tasks/Common/FileUtilities.cs | 7 +++++ 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index e67699232a63..6dace3c792a6 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -47,17 +47,18 @@ public IToolPackage InstallPackage( string rollbackDirectory = null; return TransactionalAction.Run( - action: () => { + action: () => + { try { var stageDirectory = _store.GetRandomStagingDirectory(); Directory.CreateDirectory(stageDirectory.Value); rollbackDirectory = stageDirectory.Value; - Tuple tempProjectDetails = CreateDirectoryWithTempProject( + string tempProjectPath = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, - targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, + targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, restoreDirectory: stageDirectory, assetJsonOutputDirectory: stageDirectory, rootConfigDirectory: packageLocation.RootConfigDirectory, @@ -66,13 +67,13 @@ public IToolPackage InstallPackage( try { _projectRestorer.Restore( - new FilePath(tempProjectDetails.Item1 + tempProjectDetails.Item2), + new FilePath(tempProjectPath), packageLocation, verbosity: verbosity); } finally { - Directory.Delete(tempProjectDetails.Item1, recursive: true); + Directory.Delete(Path.GetDirectoryName(tempProjectPath), recursive: true); } var version = _store.GetStagedPackageVersion(stageDirectory, packageId); @@ -105,7 +106,8 @@ public IToolPackage InstallPackage( ex); } }, - rollback: () => { + rollback: () => + { if (!string.IsNullOrEmpty(rollbackDirectory) && Directory.Exists(rollbackDirectory)) { Directory.Delete(rollbackDirectory, true); @@ -130,7 +132,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); File.WriteAllText(Path.Combine(tempDirectoryForAssetJson, "file1.txt"), null); - Tuple tempProjectDetails = CreateDirectoryWithTempProject( + string tempProjectDetails = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -142,19 +144,19 @@ public IToolPackage InstallPackageToExternalManagedLocation( try { _projectRestorer.Restore( - new FilePath(tempProjectDetails.Item1 + tempProjectDetails.Item2), + new FilePath(tempProjectDetails + tempProjectDetails), packageLocation, verbosity: verbosity); } finally { - Directory.Delete(tempProjectDetails.Item1, recursive:true); + Directory.Delete(Path.GetDirectoryName(tempProjectDetails), recursive: true); } return ToolPackageInstance.CreateFromAssetFile(packageId, new DirectoryPath(tempDirectoryForAssetJson)); } - private Tuple CreateDirectoryWithTempProject( + private string CreateDirectoryWithTempProject( PackageId packageId, VersionRange versionRange, string targetFramework, @@ -163,9 +165,7 @@ private Tuple CreateDirectoryWithTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - string tempProjectName = "restore.csproj"; - string tempProjectDir = _tempProject.ToString() ?? FileUtilities.CreateTempPath(); - File.WriteAllText(Path.Combine(tempProjectDir, tempProjectName), null); + string tempProject = _tempProject.ToString() ?? FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj"); var tempProjectContent = new XDocument( new XElement("Project", @@ -195,8 +195,8 @@ private Tuple CreateDirectoryWithTempProject( new XAttribute("Project", "Sdk.targets"), new XAttribute("Sdk", "Microsoft.NET.Sdk")))); - File.WriteAllText(Path.Combine(tempProjectDir, tempProjectName), tempProjectContent.ToString()); - return new Tuple(tempProjectDir, tempProjectName); + File.WriteAllText(tempProject, tempProjectContent.ToString()); + return tempProject; } private string JoinSourceAndOfflineCache(string[] additionalFeeds) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 423a7d5b3708..8c984d3a2295 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -43,5 +43,12 @@ public static string CreateTempPath() return path; } + public static string CreateTempFile(string tempDirectory, string extension) + { + string fileName = Path.ChangeExtension(Path.Combine(tempDirectory, Path.GetTempFileName()), extension); + File.Create(fileName); + return fileName; + } + } } From 6f91bbc855d6ef809ca4dc243f97002eb4307f63 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Mon, 1 Aug 2022 16:25:58 -0700 Subject: [PATCH 037/185] Use filepath instead of str --- .../ToolPackage/ToolPackageInstaller.cs | 23 +++++++++++-------- src/Tasks/Common/FileUtilities.cs | 2 +- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index 6dace3c792a6..fec1bb34f600 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -55,7 +55,7 @@ public IToolPackage InstallPackage( Directory.CreateDirectory(stageDirectory.Value); rollbackDirectory = stageDirectory.Value; - string tempProjectPath = CreateDirectoryWithTempProject( + FilePath tempProject = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -67,13 +67,13 @@ public IToolPackage InstallPackage( try { _projectRestorer.Restore( - new FilePath(tempProjectPath), + tempProject, packageLocation, verbosity: verbosity); } finally { - Directory.Delete(Path.GetDirectoryName(tempProjectPath), recursive: true); + Directory.Delete(tempProject.GetDirectoryPath().ToString(), recursive: true); } var version = _store.GetStagedPackageVersion(stageDirectory, packageId); @@ -132,7 +132,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); File.WriteAllText(Path.Combine(tempDirectoryForAssetJson, "file1.txt"), null); - string tempProjectDetails = CreateDirectoryWithTempProject( + FilePath tempProject = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -144,19 +144,19 @@ public IToolPackage InstallPackageToExternalManagedLocation( try { _projectRestorer.Restore( - new FilePath(tempProjectDetails + tempProjectDetails), + tempProject, packageLocation, verbosity: verbosity); } finally { - Directory.Delete(Path.GetDirectoryName(tempProjectDetails), recursive: true); + Directory.Delete(tempProject.GetDirectoryPath().ToString(), recursive: true); } return ToolPackageInstance.CreateFromAssetFile(packageId, new DirectoryPath(tempDirectoryForAssetJson)); } - private string CreateDirectoryWithTempProject( + private FilePath CreateDirectoryWithTempProject( PackageId packageId, VersionRange versionRange, string targetFramework, @@ -165,7 +165,12 @@ private string CreateDirectoryWithTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - string tempProject = _tempProject.ToString() ?? FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj"); + FilePath tempProject = _tempProject ?? new FilePath(FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj")); + if (_tempProject != null) + { + tempProject = new FilePath(Path.ChangeExtension(tempProject.Value, "csproj")); + Directory.CreateDirectory(tempProject.GetDirectoryPath().Value); + } var tempProjectContent = new XDocument( new XElement("Project", @@ -195,7 +200,7 @@ private string CreateDirectoryWithTempProject( new XAttribute("Project", "Sdk.targets"), new XAttribute("Sdk", "Microsoft.NET.Sdk")))); - File.WriteAllText(tempProject, tempProjectContent.ToString()); + File.WriteAllText(tempProject.ToString(), tempProjectContent.ToString()); return tempProject; } diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 8c984d3a2295..e6c607d3444c 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -46,7 +46,7 @@ public static string CreateTempPath() public static string CreateTempFile(string tempDirectory, string extension) { string fileName = Path.ChangeExtension(Path.Combine(tempDirectory, Path.GetTempFileName()), extension); - File.Create(fileName); + File.Create(fileName.ToString()); return fileName; } From 0f90f807d44d2399bb81b406a668bae3943f09f6 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 2 Aug 2022 11:30:29 -0700 Subject: [PATCH 038/185] Fix bug/misleading code in FilePath with string --- .../FilePath.cs | 2 +- .../ToolPackage/ToolPackageInstaller.cs | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs b/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs index 06ed28ab76d7..3532e058decf 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs @@ -30,7 +30,7 @@ public string ToQuotedString() public override string ToString() { - return ToQuotedString(); + return $"{Value}"; } public DirectoryPath GetDirectoryPath() diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index fec1bb34f600..d2ec50c5dcf9 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -55,7 +55,7 @@ public IToolPackage InstallPackage( Directory.CreateDirectory(stageDirectory.Value); rollbackDirectory = stageDirectory.Value; - FilePath tempProject = CreateDirectoryWithTempProject( + string tempProject = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -67,13 +67,13 @@ public IToolPackage InstallPackage( try { _projectRestorer.Restore( - tempProject, + new FilePath(tempProject), packageLocation, verbosity: verbosity); } finally { - Directory.Delete(tempProject.GetDirectoryPath().ToString(), recursive: true); + Directory.Delete(Path.GetDirectoryName(tempProject), recursive: true); } var version = _store.GetStagedPackageVersion(stageDirectory, packageId); @@ -132,7 +132,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); File.WriteAllText(Path.Combine(tempDirectoryForAssetJson, "file1.txt"), null); - FilePath tempProject = CreateDirectoryWithTempProject( + string tempProject = CreateDirectoryWithTempProject( packageId: packageId, versionRange: versionRange, targetFramework: string.IsNullOrEmpty(targetFramework) ? BundledTargetFramework.GetTargetFrameworkMoniker() : targetFramework, @@ -144,19 +144,19 @@ public IToolPackage InstallPackageToExternalManagedLocation( try { _projectRestorer.Restore( - tempProject, + new FilePath(tempProject), packageLocation, verbosity: verbosity); } finally { - Directory.Delete(tempProject.GetDirectoryPath().ToString(), recursive: true); + Directory.Delete(Path.GetDirectoryName(tempProject), recursive: true); } return ToolPackageInstance.CreateFromAssetFile(packageId, new DirectoryPath(tempDirectoryForAssetJson)); } - private FilePath CreateDirectoryWithTempProject( + private string CreateDirectoryWithTempProject( PackageId packageId, VersionRange versionRange, string targetFramework, @@ -165,11 +165,11 @@ private FilePath CreateDirectoryWithTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - FilePath tempProject = _tempProject ?? new FilePath(FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj")); + string tempProject = _tempProject.ToString() ?? (FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj")); if (_tempProject != null) { - tempProject = new FilePath(Path.ChangeExtension(tempProject.Value, "csproj")); - Directory.CreateDirectory(tempProject.GetDirectoryPath().Value); + tempProject = Path.ChangeExtension(tempProject, "csproj"); + Directory.CreateDirectory(Path.GetDirectoryName(tempProject)); } var tempProjectContent = new XDocument( @@ -200,7 +200,7 @@ private FilePath CreateDirectoryWithTempProject( new XAttribute("Project", "Sdk.targets"), new XAttribute("Sdk", "Microsoft.NET.Sdk")))); - File.WriteAllText(tempProject.ToString(), tempProjectContent.ToString()); + File.WriteAllText(tempProject, tempProjectContent.ToString()); return tempProject; } From ca4facd0618a87ebe13e562c366ff02ee588f335 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 3 Aug 2022 11:38:35 -0700 Subject: [PATCH 039/185] Fix biggest vulnerability. NEED TO TEST ON MAC --- .../SudoEnvironmentDirectoryOverride.cs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index 799c99fbec39..3e4072bd2842 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -8,6 +8,7 @@ using System.Linq; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools.Common; +using Microsoft.NET.Build.Tasks; using NuGet.Common; using NuGet.Configuration; @@ -18,8 +19,6 @@ namespace Microsoft.DotNet.Cli /// public static class SudoEnvironmentDirectoryOverride { - private const string SudoHomeDirectory = "/tmp/dotnet_sudo_home/"; - /// /// Not for security use. Detect if command is running under sudo /// via if SUDO_UID being set. @@ -38,22 +37,10 @@ public static void OverrideEnvironmentVariableToTmp(ParseResult parseResult) { if (!OperatingSystem.IsWindows() && IsRunningUnderSudo() && IsRunningWorkloadCommand(parseResult)) { - if (!TempHomeIsOnlyRootWritable(SudoHomeDirectory)) - { - try - { - Directory.Delete(SudoHomeDirectory, recursive: true); - } - catch (DirectoryNotFoundException) - { - // Avoid read after write race condition - } - } - - Directory.CreateDirectory(SudoHomeDirectory); + string newProcessHomeDirectory = FileUtilities.CreateTempPath(); var homeBeforeOverride = Path.Combine(Environment.GetEnvironmentVariable("HOME")); - Environment.SetEnvironmentVariable("HOME", SudoHomeDirectory); + Environment.SetEnvironmentVariable("HOME", newProcessHomeDirectory); CopyUserNuGetConfigToOverriddenHome(homeBeforeOverride); } From 9caaaeed8c50b400ea1a57415604ef787fdcedfb Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 3 Aug 2022 15:03:50 -0700 Subject: [PATCH 040/185] Watchlist uses temp folder, need to verify .txt extension is OK --- .../dotnet-watch/Internal/MsBuildFileSetFactory.cs | 3 ++- src/BuiltInTools/dotnet-watch/dotnet-watch.csproj | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs index 77e0a621cdce..98ce0345592a 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Microsoft.DotNet.Watcher.Tools; using Microsoft.Extensions.Tools.Internal; +using Microsoft.NET.Build.Tasks; using IReporter = Microsoft.Extensions.Tools.Internal.IReporter; namespace Microsoft.DotNet.Watcher.Internal @@ -63,7 +64,7 @@ internal MsBuildFileSetFactory( public async Task CreateAsync(CancellationToken cancellationToken) { - var watchList = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + var watchList = FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), ".txt"); try { var projectDir = Path.GetDirectoryName(_projectFile); diff --git a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj index 636f43d119b4..c3746d05d6c6 100644 --- a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj +++ b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj @@ -23,6 +23,8 @@ + + From 8a42338d39524a91d4b929d8ced8fd97d5aab791 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 11 Aug 2022 09:27:27 -0700 Subject: [PATCH 041/185] Catch race condition on file set factory delete --- .../dotnet-watch/Internal/MsBuildFileSetFactory.cs | 9 ++++++++- .../dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs index 98ce0345592a..809d39b9c58f 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs @@ -196,7 +196,14 @@ public async Task CreateAsync(CancellationToken cancellationToken) { if (File.Exists(watchList)) { - File.Delete(watchList); + try + { + File.Delete(watchList); + } + catch(System.IO.IOException) + { + // Catch file locking problems on deletion. + } } } } diff --git a/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs b/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs index 00f749ca9d66..b8728a654057 100644 --- a/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs +++ b/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs @@ -308,7 +308,7 @@ public async Task TransitiveProjectReferences_TwoLevels() Assert.All(fileset, f => Assert.False(f.IsStaticFile, $"File {f.FilePath} should not be a static file.")); } - [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/29213")] + [Fact] public async Task ProjectReferences_Graph() { // A->B,F,W(Watch=False) From f8e33070e4a0c8cdd04aabc7ab6b9eab49167e75 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 10 Aug 2022 16:06:50 -0700 Subject: [PATCH 042/185] use temp path for nupkg. audited all of the varialbes relying on tempdir and seems fine --- .../install/ToolInstallGlobalOrToolPathCommand.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs index 7e06aae182b1..987fc0a16d00 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs @@ -19,6 +19,7 @@ using NuGet.Common; using NuGet.Frameworks; using NuGet.Versioning; +using Microsoft.NET.Build.Tasks; namespace Microsoft.DotNet.Tools.Tool.Install { @@ -72,7 +73,7 @@ public ToolInstallGlobalOrToolPathCommand( _environmentPathInstruction = environmentPathInstruction ?? EnvironmentPathFactory.CreateEnvironmentPathInstruction(); _createShellShimRepository = createShellShimRepository ?? ShellShimRepositoryFactory.CreateShellShimRepository; - var tempDir = new DirectoryPath(Path.Combine(Path.GetTempPath(), "dotnet-tool-install")); + var tempDir = new DirectoryPath(FileUtilities.CreateTempPath()); var configOption = parseResult.GetValueForOption(ToolInstallCommandParser.ConfigOption); var sourceOption = parseResult.GetValueForOption(ToolInstallCommandParser.AddSourceOption); var packageSourceLocation = new PackageSourceLocation(string.IsNullOrEmpty(configOption) ? null : new FilePath(configOption), additionalSourceFeeds: sourceOption); @@ -143,7 +144,7 @@ public override int Execute() } else { - framework = string.IsNullOrEmpty(_framework) ? + framework = string.IsNullOrEmpty(_framework) ? null : NuGetFramework.Parse(_framework); } From 116ff9429788e7bbabe020b5b180d734bb9d59fc Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 10 Aug 2022 16:32:05 -0700 Subject: [PATCH 043/185] Apply change to shellshimremover --- src/Cli/dotnet/ShellShim/ShellShimRepository.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index 4dee9748d079..6a653eee5887 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -9,6 +9,7 @@ using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools; using Microsoft.Extensions.EnvironmentAbstractions; +using Microsoft.NET.Build.Tasks; namespace Microsoft.DotNet.ShellShim { @@ -85,7 +86,8 @@ public void CreateShim(FilePath targetExecutablePath, ToolCommandName commandNam ex); } }, - rollback: () => { + rollback: () => + { foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value))) { File.Delete(file.Value); @@ -97,12 +99,13 @@ public void RemoveShim(ToolCommandName commandName) { var files = new Dictionary(); TransactionalAction.Run( - action: () => { + action: () => + { try { foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value))) { - var tempPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + var tempPath = FileUtilities.CreateTempPath(); FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(file.Value, tempPath)); files[file.Value] = tempPath; } @@ -118,13 +121,15 @@ public void RemoveShim(ToolCommandName commandName) ex); } }, - commit: () => { + commit: () => + { foreach (var value in files.Values) { _fileSystem.File.Delete(value); } }, - rollback: () => { + rollback: () => + { foreach (var kvp in files) { FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(kvp.Value, kvp.Key)); From 067b636f6a486dff6e693d4a91cc9f87fed5331e Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 11 Aug 2022 17:00:51 -0700 Subject: [PATCH 044/185] Security check on workload command base --- .../dotnet/commands/dotnet-workload/WorkloadCommandBase.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs index 55bd273ae1c2..83c092b16672 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs @@ -8,6 +8,7 @@ using Microsoft.DotNet.Cli.NuGetPackageDownloader; using Microsoft.DotNet.Cli.Utils; using Microsoft.Extensions.EnvironmentAbstractions; +using Microsoft.NET.Build.Tasks; using NuGet.Common; namespace Microsoft.DotNet.Workloads.Workload @@ -104,9 +105,10 @@ public WorkloadCommandBase(ParseResult parseResult, ? tempDirPath : !string.IsNullOrWhiteSpace(parseResult.GetValueForOption(WorkloadInstallCommandParser.TempDirOption)) ? parseResult.GetValueForOption(WorkloadInstallCommandParser.TempDirOption) - : Path.GetTempPath(); + : ""; - TempPackagesDirectory = new DirectoryPath(Path.Combine(TempDirectoryPath, "dotnet-sdk-advertising-temp")); + // The security owness on a custom tempDir is on the user according to docs. + TempPackagesDirectory = new DirectoryPath(TempDirectoryPath == "" ? FileUtilities.CreateTempPath() : Path.Combine(TempDirectoryPath, "dotnet-sdk-advertising-temp")); PackageDownloader = nugetPackageDownloader ?? new NuGetPackageDownloader(TempPackagesDirectory, filePermissionSetter: null, From 5c4e65a2ad1375931dd46f7648ad4c8e263ba607 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 12 Aug 2022 14:28:44 -0700 Subject: [PATCH 045/185] Dispose file and fix problem in shellshimrepo. We dont use move anymore because we need someone to make a file with secure permissions and gettempfilename does that but getrandomfilename does not. Moving a file would override the permissions so we copy file contents over. --- src/Cli/dotnet/ShellShim/ShellShimRepository.cs | 12 +++++++++--- src/Tasks/Common/FileUtilities.cs | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index 6a653eee5887..79c02050afe3 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -105,9 +105,15 @@ public void RemoveShim(ToolCommandName commandName) { foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value))) { - var tempPath = FileUtilities.CreateTempPath(); - FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(file.Value, tempPath)); - files[file.Value] = tempPath; + using (var tempPath = File.OpenWrite(FileUtilities.CreateTempFile())) + { + Stream oldFile = _fileSystem.File.OpenRead(file.Value); + oldFile.Seek(0, SeekOrigin.Begin); + oldFile.CopyTo(tempPath); + oldFile.Dispose(); + File.Delete(file.Value); + files[file.Value] = tempPath.Name; + } } } catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index e6c607d3444c..0ef0f61acfb6 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -43,12 +43,25 @@ public static string CreateTempPath() return path; } - public static string CreateTempFile(string tempDirectory, string extension) + public static string CreateTempFile(string tempDirectory, string extension="") { + if(extension == "") + { + extension = Path.GetExtension(Path.GetRandomFileName()); + } string fileName = Path.ChangeExtension(Path.Combine(tempDirectory, Path.GetTempFileName()), extension); File.Create(fileName.ToString()); return fileName; } + /// + /// + /// + /// The full path of a newly created temp file with OK permissions. + public static string CreateTempFile() + { + return Path.GetTempFileName(); + } + } } From 1a29f9e1d9a2c4f5fbaf1b7b98c15593806fe78b Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 12 Aug 2022 15:34:08 -0700 Subject: [PATCH 046/185] [wip] add some code to try to fix directory bug. Not sure how to use this new lib, need to ask some people --- src/Tasks/Common/FileUtilities.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 0ef0f61acfb6..199c8eda7200 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -7,6 +7,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Runtime.InteropServices; +using Microsoft.DotNet.Cli; namespace Microsoft.NET.Build.Tasks { @@ -35,11 +37,19 @@ public static Version TryGetAssemblyVersion(string sourcePath) return s_assemblyExtensions.Contains(extension) ? GetAssemblyVersion(sourcePath) : null; } + [DllImport("libc", SetLastError = true)] + public static extern int mkdir(string pathname, UnixFileMode mode); public static string CreateTempPath() { - // TODO: Make this call the API once it is complete. string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); - Directory.CreateDirectory(path); + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + mkdir(path, StatInterop.Permissions.S_IRWXU) + } + else + { + Directory.CreateDirectory(path, StatInterop.Permissions.S_IRWXU); + } return path; } From 8d01c5beed8714fc293b30ee1fd7f8f289ac3b9c Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 10:14:30 -0700 Subject: [PATCH 047/185] Do the secure thing for temp files in fileutilities --- src/Tasks/Common/FileUtilities.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 199c8eda7200..ef205fb3f32c 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -38,24 +38,28 @@ public static Version TryGetAssemblyVersion(string sourcePath) } [DllImport("libc", SetLastError = true)] - public static extern int mkdir(string pathname, UnixFileMode mode); + public static extern int mkdir(string pathname, uint mode); public static string CreateTempPath() { string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - mkdir(path, StatInterop.Permissions.S_IRWXU) + int dotnet_version = 7; // Changed in backported code. This can be out of date for .NET 8+ and still be fine. + if (dotnet_version < 7) + mkdir(path, 007000); + else + Directory.CreateDirectory(path, UnixFileMode.UserWrite | UnixFileMode.UserExecute | UnixFileMode.UserRead); } else { - Directory.CreateDirectory(path, StatInterop.Permissions.S_IRWXU); + Directory.CreateDirectory(path); } return path; } - public static string CreateTempFile(string tempDirectory, string extension="") + public static string CreateTempFile(string tempDirectory, string extension = "") { - if(extension == "") + if (extension == "") { extension = Path.GetExtension(Path.GetRandomFileName()); } From d86cf02f544ee6ba53154b0fa721cd3bfcabe55c Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 11:15:36 -0700 Subject: [PATCH 048/185] Fix security bug in file based installer --- src/Cli/dotnet/commands/InstallingWorkloadCommand.cs | 3 ++- .../commands/dotnet-workload/install/FileBasedInstaller.cs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index d8df4fb955aa..17c7fd0c0253 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -19,6 +19,7 @@ using Microsoft.DotNet.Workloads.Workload.Install; using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord; using Microsoft.Extensions.EnvironmentAbstractions; +using Microsoft.NET.Build.Tasks; using Microsoft.NET.Sdk.WorkloadManifestReader; using NuGet.Versioning; using Command = System.CommandLine.Command; @@ -98,7 +99,7 @@ protected async Task> GetDownloads(IEnumerable workloadIds, SdkFeatureBand Directory.Delete(dir, true); } } - }); + }); } } From f227ba9a134c94c4e40a3008a0b5436d0cafb74f Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 11:19:16 -0700 Subject: [PATCH 049/185] Apply change to workloadmanifestupdater --- .../install/WorkloadManifestUpdater.cs | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index 048d3dc22889..58829d383218 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -17,6 +17,7 @@ using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord; using Microsoft.Extensions.EnvironmentAbstractions; +using Microsoft.NET.Build.Tasks; using Microsoft.NET.Sdk.WorkloadManifestReader; using NuGet.Common; using NuGet.Versioning; @@ -69,7 +70,7 @@ private static WorkloadManifestUpdater GetInstance(string userProfileDir) var sdkVersion = Product.Version; var workloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(dotnetPath, sdkVersion, userProfileDir); var workloadResolver = WorkloadResolver.Create(workloadManifestProvider, dotnetPath, sdkVersion, userProfileDir); - var tempPackagesDir = new DirectoryPath(Path.Combine(Path.GetTempPath(), "dotnet-sdk-advertising-temp")); + var tempPackagesDir = new DirectoryPath(FileUtilities.CreateTempPath()); var nugetPackageDownloader = new NuGetPackageDownloader(tempPackagesDir, filePermissionSetter: null, new FirstPartyNuGetPackageSigningVerifier(), @@ -189,9 +190,9 @@ Dictionary Workloads } if (advertisingManifestVersionAndWorkloads != null && - ((advertisingManifestVersionAndWorkloads.Value.ManifestVersion.CompareTo(currentManifestVersion.manifestVersion) > 0 + ((advertisingManifestVersionAndWorkloads.Value.ManifestVersion.CompareTo(currentManifestVersion.manifestVersion) > 0 && advertisingManifestVersionAndWorkloads.Value.ManifestFeatureBand.Equals(currentManifestVersion.sdkFeatureBand)) || - advertisingManifestVersionAndWorkloads.Value.ManifestFeatureBand.CompareTo(currentManifestVersion.sdkFeatureBand) > 0)) + advertisingManifestVersionAndWorkloads.Value.ManifestFeatureBand.CompareTo(currentManifestVersion.sdkFeatureBand) > 0)) { manifestUpdates.Add((new ManifestVersionUpdate(manifestId, currentManifestVersion.manifestVersion, currentManifestVersion.sdkFeatureBand.ToString(), advertisingManifestVersionAndWorkloads.Value.ManifestVersion, advertisingManifestVersionAndWorkloads.Value.ManifestFeatureBand.ToString()), @@ -307,7 +308,7 @@ private async Task UpdateAdvertisingManifestAsync(WorkloadManifestInfo manifest, try { var adManifestPath = GetAdvertisingManifestPath(_sdkFeatureBand, manifestId); - + bool success; (success, packagePath) = await GetManifestPackageUpdate(_sdkFeatureBand, manifestId, includePreviews, offlineCache); if (!success) @@ -323,7 +324,7 @@ private async Task UpdateAdvertisingManifestAsync(WorkloadManifestInfo manifest, _reporter.WriteLine(string.Format(LocalizableStrings.AdManifestPackageDoesNotExist, manifestId)); return; } - + await _workloadManifestInstaller.ExtractManifestAsync(packagePath, adManifestPath); // add file that contains the advertisted manifest feature band so GetAdvertisingManifestVersionAndWorkloads will use correct feature band, regardless of if rollback occurred or not @@ -384,7 +385,7 @@ private async Task UpdateAdvertisingManifestAsync(WorkloadManifestInfo manifest, { adManifestFeatureBand = new SdkFeatureBand(File.ReadAllText(adManifestFeatureBandPath)); } - + return (new ManifestVersion(manifest.Version), adManifestFeatureBand, manifest.Workloads.Values.OfType().ToDictionary(w => w.Id)); } @@ -470,12 +471,12 @@ private async Task NewerManifestPackageExists(ManifestId manifest) ManifestVersion manifestVersion; SdkFeatureBand manifestFeatureBand; var parts = manifest.Value.Split('/'); - + string manifestVersionString = (parts[0]); if (!FXVersion.TryParse(manifestVersionString, out FXVersion version)) { throw new FormatException(String.Format(LocalizableStrings.InvalidVersionForWorkload, manifest.Key, manifestVersionString)); - } + } manifestVersion = new ManifestVersion(parts[0]); if (parts.Length == 1) @@ -499,15 +500,15 @@ private bool BackgroundUpdatesAreDisabled() => private static string GetAdvertisingWorkloadsFilePath(string userProfileDir, SdkFeatureBand featureBand) => Path.Combine(userProfileDir, $".workloadAdvertisingUpdates{featureBand}"); - private async Task GetOnlinePackagePath(SdkFeatureBand sdkFeatureBand, ManifestId manifestId, bool includePreviews) - { - string packagePath = await _nugetPackageDownloader.DownloadPackageAsync( - _workloadManifestInstaller.GetManifestPackageId(manifestId, sdkFeatureBand), - packageSourceLocation: _packageSourceLocation, - includePreview: includePreviews); - - return packagePath; - } + private async Task GetOnlinePackagePath(SdkFeatureBand sdkFeatureBand, ManifestId manifestId, bool includePreviews) + { + string packagePath = await _nugetPackageDownloader.DownloadPackageAsync( + _workloadManifestInstaller.GetManifestPackageId(manifestId, sdkFeatureBand), + packageSourceLocation: _packageSourceLocation, + includePreview: includePreviews); + + return packagePath; + } private string GetOfflinePackagePath(SdkFeatureBand sdkFeatureBand, ManifestId manifestId, DirectoryPath? offlineCache = null) { @@ -527,7 +528,7 @@ private string GetOfflinePackagePath(SdkFeatureBand sdkFeatureBand, ManifestId m { if (offlineCache == null || !offlineCache.HasValue) { - try + try { string packagePath = await GetOnlinePackagePath(sdkFeatureBand, manifestId, includePreviews); return (true, packagePath); From cf0fc8da908334cab52aeae00f86c7f9000ec742 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 11:31:16 -0700 Subject: [PATCH 050/185] Fix uint perm --- src/Tasks/Common/FileUtilities.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index ef205fb3f32c..0de7f99b8c28 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -8,7 +8,6 @@ using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; -using Microsoft.DotNet.Cli; namespace Microsoft.NET.Build.Tasks { @@ -46,7 +45,7 @@ public static string CreateTempPath() { int dotnet_version = 7; // Changed in backported code. This can be out of date for .NET 8+ and still be fine. if (dotnet_version < 7) - mkdir(path, 007000); + mkdir(path, 0000700); else Directory.CreateDirectory(path, UnixFileMode.UserWrite | UnixFileMode.UserExecute | UnixFileMode.UserRead); } From 2f1160940f344e6f8b7025e06dccd0aae40f8e68 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 11:32:31 -0700 Subject: [PATCH 051/185] Ditch unix file mode --- src/Tasks/Common/FileUtilities.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 0de7f99b8c28..b93077d34602 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -43,11 +43,7 @@ public static string CreateTempPath() string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - int dotnet_version = 7; // Changed in backported code. This can be out of date for .NET 8+ and still be fine. - if (dotnet_version < 7) - mkdir(path, 0000700); - else - Directory.CreateDirectory(path, UnixFileMode.UserWrite | UnixFileMode.UserExecute | UnixFileMode.UserRead); + mkdir(path, 0000700); } else { From 3bc1080761baf86c883aa3cce80fc7c0d4b3ca7d Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 11:58:42 -0700 Subject: [PATCH 052/185] Fix silly bug with temp path. --- src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs index 83c092b16672..33c6eed92276 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs @@ -105,7 +105,7 @@ public WorkloadCommandBase(ParseResult parseResult, ? tempDirPath : !string.IsNullOrWhiteSpace(parseResult.GetValueForOption(WorkloadInstallCommandParser.TempDirOption)) ? parseResult.GetValueForOption(WorkloadInstallCommandParser.TempDirOption) - : ""; + : FileUtilities.CreateTempPath(); // The security owness on a custom tempDir is on the user according to docs. TempPackagesDirectory = new DirectoryPath(TempDirectoryPath == "" ? FileUtilities.CreateTempPath() : Path.Combine(TempDirectoryPath, "dotnet-sdk-advertising-temp")); From cbc8f4024136896df2a740468af06beb9ee983a7 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 17 Aug 2022 15:18:25 -0700 Subject: [PATCH 053/185] Override chown and chmod use to give user perm instead of sudo perm --- .../SudoEnvironmentDirectoryOverride.cs | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index 3e4072bd2842..9071e4c4c68f 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -6,6 +6,7 @@ using System.CommandLine.Parsing; using System.IO; using System.Linq; +using System.Runtime.InteropServices; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools.Common; using Microsoft.NET.Build.Tasks; @@ -33,12 +34,26 @@ public static bool IsRunningUnderSudo() return false; } + + [DllImport("libc", SetLastError = true)] + public static extern int chown(string username, string path); + [DllImport("libc", SetLastError = true)] + private static extern int chmod(string pathname, uint mode); + private static void OverridePathFromSudoPermToSudoUserPerm(string path) + { + if (!OperatingSystem.IsWindows() && IsRunningUnderSudo()) + { + chown(Environment.GetEnvironmentVariable("SUDO_USER"), path); + chmod(path, 0000700); + } + } + public static void OverrideEnvironmentVariableToTmp(ParseResult parseResult) { if (!OperatingSystem.IsWindows() && IsRunningUnderSudo() && IsRunningWorkloadCommand(parseResult)) { string newProcessHomeDirectory = FileUtilities.CreateTempPath(); - + OverridePathFromSudoPermToSudoUserPerm(newProcessHomeDirectory); var homeBeforeOverride = Path.Combine(Environment.GetEnvironmentVariable("HOME")); Environment.SetEnvironmentVariable("HOME", newProcessHomeDirectory); @@ -108,12 +123,12 @@ private static bool TempHomeIsOnlyRootWritable(string path) private static bool OtherUserCannotWrite(StatInterop.FileStatus fileStat) { - return (fileStat.Mode & (int) StatInterop.Permissions.S_IWOTH) == 0; + return (fileStat.Mode & (int)StatInterop.Permissions.S_IWOTH) == 0; } private static bool GroupCannotWrite(StatInterop.FileStatus fileStat) { - return (fileStat.Mode & (int) StatInterop.Permissions.S_IWGRP) == 0; + return (fileStat.Mode & (int)StatInterop.Permissions.S_IWGRP) == 0; } private static bool IsOwnedByRoot(StatInterop.FileStatus fileStat) From 237f5adcac11561a3abbf783b61335f4c1dbfad9 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 18 Aug 2022 11:19:17 -0700 Subject: [PATCH 054/185] Drop lock on file --- .../dotnet-watch/Internal/MsBuildFileSetFactory.cs | 2 +- src/Tasks/Common/FileUtilities.cs | 3 ++- src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs index 809d39b9c58f..2b0751881b3a 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs @@ -64,7 +64,7 @@ internal MsBuildFileSetFactory( public async Task CreateAsync(CancellationToken cancellationToken) { - var watchList = FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), ".txt"); + var watchList = FileUtilities.CreateTempFile(FileUtilities.CreateTempPath()); try { var projectDir = Path.GetDirectoryName(_projectFile); diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index b93077d34602..aeeb1c4c1437 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -59,7 +59,8 @@ public static string CreateTempFile(string tempDirectory, string extension = "") extension = Path.GetExtension(Path.GetRandomFileName()); } string fileName = Path.ChangeExtension(Path.Combine(tempDirectory, Path.GetTempFileName()), extension); - File.Create(fileName.ToString()); + var fstream = File.Create(fileName.ToString()); + fstream.Close(); return fileName; } diff --git a/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs b/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs index b8728a654057..00f749ca9d66 100644 --- a/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs +++ b/src/Tests/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs @@ -308,7 +308,7 @@ public async Task TransitiveProjectReferences_TwoLevels() Assert.All(fileset, f => Assert.False(f.IsStaticFile, $"File {f.FilePath} should not be a static file.")); } - [Fact] + [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/29213")] public async Task ProjectReferences_Graph() { // A->B,F,W(Watch=False) From 1c888f37021d36548258975edddd550ac21bdb60 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 18 Aug 2022 11:30:55 -0700 Subject: [PATCH 055/185] Use my createtempfile function in toolcmd --- src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index d2ec50c5dcf9..4b86af94aa59 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -130,7 +130,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( string verbosity = null) { var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); - File.WriteAllText(Path.Combine(tempDirectoryForAssetJson, "file1.txt"), null); + FileUtilities.CreateTempFile(tempDirectoryForAssetJson); string tempProject = CreateDirectoryWithTempProject( packageId: packageId, From d2cc1dd9955122a66e81847f1540794283ce2340 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 19 Aug 2022 14:27:54 -0700 Subject: [PATCH 056/185] make changes to lock file --- src/Cli/dotnet/ShellShim/ShellShimRepository.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index 79c02050afe3..9913180f14ba 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -107,7 +107,9 @@ public void RemoveShim(ToolCommandName commandName) { using (var tempPath = File.OpenWrite(FileUtilities.CreateTempFile())) { - Stream oldFile = _fileSystem.File.OpenRead(file.Value); + if (!File.Exists(file.Value)) + continue; + Stream oldFile = new FileStream(file.Value, FileMode.Open, FileAccess.ReadWrite, FileShare.None); oldFile.Seek(0, SeekOrigin.Begin); oldFile.CopyTo(tempPath); oldFile.Dispose(); From 59228ce6c1bc40d51549e87d8bcc293075bab8f1 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 23 Aug 2022 14:24:18 -0700 Subject: [PATCH 057/185] Fix bug with secure file moving --- src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs | 4 +--- src/Tasks/Common/FileUtilities.cs | 11 +++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index 9071e4c4c68f..be1e5e83f402 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -37,14 +37,12 @@ public static bool IsRunningUnderSudo() [DllImport("libc", SetLastError = true)] public static extern int chown(string username, string path); - [DllImport("libc", SetLastError = true)] - private static extern int chmod(string pathname, uint mode); private static void OverridePathFromSudoPermToSudoUserPerm(string path) { if (!OperatingSystem.IsWindows() && IsRunningUnderSudo()) { chown(Environment.GetEnvironmentVariable("SUDO_USER"), path); - chmod(path, 0000700); + FileUtilities.ResetTempFilePermissions(path); } } diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index aeeb1c4c1437..1c73015c7c3f 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -73,5 +73,16 @@ public static string CreateTempFile() return Path.GetTempFileName(); } + + [DllImport("libc", SetLastError = true)] + private static extern int chmod(string pathname, uint mode); + public static void ResetTempFilePermissions(string path) + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + chmod(path, 0000700); + } + } + } } From 6e8962624ee92f1539782e6214001ca0f9daa776 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 23 Aug 2022 14:55:17 -0700 Subject: [PATCH 058/185] Fix it runs with specified verbosity --- src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index 4b86af94aa59..8bbc9d182689 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -14,6 +14,7 @@ using NuGet.ProjectModel; using NuGet.Versioning; using Microsoft.NET.Build.Tasks; +using System.Diagnostics; namespace Microsoft.DotNet.ToolPackage { @@ -165,7 +166,7 @@ private string CreateDirectoryWithTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - string tempProject = _tempProject.ToString() ?? (FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj")); + string tempProject = _tempProject != null ? _tempProject.ToString() : (FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj")); if (_tempProject != null) { tempProject = Path.ChangeExtension(tempProject, "csproj"); From 754a199d98d254e722be70c7b736e3379da464ec Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 22 Aug 2022 11:23:32 -0400 Subject: [PATCH 059/185] Work around analyzer bug --- src/Microsoft.Win32.Msi/NativeMethods.cs | 3 +++ src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/Microsoft.Win32.Msi/NativeMethods.cs b/src/Microsoft.Win32.Msi/NativeMethods.cs index eb60d99ac393..52936f2346b0 100644 --- a/src/Microsoft.Win32.Msi/NativeMethods.cs +++ b/src/Microsoft.Win32.Msi/NativeMethods.cs @@ -5,6 +5,9 @@ using System.Runtime.InteropServices; using System.Text; +// Work around https://github.com/dotnet/roslyn-analyzers/issues/6094 +#pragma warning disable CA1420 + namespace Microsoft.Win32.Msi { /// diff --git a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs index a407c81d0f5c..fb0329d275c4 100644 --- a/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs +++ b/src/Resolvers/Microsoft.DotNet.NativeWrapper/Interop.cs @@ -8,6 +8,9 @@ #nullable disable +// Work around https://github.com/dotnet/roslyn-analyzers/issues/6094 +#pragma warning disable CA1420 + namespace Microsoft.DotNet.NativeWrapper { public static partial class Interop From d5aed40959511a8fff0f5fd430cc70730959177e Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 25 Aug 2022 12:34:51 -0700 Subject: [PATCH 060/185] Try using chown in other places where sudo might be used in a workload install --- .../SudoEnvironmentDirectoryOverride.cs | 4 --- src/Tasks/Common/FileUtilities.cs | 26 ++++++++++++++++--- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index be1e5e83f402..7e1861d100e7 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -34,14 +34,10 @@ public static bool IsRunningUnderSudo() return false; } - - [DllImport("libc", SetLastError = true)] - public static extern int chown(string username, string path); private static void OverridePathFromSudoPermToSudoUserPerm(string path) { if (!OperatingSystem.IsWindows() && IsRunningUnderSudo()) { - chown(Environment.GetEnvironmentVariable("SUDO_USER"), path); FileUtilities.ResetTempFilePermissions(path); } } diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 1c73015c7c3f..075ea805975a 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -37,13 +37,18 @@ public static Version TryGetAssemblyVersion(string sourcePath) } [DllImport("libc", SetLastError = true)] - public static extern int mkdir(string pathname, uint mode); + public static extern int mkdir(string pathname, int mode); public static string CreateTempPath() { string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - mkdir(path, 0000700); + const int S_IRUSR = 256; + const int S_IWUSR = 128; + const int S_IXUSR = 64; + int _700 = S_IRUSR | S_IWUSR | S_IXUSR; + mkdir(path, _700); + ResetTempFilePermissions(path); } else { @@ -61,6 +66,7 @@ public static string CreateTempFile(string tempDirectory, string extension = "") string fileName = Path.ChangeExtension(Path.Combine(tempDirectory, Path.GetTempFileName()), extension); var fstream = File.Create(fileName.ToString()); fstream.Close(); + ResetTempFilePermissions(fileName); return fileName; } @@ -75,12 +81,24 @@ public static string CreateTempFile() [DllImport("libc", SetLastError = true)] - private static extern int chmod(string pathname, uint mode); + private static extern int chmod(string pathname, int mode); + [DllImport("libc", SetLastError = true)] + public static extern int chown(string path, int owner, int group); public static void ResetTempFilePermissions(string path) { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - chmod(path, 0000700); + if(Environment.GetEnvironmentVariable("SUDO_USER") != null) + { + string UID = Environment.GetEnvironmentVariable("SUDO_UID"); + string GID = Environment.GetEnvironmentVariable("SUDO_GID"); + chown(path, Int32.Parse(UID), Int32.Parse(GID)); + } + const int S_IRUSR = 256; + const int S_IWUSR = 128; + const int S_IXUSR = 64; + int _700 = S_IRUSR | S_IWUSR | S_IXUSR; + chmod(path, _700); } } From 72072e7656faa5e9617af6910abe91fedce8a31a Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 25 Aug 2022 17:02:42 -0700 Subject: [PATCH 061/185] try not calling chown --- src/Tasks/Common/FileUtilities.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 075ea805975a..f29507f9abe3 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -92,7 +92,7 @@ public static void ResetTempFilePermissions(string path) { string UID = Environment.GetEnvironmentVariable("SUDO_UID"); string GID = Environment.GetEnvironmentVariable("SUDO_GID"); - chown(path, Int32.Parse(UID), Int32.Parse(GID)); + //chown(path, Int32.Parse(UID), Int32.Parse(GID)); } const int S_IRUSR = 256; const int S_IWUSR = 128; From 2b24acb53c030a36c30edb1dc57c29b068a84754 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Fri, 26 Aug 2022 11:55:48 -0700 Subject: [PATCH 062/185] Fix ugly things I did in toolpackageinstaller --- src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index 8bbc9d182689..324897160085 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -131,7 +131,6 @@ public IToolPackage InstallPackageToExternalManagedLocation( string verbosity = null) { var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); - FileUtilities.CreateTempFile(tempDirectoryForAssetJson); string tempProject = CreateDirectoryWithTempProject( packageId: packageId, @@ -166,13 +165,9 @@ private string CreateDirectoryWithTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - string tempProject = _tempProject != null ? _tempProject.ToString() : (FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj")); - if (_tempProject != null) - { - tempProject = Path.ChangeExtension(tempProject, "csproj"); - Directory.CreateDirectory(Path.GetDirectoryName(tempProject)); - } + string tempProject = _tempProject != null && _tempProject.HasValue ? _tempProject.Value.Value : FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj"); + Directory.CreateDirectory(Path.GetDirectoryName(tempProject)); var tempProjectContent = new XDocument( new XElement("Project", new XElement("PropertyGroup", From 759d99122e783cee6701408dac4febd0ec3e24ca Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Mon, 29 Aug 2022 21:41:38 +0000 Subject: [PATCH 063/185] Make output very verbose --- src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs b/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs index 4e954d6cd20e..769aee9afbc5 100644 --- a/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs +++ b/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs @@ -91,6 +91,9 @@ public void ItListsAutoReferencedPackages() .WithProjectChanges(ChangeTargetFrameworkTo2_1); var projectDirectory = testAsset.Path; + var debugCmd = new DotnetCommand(Log); + debugCmd.Execute($"dotnet", "msbuild", "--pp", $"{projectDirectory + "\\TestAppSimple.csproj"}"); + new RestoreCommand(testAsset) .Execute() .Should() From d333650ffe759d28b9b1d32f4e70e795e939d3e5 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 30 Aug 2022 15:06:23 -0700 Subject: [PATCH 064/185] Create tempfile instead of just doing path combine. --- src/Cli/dotnet/ShellShim/ShellShimRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index f31427e80062..90d0fe0617f6 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -105,7 +105,7 @@ public void RemoveShim(ToolCommandName commandName) { foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value))) { - var tempPath = Path.Combine(FileUtilities.CreateTempPath(), Path.GetRandomFileName()); + var tempPath = FileUtilities.CreateTempFile(FileUtilities.CreateTempPath()); FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(file.Value, tempPath)); FileUtilities.ResetTempFilePermissions(tempPath); files[file.Value] = tempPath; From e95bb26528dda306e1162a3caedcaab044dbcf0b Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 30 Aug 2022 16:08:07 -0700 Subject: [PATCH 065/185] SDK Manifest changes for MSRC --- .../install/NetSdkMsiInstallerClient.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs index ed04a4548648..96d05df1cbd1 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs @@ -17,6 +17,7 @@ using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord; using Microsoft.Extensions.EnvironmentAbstractions; +using Microsoft.NET.Build.Tasks; using Microsoft.NET.Sdk.WorkloadManifestReader; using Microsoft.Win32.Msi; using NuGet.Common; @@ -116,7 +117,7 @@ public void GarbageCollectInstalledWorkloadPacks(DirectoryPath? offlineCache = n Log?.LogMessage("Starting garbage collection."); IEnumerable installedFeatureBands = GetInstalledFeatureBands(); IEnumerable installedWorkloads = RecordRepository.GetInstalledWorkloads(_sdkFeatureBand); - Dictionary<(WorkloadPackId id, string version),PackInfo> expectedWorkloadPacks = installedWorkloads + Dictionary<(WorkloadPackId id, string version), PackInfo> expectedWorkloadPacks = installedWorkloads .SelectMany(workload => _workloadResolver.GetPacksInWorkload(workload)) .Distinct() .Select(pack => _workloadResolver.TryGetPackInfo(pack)) @@ -415,9 +416,9 @@ public void InstallWorkloads(IEnumerable workloadIds, SdkFeatureBand RollBackMsiInstall(msiToInstall); } }); - + } - + } void RollBackMsiInstall(WorkloadDownload msiToRollback, DirectoryPath? offlineCache = null) @@ -493,7 +494,7 @@ public async Task ExtractManifestAsync(string nupkgPath, string targetPath) { Log?.LogMessage($"ExtractManifestAsync: Extracting '{nupkgPath}' to '{targetPath}'"); - string extractionPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); + string extractionPath = FileUtilities.CreateTempPath(); if (Directory.Exists(extractionPath)) { Directory.Delete(extractionPath, true); @@ -502,7 +503,7 @@ public async Task ExtractManifestAsync(string nupkgPath, string targetPath) try { Directory.CreateDirectory(extractionPath); - + FileUtilities.ResetTempFilePermissions(extractionPath); Log?.LogMessage($"ExtractManifestAsync: Temporary extraction path: '{extractionPath}'"); await _nugetPackageDownloader.ExtractPackageAsync(nupkgPath, new DirectoryPath(extractionPath)); if (Directory.Exists(targetPath)) @@ -959,7 +960,7 @@ public static NetSdkMsiInstallerClient Create( if (nugetPackageDownloader == null) { - DirectoryPath tempPackagesDir = new(string.IsNullOrWhiteSpace(tempDirPath) ? Path.GetTempPath() : tempDirPath); + DirectoryPath tempPackagesDir = new(string.IsNullOrWhiteSpace(tempDirPath) ? FileUtilities.CreateTempPath() : tempDirPath); nugetPackageDownloader = new NuGetPackageDownloader(tempPackagesDir, filePermissionSetter: null, new FirstPartyNuGetPackageSigningVerifier(), From 89f9e6698868c1630c7e8072576600370db107ae Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 31 Aug 2022 11:33:55 -0700 Subject: [PATCH 066/185] Fix directory paths to be correct --- .../DirectoryWrapper.cs | 7 ++++++- .../IDirectory.cs | 4 ++++ ...Microsoft.DotNet.InternalAbstractions.csproj | 5 +++++ .../TemporaryDirectory.cs | 3 ++- src/Cli/dotnet/ShellShim/ShellShimRepository.cs | 6 +++--- src/Cli/dotnet/dotnet.csproj | 2 -- .../GivenAFirstTimeUseNoticeSentinel.cs | 7 ++++++- ...venAFunctionReturnStringAndFakeFileSystem.cs | 5 +++++ .../Mock/FileSystemMockBuilder.cs | 17 +++++++++++------ 9 files changed, 42 insertions(+), 14 deletions(-) diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/DirectoryWrapper.cs b/src/Cli/Microsoft.DotNet.InternalAbstractions/DirectoryWrapper.cs index 312d6fecd7d4..81b16d48858e 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/DirectoryWrapper.cs +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/DirectoryWrapper.cs @@ -7,7 +7,7 @@ namespace Microsoft.Extensions.EnvironmentAbstractions { - internal class DirectoryWrapper: IDirectory + internal class DirectoryWrapper : IDirectory { public bool Exists(string path) { @@ -19,6 +19,11 @@ public ITemporaryDirectory CreateTemporaryDirectory() return new TemporaryDirectory(); } + public string CreateTempPath() + { + return CreateTemporaryDirectory().DirectoryPath; + } + public IEnumerable EnumerateDirectories(string path) { return Directory.EnumerateDirectories(path); diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/IDirectory.cs b/src/Cli/Microsoft.DotNet.InternalAbstractions/IDirectory.cs index 983bba34afc3..3dde961ebbe0 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/IDirectory.cs +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/IDirectory.cs @@ -24,5 +24,9 @@ internal interface IDirectory void Delete(string path, bool recursive); void Move(string source, string destination); + + + /// Returns a new directory created under the temp folder. Can be on the mock under test or the real temp file folder. + string CreateTempPath(); } } diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj b/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj index 041ba1315c78..18944f8aad34 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj @@ -12,4 +12,9 @@ true + + + + + diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs b/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs index d43683e156f5..5ae92f86fe89 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs @@ -3,6 +3,7 @@ using Microsoft.Extensions.EnvironmentAbstractions; using System.IO; +using Microsoft.NET.Build.Tasks; namespace Microsoft.DotNet.InternalAbstractions { @@ -12,7 +13,7 @@ internal class TemporaryDirectory : ITemporaryDirectory public TemporaryDirectory() { - DirectoryPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + DirectoryPath = Path.Combine(FileUtilities.CreateTempPath(), Path.GetRandomFileName()); Directory.CreateDirectory(DirectoryPath); } diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index 90d0fe0617f6..974835928e4f 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -105,10 +105,10 @@ public void RemoveShim(ToolCommandName commandName) { foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value))) { - var tempPath = FileUtilities.CreateTempFile(FileUtilities.CreateTempPath()); + // v This should call FileUtilities for a secure directory, or call the mock temp path creator. + var tempPath = Path.Combine(_fileSystem.Directory.CreateTempPath(), Path.GetRandomFileName()); FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(file.Value, tempPath)); - FileUtilities.ResetTempFilePermissions(tempPath); - files[file.Value] = tempPath; + files[file.Value] = tempPath; } } catch (Exception ex) when (ex is UnauthorizedAccessException || ex is IOException) diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj index 1004b10a6322..bb202db43721 100644 --- a/src/Cli/dotnet/dotnet.csproj +++ b/src/Cli/dotnet/dotnet.csproj @@ -20,8 +20,6 @@ - - diff --git a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs b/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs index 843f882ffdb6..4bc243afc46e 100644 --- a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs +++ b/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs @@ -26,7 +26,7 @@ public GivenAFirstTimeUseNoticeSentinel() _fileSystemMockBuilder = FileSystemMockBuilder.Create(); } - [Fact(Skip ="Product.Version not set correctly when running tests")] + [Fact(Skip = "Product.Version not set correctly when running tests")] public void TheSentinelHasTheCurrentVersionInItsName() { FirstTimeUseNoticeSentinel.SENTINEL.Should().Contain($"{Product.Version}"); @@ -174,6 +174,11 @@ public ITemporaryDirectory CreateTemporaryDirectory() throw new NotImplementedException(); } + public string CreateTempPath() + { + throw new NotImplementedException(); + } + public IEnumerable EnumerateDirectories(string path) { throw new NotImplementedException(); diff --git a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs b/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs index 10e3f1930814..f2248dbf1253 100644 --- a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs +++ b/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs @@ -173,6 +173,11 @@ public IEnumerable EnumerateFileSystemEntries(string path) throw new UnauthorizedAccessException(); } + public string CreateTempPath() + { + throw new NotImplementedException(); + } + public string GetCurrentDirectory() { throw new NotImplementedException(); diff --git a/src/Tests/Microsoft.NET.TestFramework/Mock/FileSystemMockBuilder.cs b/src/Tests/Microsoft.NET.TestFramework/Mock/FileSystemMockBuilder.cs index 7eb9e5381989..5531cf6a76f2 100644 --- a/src/Tests/Microsoft.NET.TestFramework/Mock/FileSystemMockBuilder.cs +++ b/src/Tests/Microsoft.NET.TestFramework/Mock/FileSystemMockBuilder.cs @@ -154,7 +154,7 @@ public void CreateDirectory(string path) else { DirectoryNode directoryNode = new DirectoryNode(); - directoryNode = (DirectoryNode) current.Subs.GetOrAdd(p , directoryNode); + directoryNode = (DirectoryNode)current.Subs.GetOrAdd(p, directoryNode); current = directoryNode; } } @@ -237,7 +237,7 @@ public DirectoryNode GetParentOfDirectoryNode(string path) } PathModel pathModel = CreateFullPathModel(path); - if (current.Subs.TryGetValue(pathModel.FileOrDirectoryName(), out var node) ) + if (current.Subs.TryGetValue(pathModel.FileOrDirectoryName(), out var node)) { if (node is FileNode) { @@ -283,7 +283,7 @@ public PathModel(string path) } string[] pathArray = path.Split( - new[] {directorySeparatorChar, altDirectorySeparatorChar}, + new[] { directorySeparatorChar, altDirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries); Volume = volume; PathArray = pathArray; @@ -451,7 +451,7 @@ public void Move(string source, string destination) if (_files.TryGetNodeParent(destination, out DirectoryNode current) && current != null) { - sourceFileNode = (FileNode) current.Subs.GetOrAdd(new PathModel(destination).FileOrDirectoryName(), sourceFileNode); + sourceFileNode = (FileNode)current.Subs.GetOrAdd(new PathModel(destination).FileOrDirectoryName(), sourceFileNode); sourceParent.Subs.TryRemove(new PathModel(source).FileOrDirectoryName(), out _); } else @@ -525,9 +525,9 @@ public bool Exists(string path) if (_files.TryGetNodeParent(path, out DirectoryNode current)) { - PathModel pathModel = new PathModel(path); + PathModel pathModel = new PathModel(path); - return current.Subs.TryGetValue(pathModel.FileOrDirectoryName(), out var node) + return current.Subs.TryGetValue(pathModel.FileOrDirectoryName(), out var node) && node is DirectoryNode; } @@ -579,6 +579,11 @@ public void CreateDirectory(string path) _files.CreateDirectory(path); } + public string CreateTempPath() + { + return CreateTemporaryDirectory().DirectoryPath; + } + public void Delete(string path, bool recursive) { if (path == null) throw new ArgumentNullException(nameof(path)); From dc71c6ffbe189e13c167408447bbaee8a1bc4527 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 31 Aug 2022 16:09:00 -0700 Subject: [PATCH 067/185] Remove unneeded sudo directory code --- src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index 7e1861d100e7..cf52e67baeb0 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -34,20 +34,11 @@ public static bool IsRunningUnderSudo() return false; } - private static void OverridePathFromSudoPermToSudoUserPerm(string path) - { - if (!OperatingSystem.IsWindows() && IsRunningUnderSudo()) - { - FileUtilities.ResetTempFilePermissions(path); - } - } - public static void OverrideEnvironmentVariableToTmp(ParseResult parseResult) { if (!OperatingSystem.IsWindows() && IsRunningUnderSudo() && IsRunningWorkloadCommand(parseResult)) { string newProcessHomeDirectory = FileUtilities.CreateTempPath(); - OverridePathFromSudoPermToSudoUserPerm(newProcessHomeDirectory); var homeBeforeOverride = Path.Combine(Environment.GetEnvironmentVariable("HOME")); Environment.SetEnvironmentVariable("HOME", newProcessHomeDirectory); From 95f089ef40e6689c012d8ef45ff8a4bf81137cb1 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 31 Aug 2022 16:16:11 -0700 Subject: [PATCH 068/185] Clean up code in NETSDKManifestInstaller --- .../dotnet-workload/install/NetSdkMsiInstallerClient.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs index 96d05df1cbd1..eeb6a6d48c77 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs @@ -493,17 +493,10 @@ public PackageId GetManifestPackageId(ManifestId manifestId, SdkFeatureBand feat public async Task ExtractManifestAsync(string nupkgPath, string targetPath) { Log?.LogMessage($"ExtractManifestAsync: Extracting '{nupkgPath}' to '{targetPath}'"); - string extractionPath = FileUtilities.CreateTempPath(); - if (Directory.Exists(extractionPath)) - { - Directory.Delete(extractionPath, true); - } try { - Directory.CreateDirectory(extractionPath); - FileUtilities.ResetTempFilePermissions(extractionPath); Log?.LogMessage($"ExtractManifestAsync: Temporary extraction path: '{extractionPath}'"); await _nugetPackageDownloader.ExtractPackageAsync(nupkgPath, new DirectoryPath(extractionPath)); if (Directory.Exists(targetPath)) From 0a2e0d32b55e821011842aac4b8fc027ada92f5c Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 31 Aug 2022 16:25:49 -0700 Subject: [PATCH 069/185] Port daniel's reviewed changes into new code --- .../dotnet-watch/Internal/MsBuildFileSetFactory.cs | 2 +- src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs | 4 ++-- src/Tasks/Common/FileUtilities.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs index 375cc2f50ee4..03d5f53bccf3 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs @@ -64,7 +64,7 @@ internal MsBuildFileSetFactory( public async Task CreateAsync(CancellationToken cancellationToken) { - var watchList = FileUtilities.CreateTempFile(FileUtilities.CreateTempPath()); + var watchList = Path.Combine(FileUtilities.CreateTempPath(), Path.GetRandomFileName()); try { var projectDir = Path.GetDirectoryName(_projectFile); diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index cf52e67baeb0..513a867e9704 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -38,9 +38,9 @@ public static void OverrideEnvironmentVariableToTmp(ParseResult parseResult) { if (!OperatingSystem.IsWindows() && IsRunningUnderSudo() && IsRunningWorkloadCommand(parseResult)) { - string newProcessHomeDirectory = FileUtilities.CreateTempPath(); + string sudoHome = FileUtilities.CreateTempPath(); var homeBeforeOverride = Path.Combine(Environment.GetEnvironmentVariable("HOME")); - Environment.SetEnvironmentVariable("HOME", newProcessHomeDirectory); + Environment.SetEnvironmentVariable("HOME", sudoHome); CopyUserNuGetConfigToOverriddenHome(homeBeforeOverride); } diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 306c11f85522..6141ea652cfd 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -82,7 +82,7 @@ public static string CreateTempFile() [DllImport("libc", SetLastError = true)] private static extern int chmod(string pathname, int mode); - public static void ResetTempFilePermissions(string path) + private static void ResetTempFilePermissions(string path) { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { From 9fba57be04a1c6482548cbb0190d2528789cd1ba Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 1 Sep 2022 09:11:04 -0700 Subject: [PATCH 070/185] Remove msbuild debug code --- src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs b/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs index 769aee9afbc5..4e954d6cd20e 100644 --- a/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs +++ b/src/Tests/dotnet-list-package.Tests/GivenDotnetListPackage.cs @@ -91,9 +91,6 @@ public void ItListsAutoReferencedPackages() .WithProjectChanges(ChangeTargetFrameworkTo2_1); var projectDirectory = testAsset.Path; - var debugCmd = new DotnetCommand(Log); - debugCmd.Execute($"dotnet", "msbuild", "--pp", $"{projectDirectory + "\\TestAppSimple.csproj"}"); - new RestoreCommand(testAsset) .Execute() .Should() From c21d76edae0d08b04ae2ba1383cab61c8ce263e1 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 6 Sep 2022 09:36:55 -0700 Subject: [PATCH 071/185] Respond to daniel's PR feedback --- .../FilePath.cs | 2 +- .../TemporaryDirectory.cs | 3 +- .../dotnet/ShellShim/ShellShimRepository.cs | 1 - .../SudoEnvironmentDirectoryOverride.cs | 26 ------------- .../ToolPackage/ToolPackageInstaller.cs | 10 ++++- .../commands/InstallingWorkloadCommand.cs | 1 - .../dotnet-workload/WorkloadCommandBase.cs | 1 - .../install/FileBasedInstaller.cs | 1 - src/Tasks/Common/FileUtilities.cs | 38 +------------------ .../ToolPackageInstallerNugetCacheTests.cs | 2 +- .../ToolPackageInstallerTests.cs | 4 +- 11 files changed, 15 insertions(+), 74 deletions(-) diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs b/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs index 3532e058decf..0bb2e793b247 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs @@ -25,7 +25,7 @@ public FilePath(string value) public string ToQuotedString() { - return $"\"{Value}\""; + return Value; } public override string ToString() diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs b/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs index 5ae92f86fe89..e6d33775e515 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs @@ -13,8 +13,7 @@ internal class TemporaryDirectory : ITemporaryDirectory public TemporaryDirectory() { - DirectoryPath = Path.Combine(FileUtilities.CreateTempPath(), Path.GetRandomFileName()); - Directory.CreateDirectory(DirectoryPath); + DirectoryPath = Path.Combine(FileUtilities.CreateTempPath()); } public void Dispose() diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index 974835928e4f..453beb34550b 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -105,7 +105,6 @@ public void RemoveShim(ToolCommandName commandName) { foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value))) { - // v This should call FileUtilities for a secure directory, or call the mock temp path creator. var tempPath = Path.Combine(_fileSystem.Directory.CreateTempPath(), Path.GetRandomFileName()); FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(file.Value, tempPath)); files[file.Value] = tempPath; diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index 513a867e9704..479618e4b819 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -94,31 +94,5 @@ private static void CopyUserNuGetConfigToOverriddenHome(string homeBeforeOverrid private static bool IsRunningWorkloadCommand(ParseResult parseResult) => parseResult.RootSubCommandResult() == (WorkloadCommandParser.GetCommand().Name); - - private static bool TempHomeIsOnlyRootWritable(string path) - { - if (StatInterop.LStat(path, out StatInterop.FileStatus fileStat) != 0) - { - return false; - } - - return IsOwnedByRoot(fileStat) && GroupCannotWrite(fileStat) && - OtherUserCannotWrite(fileStat); - } - - private static bool OtherUserCannotWrite(StatInterop.FileStatus fileStat) - { - return (fileStat.Mode & (int)StatInterop.Permissions.S_IWOTH) == 0; - } - - private static bool GroupCannotWrite(StatInterop.FileStatus fileStat) - { - return (fileStat.Mode & (int)StatInterop.Permissions.S_IWGRP) == 0; - } - - private static bool IsOwnedByRoot(StatInterop.FileStatus fileStat) - { - return fileStat.Uid == 0; - } } } diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index d76bb51298f7..c998e5773b3b 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -165,9 +165,15 @@ private string CreateDirectoryWithTempProject( DirectoryPath? rootConfigDirectory, string[] additionalFeeds) { - string tempProject = _tempProject != null && _tempProject.HasValue ? _tempProject.Value.Value : FileUtilities.CreateTempFile(FileUtilities.CreateTempPath(), "csproj"); + string tempProject; + if (_tempProject != null && _tempProject.HasValue) + { + tempProject = _tempProject.Value.Value; + Directory.CreateDirectory(Path.GetDirectoryName(tempProject)); + } + else + tempProject = Path.Combine(FileUtilities.CreateTempPath(), "restore.csproj"); - Directory.CreateDirectory(Path.GetDirectoryName(tempProject)); var tempProjectContent = new XDocument( new XElement("Project", new XElement("PropertyGroup", diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index a39aa1d95485..ea8d000e0e20 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -99,7 +99,6 @@ protected async Task> GetDownloads(IEnumerable - /// - /// - /// The full path of a newly created temp file with OK permissions. - public static string CreateTempFile() - { - return Path.GetTempFileName(); - } - - - [DllImport("libc", SetLastError = true)] - private static extern int chmod(string pathname, int mode); - private static void ResetTempFilePermissions(string path) - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - chmod(path, PERMISSIONS_OCTAL_700); - } - } - } } diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs b/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs index 41e71c959799..87e65c490cab 100644 --- a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs +++ b/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerNugetCacheTests.cs @@ -167,7 +167,7 @@ private static List GetMockFeedsForConfigFile(FilePath nugetConfig) installer = new ToolPackageInstaller( store: store, projectRestorer: new Stage2ProjectRestorer(Log, reporter), - tempProject: tempProject ?? GetUniqueTempProjectPathEachTest(testDirectory), // <-- is this a concern? + tempProject: tempProject ?? GetUniqueTempProjectPathEachTest(testDirectory), offlineFeed: offlineFeed ?? new DirectoryPath("does not exist")); } diff --git a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerTests.cs b/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerTests.cs index 0c1d2a0b434c..5582afd6de04 100644 --- a/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerTests.cs +++ b/src/Tests/Microsoft.DotNet.PackageInstall.Tests/ToolPackageInstallerTests.cs @@ -738,7 +738,7 @@ public void GivenARootWithNonAsciiCharacterInstallSucceeds() var installer = new ToolPackageInstaller( store: store, projectRestorer: new Stage2ProjectRestorer(Log, reporter), - tempProject: GetUniqueTempProjectPathEachTest(), // <-- is this a concern? + tempProject: GetUniqueTempProjectPathEachTest(), offlineFeed: new DirectoryPath("does not exist")); var package = installer.InstallPackage(new PackageLocation(nugetConfig: nugetConfigPath), @@ -1059,7 +1059,7 @@ private static string GetTestLocalFeedPath() => private readonly string _testTargetframework = BundledTargetFramework.GetTargetFrameworkMoniker(); private const string TestPackageVersion = "1.0.4"; private static readonly PackageId TestPackageId = new PackageId("global.tool.console.demo"); - private static readonly IEnumerable TestFrameworks = new NuGetFramework[] { NuGetFramework.Parse("netcoreapp2.1")}; + private static readonly IEnumerable TestFrameworks = new NuGetFramework[] { NuGetFramework.Parse("netcoreapp2.1") }; public ToolPackageInstallerTests(ITestOutputHelper log) : base(log) { From f98a3bee32c18f4b4592f705af806aa02307cb3b Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 6 Sep 2022 09:53:12 -0700 Subject: [PATCH 072/185] Rename createtemppath --- .../dotnet-watch/Internal/MsBuildFileSetFactory.cs | 2 +- src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs | 4 ++-- .../TemporaryDirectory.cs | 2 +- src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs | 2 +- src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs | 4 ++-- .../dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs | 2 +- .../dotnet/commands/dotnet-workload/WorkloadCommandBase.cs | 2 +- .../commands/dotnet-workload/install/FileBasedInstaller.cs | 2 +- .../dotnet-workload/install/NetSdkMsiInstallerClient.cs | 4 ++-- .../dotnet-workload/install/WorkloadManifestUpdater.cs | 2 +- src/Tasks/Common/FileUtilities.cs | 4 ++-- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs index 03d5f53bccf3..5a4dd5874e22 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs @@ -64,7 +64,7 @@ internal MsBuildFileSetFactory( public async Task CreateAsync(CancellationToken cancellationToken) { - var watchList = Path.Combine(FileUtilities.CreateTempPath(), Path.GetRandomFileName()); + var watchList = Path.Combine(FileUtilities.CreateTempSubdirectory(), Path.GetRandomFileName()); try { var projectDir = Path.GetDirectoryName(_projectFile); diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs b/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs index 0bb2e793b247..cf69976a0844 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/FilePath.cs @@ -25,12 +25,12 @@ public FilePath(string value) public string ToQuotedString() { - return Value; + return $"\"{Value}\""; } public override string ToString() { - return $"{Value}"; + return Value; } public DirectoryPath GetDirectoryPath() diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs b/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs index e6d33775e515..d1b703277fb7 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs @@ -13,7 +13,7 @@ internal class TemporaryDirectory : ITemporaryDirectory public TemporaryDirectory() { - DirectoryPath = Path.Combine(FileUtilities.CreateTempPath()); + DirectoryPath = Path.Combine(FileUtilities.CreateTempSubdirectory()); } public void Dispose() diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index 479618e4b819..24d118013443 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -38,7 +38,7 @@ public static void OverrideEnvironmentVariableToTmp(ParseResult parseResult) { if (!OperatingSystem.IsWindows() && IsRunningUnderSudo() && IsRunningWorkloadCommand(parseResult)) { - string sudoHome = FileUtilities.CreateTempPath(); + string sudoHome = FileUtilities.CreateTempSubdirectory(); var homeBeforeOverride = Path.Combine(Environment.GetEnvironmentVariable("HOME")); Environment.SetEnvironmentVariable("HOME", sudoHome); diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index c998e5773b3b..0925d89d09ad 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -130,7 +130,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( string targetFramework = null, string verbosity = null) { - var tempDirectoryForAssetJson = FileUtilities.CreateTempPath(); + var tempDirectoryForAssetJson = FileUtilities.CreateTempSubdirectory(); string tempProject = CreateDirectoryWithTempProject( packageId: packageId, @@ -172,7 +172,7 @@ private string CreateDirectoryWithTempProject( Directory.CreateDirectory(Path.GetDirectoryName(tempProject)); } else - tempProject = Path.Combine(FileUtilities.CreateTempPath(), "restore.csproj"); + tempProject = Path.Combine(FileUtilities.CreateTempSubdirectory(), "restore.csproj"); var tempProjectContent = new XDocument( new XElement("Project", diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs index 987fc0a16d00..a941d249e941 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs @@ -73,7 +73,7 @@ public ToolInstallGlobalOrToolPathCommand( _environmentPathInstruction = environmentPathInstruction ?? EnvironmentPathFactory.CreateEnvironmentPathInstruction(); _createShellShimRepository = createShellShimRepository ?? ShellShimRepositoryFactory.CreateShellShimRepository; - var tempDir = new DirectoryPath(FileUtilities.CreateTempPath()); + var tempDir = new DirectoryPath(FileUtilities.CreateTempSubdirectory()); var configOption = parseResult.GetValueForOption(ToolInstallCommandParser.ConfigOption); var sourceOption = parseResult.GetValueForOption(ToolInstallCommandParser.AddSourceOption); var packageSourceLocation = new PackageSourceLocation(string.IsNullOrEmpty(configOption) ? null : new FilePath(configOption), additionalSourceFeeds: sourceOption); diff --git a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs index 0a4c73e933c8..b0bd8ddb3eeb 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs @@ -105,7 +105,7 @@ public WorkloadCommandBase(ParseResult parseResult, ? tempDirPath : !string.IsNullOrWhiteSpace(parseResult.GetValueForOption(WorkloadInstallCommandParser.TempDirOption)) ? parseResult.GetValueForOption(WorkloadInstallCommandParser.TempDirOption) - : FileUtilities.CreateTempPath(); + : FileUtilities.CreateTempSubdirectory(); TempPackagesDirectory = new DirectoryPath(Path.Combine(TempDirectoryPath, "dotnet-sdk-advertising-temp")); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs index f5f3370f1381..c501530abef9 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs @@ -52,7 +52,7 @@ public FileBasedInstaller(IReporter reporter, { _userProfileDir = userProfileDir; _dotnetDir = dotnetDir ?? Path.GetDirectoryName(Environment.ProcessPath); - _tempPackagesDir = new DirectoryPath(tempDirPath ?? FileUtilities.CreateTempPath()); + _tempPackagesDir = new DirectoryPath(tempDirPath ?? FileUtilities.CreateTempSubdirectory()); ILogger logger = verbosity.VerbosityIsDetailedOrDiagnostic() ? new NuGetConsoleLogger() : new NullLogger(); _restoreActionConfig = restoreActionConfig; _nugetPackageDownloader = nugetPackageDownloader ?? diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs index eeb6a6d48c77..97f1d2fc9044 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs @@ -493,7 +493,7 @@ public PackageId GetManifestPackageId(ManifestId manifestId, SdkFeatureBand feat public async Task ExtractManifestAsync(string nupkgPath, string targetPath) { Log?.LogMessage($"ExtractManifestAsync: Extracting '{nupkgPath}' to '{targetPath}'"); - string extractionPath = FileUtilities.CreateTempPath(); + string extractionPath = FileUtilities.CreateTempSubdirectory(); try { @@ -953,7 +953,7 @@ public static NetSdkMsiInstallerClient Create( if (nugetPackageDownloader == null) { - DirectoryPath tempPackagesDir = new(string.IsNullOrWhiteSpace(tempDirPath) ? FileUtilities.CreateTempPath() : tempDirPath); + DirectoryPath tempPackagesDir = new(string.IsNullOrWhiteSpace(tempDirPath) ? FileUtilities.CreateTempSubdirectory() : tempDirPath); nugetPackageDownloader = new NuGetPackageDownloader(tempPackagesDir, filePermissionSetter: null, new FirstPartyNuGetPackageSigningVerifier(), diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index 58829d383218..4c0abf35173d 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -70,7 +70,7 @@ private static WorkloadManifestUpdater GetInstance(string userProfileDir) var sdkVersion = Product.Version; var workloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(dotnetPath, sdkVersion, userProfileDir); var workloadResolver = WorkloadResolver.Create(workloadManifestProvider, dotnetPath, sdkVersion, userProfileDir); - var tempPackagesDir = new DirectoryPath(FileUtilities.CreateTempPath()); + var tempPackagesDir = new DirectoryPath(FileUtilities.CreateTempSubdirectory()); var nugetPackageDownloader = new NuGetPackageDownloader(tempPackagesDir, filePermissionSetter: null, new FirstPartyNuGetPackageSigningVerifier(), diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 840d43ff5aef..2f3c01d53b1d 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -42,8 +42,8 @@ public static Version TryGetAssemblyVersion(string sourcePath) } [DllImport("libc", SetLastError = true)] - public static extern int mkdir(string pathname, int mode); - public static string CreateTempPath() + private static extern int mkdir(string pathname, int mode); + public static string CreateTempSubdirectory() { string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) From a2a123948db05732d259990dd8d03d8f9b531595 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 6 Sep 2022 13:11:16 -0700 Subject: [PATCH 073/185] Move FileUtilities to PathUtilities in src/common, add consts --- .../Internal/MsBuildFileSetFactory.cs | 3 +- .../dotnet-watch/dotnet-watch.csproj | 3 +- ...crosoft.DotNet.InternalAbstractions.csproj | 4 +-- .../TemporaryDirectory.cs | 6 ++-- .../dotnet/ShellShim/ShellShimRepository.cs | 1 - .../SudoEnvironmentDirectoryOverride.cs | 6 +--- .../ToolPackage/ToolPackageInstaller.cs | 7 ++-- .../commands/InstallingWorkloadCommand.cs | 4 --- .../ToolInstallGlobalOrToolPathCommand.cs | 4 +-- .../dotnet-workload/WorkloadCommandBase.cs | 4 +-- .../install/FileBasedInstaller.cs | 10 +++--- .../install/NetSdkMsiInstallerClient.cs | 6 ++-- .../install/WorkloadManifestUpdater.cs | 12 +++---- src/Cli/dotnet/dotnet.csproj | 3 +- src/Common/PathUtilities.cs | 33 +++++++++++++++++++ src/Tasks/Common/FileUtilities.cs | 22 ------------- 16 files changed, 56 insertions(+), 72 deletions(-) create mode 100644 src/Common/PathUtilities.cs diff --git a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs index 5a4dd5874e22..792d8623c49a 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using Microsoft.DotNet.Watcher.Tools; using Microsoft.Extensions.Tools.Internal; -using Microsoft.NET.Build.Tasks; using IReporter = Microsoft.Extensions.Tools.Internal.IReporter; namespace Microsoft.DotNet.Watcher.Internal @@ -64,7 +63,7 @@ internal MsBuildFileSetFactory( public async Task CreateAsync(CancellationToken cancellationToken) { - var watchList = Path.Combine(FileUtilities.CreateTempSubdirectory(), Path.GetRandomFileName()); + var watchList = Path.Combine(PathUtilities.CreateTempSubdirectory(), Path.GetRandomFileName()); try { var projectDir = Path.GetDirectoryName(_projectFile); diff --git a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj index c3746d05d6c6..065f750f7200 100644 --- a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj +++ b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj @@ -23,8 +23,7 @@ - - + diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj b/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj index 18944f8aad34..6260c984866d 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj @@ -13,8 +13,6 @@ - - - + diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs b/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs index d1b703277fb7..9ce8241c8967 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/TemporaryDirectory.cs @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Microsoft.Extensions.EnvironmentAbstractions; using System.IO; -using Microsoft.NET.Build.Tasks; +using Microsoft.Extensions.EnvironmentAbstractions; +using Microsoft.DotNet; namespace Microsoft.DotNet.InternalAbstractions { @@ -13,7 +13,7 @@ internal class TemporaryDirectory : ITemporaryDirectory public TemporaryDirectory() { - DirectoryPath = Path.Combine(FileUtilities.CreateTempSubdirectory()); + DirectoryPath = Path.Combine(PathUtilities.CreateTempSubdirectory()); } public void Dispose() diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index 453beb34550b..c46e44cf9de2 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -9,7 +9,6 @@ using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools; using Microsoft.Extensions.EnvironmentAbstractions; -using Microsoft.NET.Build.Tasks; namespace Microsoft.DotNet.ShellShim { diff --git a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs index 24d118013443..8b04671a631b 100644 --- a/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs +++ b/src/Cli/dotnet/SudoEnvironmentDirectoryOverride.cs @@ -3,13 +3,9 @@ using System; using System.CommandLine; -using System.CommandLine.Parsing; using System.IO; using System.Linq; -using System.Runtime.InteropServices; using Microsoft.DotNet.Cli.Utils; -using Microsoft.DotNet.Tools.Common; -using Microsoft.NET.Build.Tasks; using NuGet.Common; using NuGet.Configuration; @@ -38,7 +34,7 @@ public static void OverrideEnvironmentVariableToTmp(ParseResult parseResult) { if (!OperatingSystem.IsWindows() && IsRunningUnderSudo() && IsRunningWorkloadCommand(parseResult)) { - string sudoHome = FileUtilities.CreateTempSubdirectory(); + string sudoHome = PathUtilities.CreateTempSubdirectory(); var homeBeforeOverride = Path.Combine(Environment.GetEnvironmentVariable("HOME")); Environment.SetEnvironmentVariable("HOME", sudoHome); diff --git a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs index 0925d89d09ad..f9d20bf96648 100644 --- a/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs +++ b/src/Cli/dotnet/ToolPackage/ToolPackageInstaller.cs @@ -11,10 +11,7 @@ using Microsoft.DotNet.Configurer; using Microsoft.DotNet.Tools; using Microsoft.Extensions.EnvironmentAbstractions; -using NuGet.ProjectModel; using NuGet.Versioning; -using Microsoft.NET.Build.Tasks; -using System.Diagnostics; namespace Microsoft.DotNet.ToolPackage { @@ -130,7 +127,7 @@ public IToolPackage InstallPackageToExternalManagedLocation( string targetFramework = null, string verbosity = null) { - var tempDirectoryForAssetJson = FileUtilities.CreateTempSubdirectory(); + var tempDirectoryForAssetJson = PathUtilities.CreateTempSubdirectory(); string tempProject = CreateDirectoryWithTempProject( packageId: packageId, @@ -172,7 +169,7 @@ private string CreateDirectoryWithTempProject( Directory.CreateDirectory(Path.GetDirectoryName(tempProject)); } else - tempProject = Path.Combine(FileUtilities.CreateTempSubdirectory(), "restore.csproj"); + tempProject = Path.Combine(PathUtilities.CreateTempSubdirectory(), "restore.csproj"); var tempProjectContent = new XDocument( new XElement("Project", diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index ea8d000e0e20..52c7432fb321 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -5,10 +5,8 @@ using System; using System.Collections.Generic; using System.CommandLine; -using System.CommandLine.Parsing; using System.IO; using System.Linq; -using System.Text; using System.Threading.Tasks; using Microsoft.Deployment.DotNet.Releases; using Microsoft.DotNet.Cli; @@ -17,9 +15,7 @@ using Microsoft.DotNet.Configurer; using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Workloads.Workload.Install; -using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord; using Microsoft.Extensions.EnvironmentAbstractions; -using Microsoft.NET.Build.Tasks; using Microsoft.NET.Sdk.WorkloadManifestReader; using NuGet.Versioning; using Command = System.CommandLine.Command; diff --git a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs index a941d249e941..0b4c199f1b3e 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-tool/install/ToolInstallGlobalOrToolPathCommand.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.CommandLine; -using System.CommandLine.Parsing; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -19,7 +18,6 @@ using NuGet.Common; using NuGet.Frameworks; using NuGet.Versioning; -using Microsoft.NET.Build.Tasks; namespace Microsoft.DotNet.Tools.Tool.Install { @@ -73,7 +71,7 @@ public ToolInstallGlobalOrToolPathCommand( _environmentPathInstruction = environmentPathInstruction ?? EnvironmentPathFactory.CreateEnvironmentPathInstruction(); _createShellShimRepository = createShellShimRepository ?? ShellShimRepositoryFactory.CreateShellShimRepository; - var tempDir = new DirectoryPath(FileUtilities.CreateTempSubdirectory()); + var tempDir = new DirectoryPath(PathUtilities.CreateTempSubdirectory()); var configOption = parseResult.GetValueForOption(ToolInstallCommandParser.ConfigOption); var sourceOption = parseResult.GetValueForOption(ToolInstallCommandParser.AddSourceOption); var packageSourceLocation = new PackageSourceLocation(string.IsNullOrEmpty(configOption) ? null : new FilePath(configOption), additionalSourceFeeds: sourceOption); diff --git a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs index b0bd8ddb3eeb..c4ea1b781620 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/WorkloadCommandBase.cs @@ -2,13 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CommandLine; -using System.CommandLine.Parsing; using System.IO; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.NuGetPackageDownloader; using Microsoft.DotNet.Cli.Utils; using Microsoft.Extensions.EnvironmentAbstractions; -using Microsoft.NET.Build.Tasks; using NuGet.Common; namespace Microsoft.DotNet.Workloads.Workload @@ -105,7 +103,7 @@ public WorkloadCommandBase(ParseResult parseResult, ? tempDirPath : !string.IsNullOrWhiteSpace(parseResult.GetValueForOption(WorkloadInstallCommandParser.TempDirOption)) ? parseResult.GetValueForOption(WorkloadInstallCommandParser.TempDirOption) - : FileUtilities.CreateTempSubdirectory(); + : PathUtilities.CreateTempSubdirectory(); TempPackagesDirectory = new DirectoryPath(Path.Combine(TempDirectoryPath, "dotnet-sdk-advertising-temp")); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs index c501530abef9..2f8a7e8ae8bc 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs @@ -5,20 +5,18 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text.Json; +using System.Threading.Tasks; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.NuGetPackageDownloader; using Microsoft.DotNet.Cli.Utils; -using Microsoft.DotNet.Configurer; using Microsoft.DotNet.ToolPackage; +using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord; using Microsoft.Extensions.EnvironmentAbstractions; using Microsoft.NET.Sdk.WorkloadManifestReader; using NuGet.Common; using NuGet.Versioning; using static Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver; -using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord; -using System.Text.Json; -using System.Threading.Tasks; -using Microsoft.NET.Build.Tasks; namespace Microsoft.DotNet.Workloads.Workload.Install { @@ -52,7 +50,7 @@ public FileBasedInstaller(IReporter reporter, { _userProfileDir = userProfileDir; _dotnetDir = dotnetDir ?? Path.GetDirectoryName(Environment.ProcessPath); - _tempPackagesDir = new DirectoryPath(tempDirPath ?? FileUtilities.CreateTempSubdirectory()); + _tempPackagesDir = new DirectoryPath(tempDirPath ?? PathUtilities.CreateTempSubdirectory()); ILogger logger = verbosity.VerbosityIsDetailedOrDiagnostic() ? new NuGetConsoleLogger() : new NullLogger(); _restoreActionConfig = restoreActionConfig; _nugetPackageDownloader = nugetPackageDownloader ?? diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs index 97f1d2fc9044..368d4716b184 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -17,7 +16,6 @@ using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord; using Microsoft.Extensions.EnvironmentAbstractions; -using Microsoft.NET.Build.Tasks; using Microsoft.NET.Sdk.WorkloadManifestReader; using Microsoft.Win32.Msi; using NuGet.Common; @@ -493,7 +491,7 @@ public PackageId GetManifestPackageId(ManifestId manifestId, SdkFeatureBand feat public async Task ExtractManifestAsync(string nupkgPath, string targetPath) { Log?.LogMessage($"ExtractManifestAsync: Extracting '{nupkgPath}' to '{targetPath}'"); - string extractionPath = FileUtilities.CreateTempSubdirectory(); + string extractionPath = PathUtilities.CreateTempSubdirectory(); try { @@ -953,7 +951,7 @@ public static NetSdkMsiInstallerClient Create( if (nugetPackageDownloader == null) { - DirectoryPath tempPackagesDir = new(string.IsNullOrWhiteSpace(tempDirPath) ? FileUtilities.CreateTempSubdirectory() : tempDirPath); + DirectoryPath tempPackagesDir = new(string.IsNullOrWhiteSpace(tempDirPath) ? PathUtilities.CreateTempSubdirectory() : tempDirPath); nugetPackageDownloader = new NuGetPackageDownloader(tempPackagesDir, filePermissionSetter: null, new FirstPartyNuGetPackageSigningVerifier(), diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index 4c0abf35173d..36c42b47cee4 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -6,7 +6,6 @@ using System.IO; using System.Linq; using System.Net.Http; -using System.Runtime.InteropServices; using System.Text.Json; using System.Threading.Tasks; using Microsoft.DotNet.Cli; @@ -17,7 +16,6 @@ using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord; using Microsoft.Extensions.EnvironmentAbstractions; -using Microsoft.NET.Build.Tasks; using Microsoft.NET.Sdk.WorkloadManifestReader; using NuGet.Common; using NuGet.Versioning; @@ -70,7 +68,7 @@ private static WorkloadManifestUpdater GetInstance(string userProfileDir) var sdkVersion = Product.Version; var workloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(dotnetPath, sdkVersion, userProfileDir); var workloadResolver = WorkloadResolver.Create(workloadManifestProvider, dotnetPath, sdkVersion, userProfileDir); - var tempPackagesDir = new DirectoryPath(FileUtilities.CreateTempSubdirectory()); + var tempPackagesDir = new DirectoryPath(PathUtilities.CreateTempSubdirectory()); var nugetPackageDownloader = new NuGetPackageDownloader(tempPackagesDir, filePermissionSetter: null, new FirstPartyNuGetPackageSigningVerifier(), @@ -263,7 +261,7 @@ public async Task> GetManifestPackageDownloadsAsyn var newPackageId = _workloadManifestInstaller.GetManifestPackageId(new ManifestId(manifest.Id), installedSdkFeatureBand); (success, latestVersion) = await GetPackageVersion(newPackageId, packageSourceLocation: _packageSourceLocation, includePreview: includePreviews); - + if (success) { downloads.Add(new WorkloadDownload(manifest.Id, newPackageId.ToString(), latestVersion.ToString())); @@ -558,9 +556,9 @@ private string GetOfflinePackagePath(SdkFeatureBand sdkFeatureBand, ManifestId m } } - -private string GetAdvertisingManifestPath(SdkFeatureBand featureBand, ManifestId manifestId) => - Path.Combine(_userProfileDir, "sdk-advertising", featureBand.ToString(), manifestId.ToString()); + + private string GetAdvertisingManifestPath(SdkFeatureBand featureBand, ManifestId manifestId) => + Path.Combine(_userProfileDir, "sdk-advertising", featureBand.ToString(), manifestId.ToString()); } } diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj index bb202db43721..53d06c8b46b2 100644 --- a/src/Cli/dotnet/dotnet.csproj +++ b/src/Cli/dotnet/dotnet.csproj @@ -94,8 +94,7 @@ - + diff --git a/src/Common/PathUtilities.cs b/src/Common/PathUtilities.cs new file mode 100644 index 000000000000..fdd9d7120ff6 --- /dev/null +++ b/src/Common/PathUtilities.cs @@ -0,0 +1,33 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +#nullable disable + +using System.IO; +using System.Runtime.InteropServices; + +namespace Microsoft.DotNet; + +static class PathUtilities +{ + const int S_IRUSR = 256; + const int S_IWUSR = 128; + const int S_IXUSR = 64; + const int S_IRWXU = S_IRUSR | S_IWUSR | S_IXUSR; // 700 (octal) Permissions + + [DllImport("libc", SetLastError = true)] + private static extern int mkdir(string pathname, int mode); + public static string CreateTempSubdirectory() + { + string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + mkdir(path, S_IRWXU); + } + else + { + Directory.CreateDirectory(path); + } + return path; + } +} diff --git a/src/Tasks/Common/FileUtilities.cs b/src/Tasks/Common/FileUtilities.cs index 2f3c01d53b1d..bc9edfa59669 100644 --- a/src/Tasks/Common/FileUtilities.cs +++ b/src/Tasks/Common/FileUtilities.cs @@ -7,17 +7,11 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Runtime.InteropServices; namespace Microsoft.NET.Build.Tasks { static partial class FileUtilities { - static int S_IRUSR = 256; - static int S_IWUSR = 128; - static int S_IXUSR = 64; - static int S_IRWXU = S_IRUSR | S_IWUSR | S_IXUSR; // 700 (octal) Permissions - public static Version GetFileVersion(string sourcePath) { if (sourcePath != null) @@ -40,21 +34,5 @@ public static Version TryGetAssemblyVersion(string sourcePath) return s_assemblyExtensions.Contains(extension) ? GetAssemblyVersion(sourcePath) : null; } - - [DllImport("libc", SetLastError = true)] - private static extern int mkdir(string pathname, int mode); - public static string CreateTempSubdirectory() - { - string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - mkdir(path, S_IRWXU); - } - else - { - Directory.CreateDirectory(path); - } - return path; - } } } From 9410d2d5ccf5d277ed7c4075a4935527be2702c6 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 6 Sep 2022 13:17:09 -0700 Subject: [PATCH 074/185] Apply Eric's requested changes, except checking the ret val on mkdir. --- src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs | 2 +- .../Microsoft.DotNet.InternalAbstractions/DirectoryWrapper.cs | 2 +- src/Cli/Microsoft.DotNet.InternalAbstractions/IDirectory.cs | 2 +- src/Cli/dotnet/ShellShim/ShellShimRepository.cs | 2 +- .../GivenAFirstTimeUseNoticeSentinel.cs | 2 +- .../GivenAFunctionReturnStringAndFakeFileSystem.cs | 2 +- .../Microsoft.NET.TestFramework/Mock/FileSystemMockBuilder.cs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs index 792d8623c49a..454534779a5d 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs @@ -63,7 +63,7 @@ internal MsBuildFileSetFactory( public async Task CreateAsync(CancellationToken cancellationToken) { - var watchList = Path.Combine(PathUtilities.CreateTempSubdirectory(), Path.GetRandomFileName()); + var watchList = Path.GetTempFileName(); try { var projectDir = Path.GetDirectoryName(_projectFile); diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/DirectoryWrapper.cs b/src/Cli/Microsoft.DotNet.InternalAbstractions/DirectoryWrapper.cs index 81b16d48858e..b063b9fc4a08 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/DirectoryWrapper.cs +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/DirectoryWrapper.cs @@ -19,7 +19,7 @@ public ITemporaryDirectory CreateTemporaryDirectory() return new TemporaryDirectory(); } - public string CreateTempPath() + public string CreateTemporarySubdirectory() { return CreateTemporaryDirectory().DirectoryPath; } diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/IDirectory.cs b/src/Cli/Microsoft.DotNet.InternalAbstractions/IDirectory.cs index 3dde961ebbe0..0a2e4e31e09f 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/IDirectory.cs +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/IDirectory.cs @@ -27,6 +27,6 @@ internal interface IDirectory /// Returns a new directory created under the temp folder. Can be on the mock under test or the real temp file folder. - string CreateTempPath(); + string CreateTemporarySubdirectory(); } } diff --git a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs index c46e44cf9de2..68390f1f2ce2 100644 --- a/src/Cli/dotnet/ShellShim/ShellShimRepository.cs +++ b/src/Cli/dotnet/ShellShim/ShellShimRepository.cs @@ -104,7 +104,7 @@ public void RemoveShim(ToolCommandName commandName) { foreach (var file in GetShimFiles(commandName).Where(f => _fileSystem.File.Exists(f.Value))) { - var tempPath = Path.Combine(_fileSystem.Directory.CreateTempPath(), Path.GetRandomFileName()); + var tempPath = Path.Combine(_fileSystem.Directory.CreateTemporarySubdirectory(), Path.GetRandomFileName()); FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(file.Value, tempPath)); files[file.Value] = tempPath; } diff --git a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs b/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs index 4bc243afc46e..31cbcfe77881 100644 --- a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs +++ b/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs @@ -174,7 +174,7 @@ public ITemporaryDirectory CreateTemporaryDirectory() throw new NotImplementedException(); } - public string CreateTempPath() + public string CreateTemporarySubdirectory() { throw new NotImplementedException(); } diff --git a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs b/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs index f2248dbf1253..6802977214b2 100644 --- a/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs +++ b/src/Tests/Microsoft.DotNet.Configurer.UnitTests/GivenAFunctionReturnStringAndFakeFileSystem.cs @@ -173,7 +173,7 @@ public IEnumerable EnumerateFileSystemEntries(string path) throw new UnauthorizedAccessException(); } - public string CreateTempPath() + public string CreateTemporarySubdirectory() { throw new NotImplementedException(); } diff --git a/src/Tests/Microsoft.NET.TestFramework/Mock/FileSystemMockBuilder.cs b/src/Tests/Microsoft.NET.TestFramework/Mock/FileSystemMockBuilder.cs index 5531cf6a76f2..0c47207c56f5 100644 --- a/src/Tests/Microsoft.NET.TestFramework/Mock/FileSystemMockBuilder.cs +++ b/src/Tests/Microsoft.NET.TestFramework/Mock/FileSystemMockBuilder.cs @@ -579,7 +579,7 @@ public void CreateDirectory(string path) _files.CreateDirectory(path); } - public string CreateTempPath() + public string CreateTemporarySubdirectory() { return CreateTemporaryDirectory().DirectoryPath; } From 798774257f409fec02a2f42bd0bf252bbdc844f5 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 6 Sep 2022 16:27:03 -0700 Subject: [PATCH 075/185] Add dotnet common localizable strings --- .../dotnet-watch/dotnet-watch.csproj | 1 + ...crosoft.DotNet.InternalAbstractions.csproj | 1 + src/Common/DotnetCommonLocalizableStrings.cs | 20 ++++++ .../DotnetCommonLocalizableStrings.resx | 63 +++++++++++++++++++ src/Common/PathUtilities.cs | 28 ++++++++- 5 files changed, 110 insertions(+), 3 deletions(-) create mode 100644 src/Common/DotnetCommonLocalizableStrings.cs create mode 100644 src/Common/DotnetCommonLocalizableStrings.resx diff --git a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj index 065f750f7200..bc8d4d4c237b 100644 --- a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj +++ b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj @@ -24,6 +24,7 @@ + diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj b/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj index 6260c984866d..f41a0cfee156 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj @@ -14,5 +14,6 @@ + diff --git a/src/Common/DotnetCommonLocalizableStrings.cs b/src/Common/DotnetCommonLocalizableStrings.cs new file mode 100644 index 000000000000..e393030c6522 --- /dev/null +++ b/src/Common/DotnetCommonLocalizableStrings.cs @@ -0,0 +1,20 @@ +// +using System.Reflection; + + +namespace Microsoft.DotNet +{ + internal static partial class DotnetCommonLocalizableStrings + { + private static global::System.Resources.ResourceManager s_resourceManager; + internal static global::System.Resources.ResourceManager ResourceManager => s_resourceManager ?? (s_resourceManager = new global::System.Resources.ResourceManager(typeof(DotnetCommonLocalizableStrings))); + internal static global::System.Globalization.CultureInfo Culture { get; set; } +#if !NET20 + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] +#endif + internal static string GetResourceString(string resourceKey, string defaultValue = null) => ResourceManager.GetString(resourceKey, Culture); + /// MSBuild server + internal static string @PathUtilitiesMkdirFailure => GetResourceString("PathUtilitiesMkdirFailure"); + + } +} diff --git a/src/Common/DotnetCommonLocalizableStrings.resx b/src/Common/DotnetCommonLocalizableStrings.resx new file mode 100644 index 000000000000..e24e18f0f14e --- /dev/null +++ b/src/Common/DotnetCommonLocalizableStrings.resx @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Failed to create a temporary sub-directory '{0}' with mkdir, error code: '{1}'. + \ No newline at end of file diff --git a/src/Common/PathUtilities.cs b/src/Common/PathUtilities.cs index fdd9d7120ff6..deda76886365 100644 --- a/src/Common/PathUtilities.cs +++ b/src/Common/PathUtilities.cs @@ -3,6 +3,7 @@ #nullable disable +using System; using System.IO; using System.Runtime.InteropServices; @@ -15,14 +16,35 @@ static class PathUtilities const int S_IXUSR = 64; const int S_IRWXU = S_IRUSR | S_IWUSR | S_IXUSR; // 700 (octal) Permissions + const int MAX_NUM_DIRECTORY_CREATE_RETRIES = 2; + + public static string CreateTempSubdirectory() + { + return CreateTempSubdirectoryRetry(0); + } + [DllImport("libc", SetLastError = true)] private static extern int mkdir(string pathname, int mode); - public static string CreateTempSubdirectory() + private static string CreateTempSubdirectoryRetry(int attemptNo) { - string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + int s = 2; + if (1 <= s) + throw new IOException(String.Format(DotnetCommonLocalizableStrings.PathUtilitiesMkdirFailure)); + + string path = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - mkdir(path, S_IRWXU); + int mkdirStatusCode = mkdir(path, S_IRWXU); + if (mkdirStatusCode != 0) + { + int errno = Marshal.GetLastWin32Error(); + if (Directory.Exists(path) && attemptNo < MAX_NUM_DIRECTORY_CREATE_RETRIES) + { + return CreateTempSubdirectoryRetry(attemptNo + 1); + } + else + throw new IOException(String.Format(DotnetCommonLocalizableStrings.PathUtilitiesMkdirFailure, path, errno)); + } } else { From e57638891bc2337b40766dd5098b9aea14f8eb32 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 6 Sep 2022 16:34:50 -0700 Subject: [PATCH 076/185] Remove new localizablestrings because its a pain. Retry once on mkdir failure --- .../dotnet-watch/dotnet-watch.csproj | 1 - ...crosoft.DotNet.InternalAbstractions.csproj | 1 - src/Common/DotnetCommonLocalizableStrings.cs | 20 ------------------- src/Common/PathUtilities.cs | 6 +----- 4 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 src/Common/DotnetCommonLocalizableStrings.cs diff --git a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj index bc8d4d4c237b..065f750f7200 100644 --- a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj +++ b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj @@ -24,7 +24,6 @@ - diff --git a/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj b/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj index f41a0cfee156..6260c984866d 100644 --- a/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj +++ b/src/Cli/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj @@ -14,6 +14,5 @@ - diff --git a/src/Common/DotnetCommonLocalizableStrings.cs b/src/Common/DotnetCommonLocalizableStrings.cs deleted file mode 100644 index e393030c6522..000000000000 --- a/src/Common/DotnetCommonLocalizableStrings.cs +++ /dev/null @@ -1,20 +0,0 @@ -// -using System.Reflection; - - -namespace Microsoft.DotNet -{ - internal static partial class DotnetCommonLocalizableStrings - { - private static global::System.Resources.ResourceManager s_resourceManager; - internal static global::System.Resources.ResourceManager ResourceManager => s_resourceManager ?? (s_resourceManager = new global::System.Resources.ResourceManager(typeof(DotnetCommonLocalizableStrings))); - internal static global::System.Globalization.CultureInfo Culture { get; set; } -#if !NET20 - [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] -#endif - internal static string GetResourceString(string resourceKey, string defaultValue = null) => ResourceManager.GetString(resourceKey, Culture); - /// MSBuild server - internal static string @PathUtilitiesMkdirFailure => GetResourceString("PathUtilitiesMkdirFailure"); - - } -} diff --git a/src/Common/PathUtilities.cs b/src/Common/PathUtilities.cs index deda76886365..3dd303a6c4ec 100644 --- a/src/Common/PathUtilities.cs +++ b/src/Common/PathUtilities.cs @@ -27,10 +27,6 @@ public static string CreateTempSubdirectory() private static extern int mkdir(string pathname, int mode); private static string CreateTempSubdirectoryRetry(int attemptNo) { - int s = 2; - if (1 <= s) - throw new IOException(String.Format(DotnetCommonLocalizableStrings.PathUtilitiesMkdirFailure)); - string path = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { @@ -43,7 +39,7 @@ private static string CreateTempSubdirectoryRetry(int attemptNo) return CreateTempSubdirectoryRetry(attemptNo + 1); } else - throw new IOException(String.Format(DotnetCommonLocalizableStrings.PathUtilitiesMkdirFailure, path, errno)); + throw new IOException($"Failed to create a temporary subdirectory {path} with mkdir, error code: {errno}"); } } else From e5a403484c7e6779129b144bab97fe52bf507688 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Mon, 12 Sep 2022 15:39:38 -0700 Subject: [PATCH 077/185] Remove dotnet localize strs --- .../DotnetCommonLocalizableStrings.resx | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 src/Common/DotnetCommonLocalizableStrings.resx diff --git a/src/Common/DotnetCommonLocalizableStrings.resx b/src/Common/DotnetCommonLocalizableStrings.resx deleted file mode 100644 index e24e18f0f14e..000000000000 --- a/src/Common/DotnetCommonLocalizableStrings.resx +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Failed to create a temporary sub-directory '{0}' with mkdir, error code: '{1}'. - \ No newline at end of file From c61f7af24c3ddc4b01e2ce85d69620635a6d26f7 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Mon, 12 Sep 2022 16:25:19 -0700 Subject: [PATCH 078/185] remove nullable directive as its suddenly mad about that --- src/Common/PathUtilities.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Common/PathUtilities.cs b/src/Common/PathUtilities.cs index 3dd303a6c4ec..dad9351b1ede 100644 --- a/src/Common/PathUtilities.cs +++ b/src/Common/PathUtilities.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#nullable disable - using System; using System.IO; using System.Runtime.InteropServices; From 8da5a645d40558128017049423c09b7f47d96200 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Mon, 12 Sep 2022 16:35:51 -0700 Subject: [PATCH 079/185] Merge manually, azdo did not merge with correct branch --- .../dotnet-workload/install/FileBasedInstaller.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs index 2f8a7e8ae8bc..245c526076f6 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs @@ -5,18 +5,20 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text.Json; -using System.Threading.Tasks; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.NuGetPackageDownloader; using Microsoft.DotNet.Cli.Utils; +using Microsoft.DotNet.Configurer; using Microsoft.DotNet.ToolPackage; -using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord; using Microsoft.Extensions.EnvironmentAbstractions; using Microsoft.NET.Sdk.WorkloadManifestReader; using NuGet.Common; using NuGet.Versioning; using static Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver; +using Microsoft.DotNet.Workloads.Workload.Install.InstallRecord; +using System.Text.Json; +using System.Threading.Tasks; + namespace Microsoft.DotNet.Workloads.Workload.Install { @@ -51,7 +53,7 @@ public FileBasedInstaller(IReporter reporter, _userProfileDir = userProfileDir; _dotnetDir = dotnetDir ?? Path.GetDirectoryName(Environment.ProcessPath); _tempPackagesDir = new DirectoryPath(tempDirPath ?? PathUtilities.CreateTempSubdirectory()); - ILogger logger = verbosity.VerbosityIsDetailedOrDiagnostic() ? new NuGetConsoleLogger() : new NullLogger(); + ILogger logger = verbosity.IsDetailedOrDiagnostic() ? new NuGetConsoleLogger() : new NullLogger(); _restoreActionConfig = restoreActionConfig; _nugetPackageDownloader = nugetPackageDownloader ?? new NuGetPackageDownloader(_tempPackagesDir, filePermissionSetter: null, From 7bf83fdc6c6575d0cb4ecb6c13809d15eefb186c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 15 Sep 2022 04:51:05 +0000 Subject: [PATCH 080/185] Update dependencies from https://github.com/dotnet/roslyn build 20220914.20 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-2.22463.8 -> To Version 4.4.0-2.22464.20 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1d97fa08aaf4..ac6a2b86e8d6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,34 +64,34 @@ b2c62dccc3261307096b2a67ae3f91dd9b0f98e6 - + https://github.com/dotnet/roslyn - 00741e0d5de36a27c7302de8bbfe6d2a800ef5b2 + 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 - + https://github.com/dotnet/roslyn - 00741e0d5de36a27c7302de8bbfe6d2a800ef5b2 + 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 - + https://github.com/dotnet/roslyn - 00741e0d5de36a27c7302de8bbfe6d2a800ef5b2 + 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 - + https://github.com/dotnet/roslyn - 00741e0d5de36a27c7302de8bbfe6d2a800ef5b2 + 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 - + https://github.com/dotnet/roslyn - 00741e0d5de36a27c7302de8bbfe6d2a800ef5b2 + 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 - + https://github.com/dotnet/roslyn - 00741e0d5de36a27c7302de8bbfe6d2a800ef5b2 + 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 - + https://github.com/dotnet/roslyn - 00741e0d5de36a27c7302de8bbfe6d2a800ef5b2 + 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index beaa1c321682..9ab91e1aef14 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -139,13 +139,13 @@ - 4.4.0-2.22464.15 - 4.4.0-2.22464.15 - 4.4.0-2.22464.15 - 4.4.0-2.22464.15 - 4.4.0-2.22464.15 - 4.4.0-2.22464.15 - 4.4.0-2.22464.15 + 4.4.0-2.22464.20 + 4.4.0-2.22464.20 + 4.4.0-2.22464.20 + 4.4.0-2.22464.20 + 4.4.0-2.22464.20 + 4.4.0-2.22464.20 + 4.4.0-2.22464.20 $(MicrosoftNetCompilersToolsetPackageVersion) From 19870826eaea8c617dbd315a711d3ad7868c07aa Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 15 Sep 2022 04:51:31 +0000 Subject: [PATCH 081/185] Update dependencies from https://github.com/dotnet/fsharp build 20220914.7 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 7.0.0-beta.22464.1 -> To Version 7.0.0-beta.22464.7 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index af32512c00e7..61124bcfe3ac 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -50,13 +50,13 @@ https://github.com/dotnet/msbuild 3d01db7c23495c327f010b6392961082839041a6 - + https://github.com/dotnet/fsharp - 745a9ffc57e82f33c417f902c262fe47a54caf98 + 430d645d778ec0db10ad7ad0b02de9fab3ce5647 - + https://github.com/dotnet/fsharp - 745a9ffc57e82f33c417f902c262fe47a54caf98 + 430d645d778ec0db10ad7ad0b02de9fab3ce5647 diff --git a/eng/Versions.props b/eng/Versions.props index 47ab28ba2ced..408fe86ea48c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -135,7 +135,7 @@ - 12.0.5-beta.22464.6 + 12.0.5-beta.22464.7 From f6ae4111eb23b22947ad3dad758a98eb6217e6fe Mon Sep 17 00:00:00 2001 From: Vlada Shubina Date: Thu, 15 Sep 2022 10:20:14 +0200 Subject: [PATCH 082/185] post action for applying permissions for nuget.config in the template --- .../dotnet-new.Tests/CommonTemplatesTests.cs | 46 ++++++++++++++++++- .../localize/templatestrings.cs.json | 4 +- .../localize/templatestrings.de.json | 4 +- .../localize/templatestrings.en.json | 2 + .../localize/templatestrings.es.json | 4 +- .../localize/templatestrings.fr.json | 4 +- .../localize/templatestrings.it.json | 4 +- .../localize/templatestrings.ja.json | 4 +- .../localize/templatestrings.ko.json | 4 +- .../localize/templatestrings.pl.json | 4 +- .../localize/templatestrings.pt-BR.json | 4 +- .../localize/templatestrings.ru.json | 4 +- .../localize/templatestrings.tr.json | 4 +- .../localize/templatestrings.zh-Hans.json | 4 +- .../localize/templatestrings.zh-Hant.json | 4 +- .../Nuget/.template.config/template.json | 17 ++++++- 16 files changed, 102 insertions(+), 15 deletions(-) diff --git a/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs b/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs index 55b5a6c717f2..6d7e54013ed7 100644 --- a/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs +++ b/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs @@ -2,11 +2,14 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // +using System.Diagnostics; +using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Xml.Linq; using Microsoft.DotNet.Cli.Utils; using Microsoft.NET.TestFramework.Assertions; using Microsoft.NET.TestFramework.Commands; +using Microsoft.TemplateEngine.TestHelper; using Xunit.Abstractions; namespace Microsoft.DotNet.Cli.New.IntegrationTests @@ -191,7 +194,7 @@ public void AllCommonItemsCreate(string expectedTemplateName, string templateSho .Should() .ExitWith(0) .And.NotHaveStdErr() - .And.HaveStdOut($@"The template ""{expectedTemplateName}"" was created successfully."); + .And.HaveStdOutContaining($@"The template ""{expectedTemplateName}"" was created successfully."); Directory.Delete(workingDir, true); } @@ -274,6 +277,47 @@ public void GlobalJsonTests(string expectedContent, params string[] parameters) Directory.Delete(workingDir, true); } + [Fact] + public void NuGetConfigPermissions() + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + //runs only on Unix + return; + } + + string templateShortName = "nugetconfig"; + string expectedTemplateName = "NuGet Config"; + string workingDir = TestUtils.CreateTemporaryFolder(); + + new DotnetNewCommand(_log, templateShortName) + .WithCustomHive(_fixture.HomeDirectory) + .WithWorkingDirectory(workingDir) + .Execute() + .Should() + .ExitWith(0) + .And.NotHaveStdErr() + .And.HaveStdOutContaining($@"The template ""{expectedTemplateName}"" was created successfully."); + + var process = Process.Start(new ProcessStartInfo() + { + FileName = "/bin/sh", + Arguments = "-c \"ls -la\"", + WorkingDirectory = workingDir + }); + + new Command(process) + .WorkingDirectory(workingDir) + .CaptureStdOut() + .CaptureStdErr() + .Execute() + .Should() + .ExitWith(0) + .And.HaveStdOutMatching("^-rw-------.*nuget.config$", RegexOptions.Multiline); + + Directory.Delete(workingDir, true); + } + #region Project templates language features tests /// diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.cs.json index 82bea1ef0409..d1d88c76fe0d 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.cs.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.cs.json @@ -1,6 +1,8 @@ -{ +{ "author": "Microsoft", "name": "Konfigurace NuGet", "description": "Soubor pro konfiguraci umístění, ve kterých bude NuGet hledat balíčky", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "Otevře nuget.config v editoru." } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.de.json index b983e6d2d1ad..18f356e9c6f5 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.de.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.de.json @@ -1,6 +1,8 @@ -{ +{ "author": "Microsoft", "name": "NuGet-Konfig.", "description": "Eine Datei zum Konfigurieren der Speicherorte, in denen NuGet nach Paketen suchen wird", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "Öffnet „nuget.config“ im Editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.en.json index 865325dd1c23..143e248642a9 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.en.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.en.json @@ -2,5 +2,7 @@ "author": "Microsoft", "name": "NuGet Config", "description": "A file for configuring the locations NuGet will search for packages", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "Opens nuget.config in the editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.es.json index 04089d5f4bfa..5f91f7a5af39 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.es.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.es.json @@ -1,6 +1,8 @@ -{ +{ "author": "Microsoft", "name": "Configuración de NuGet", "description": "Un archivo para configurar las ubicaciones en las que NuGet buscará paquetes", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "Abre nuget.config en el editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.fr.json index 700e16049331..28a67a159c76 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.fr.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.fr.json @@ -1,6 +1,8 @@ -{ +{ "author": "Microsoft", "name": "Configuration NuGet", "description": "Un fichier permettant de configurer les emplacements où NuGet recherche des packages", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "Ouvre nuget.config dans l’éditeur" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.it.json index 2f84f93ab81a..873a84caf979 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.it.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.it.json @@ -1,6 +1,8 @@ -{ +{ "author": "Microsoft", "name": "Configurazione NuGet", "description": "Un file per la configurazione del NuGet dei percorsi eseguirà la ricerca dei pacchetti", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "Apre nuget.config nell'editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ja.json index c997c478eac1..7280b14d9d86 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ja.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ja.json @@ -1,6 +1,8 @@ -{ +{ "author": "Microsoft", "name": "NuGet Config", "description": "NuGet がパッケージが検索する場所を構成するためのファイル", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "エディターで nuget.config を開く" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ko.json index 747ec7b7905b..8d869ea664b9 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ko.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ko.json @@ -1,6 +1,8 @@ -{ +{ "author": "Microsoft", "name": "NuGet 구성", "description": "NuGet 패키지를 검색할 위치를 구성하는 파일", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "편집기에서 nuget.config를 엽니다" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.pl.json index 3c2e9b287671..8bfa055d2d17 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.pl.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.pl.json @@ -1,6 +1,8 @@ -{ +{ "author": "Microsoft", "name": "Konfigurowanie NuGet", "description": "Plik na potrzeby konfigurowania lokalizacji NuGet będzie wyszukiwać pakietów", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "Otwiera plik nuget.config w edytorze" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.pt-BR.json index 5a2378f253bd..fe564346cd64 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.pt-BR.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.pt-BR.json @@ -1,6 +1,8 @@ -{ +{ "author": "Microsoft", "name": "Configuração do NuGet", "description": "Um arquivo para configurar os locais em que o NuGet procurará pacotes", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "Abre nuget.config no editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ru.json index 97c939fbc9c8..7dc44c68b7c2 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ru.json @@ -1,6 +1,8 @@ -{ +{ "author": "Майкрософт", "name": "Конфигурация NuGet", "description": "Файл для настройки расположений, в которых NuGet будет искать пакеты", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "Открывает файл nuget.config в редакторе" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.tr.json index 45c054930e2c..581456abee49 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.tr.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.tr.json @@ -1,6 +1,8 @@ -{ +{ "author": "Microsoft", "name": "NuGet Yapılandırması", "description": "NuGet'in paketleri arama yapacağı konumları yapılandırmaya yönelik dosya", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "Düzenleyicide nuget.config’i açar" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.zh-Hans.json index 6508a27358c5..c717eb33eef5 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.zh-Hans.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.zh-Hans.json @@ -1,6 +1,8 @@ -{ +{ "author": "Microsoft", "name": "NuGet 配置", "description": "用于配置位置 NuGet 的文件将搜索包", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "在编辑器中打开 nuget.config" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.zh-Hant.json index 5a58f8891e1c..56c90a06ddb4 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.zh-Hant.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.zh-Hant.json @@ -1,6 +1,8 @@ -{ +{ "author": "Microsoft", "name": "NuGet 組態", "description": "用於設定檔案位置 NuGet 將會搜尋套件", + "postActions/chmod/description": "Apply permissions", + "postActions/chmod/manualInstructions/default/text": "Run 'chmod 600 nuget.config'", "postActions/open-file/description": "在編輯器中開啟 nuget.config" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/template.json index d525790e49b3..72992942035a 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/template.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/template.json @@ -27,6 +27,21 @@ } }, "postActions": [ + { + "id": "chmod", + "condition": "(OS != \"Windows_NT\") && (HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\")", + "description": "Apply permissions", + "manualInstructions": [ + { + "text": "Run 'chmod 600 nuget.config'" + } + ], + "actionId": "cb9a6cf3-4f5c-4860-b9d2-03a574959774", + "args": { + "600": "nuget.config" + }, + "continueOnError": false + }, { "id": "open-file", "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", @@ -39,4 +54,4 @@ "continueOnError": true } ] -} \ No newline at end of file +} From f5f4583921d1339980cc6a6732bea1dd6ad2c52a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 15 Sep 2022 09:29:58 +0000 Subject: [PATCH 083/185] Update dependencies from https://github.com/dotnet/msbuild build 20220915.2 Microsoft.Build , Microsoft.Build.Localization From Version 17.4.0-preview-22464-02 -> To Version 17.4.0-preview-22465-02 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4908fb08ea5e..728487d682aa 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,13 +42,13 @@ https://github.com/dotnet/runtime c623d96fe33cc360bd9981c9e6f6a646d7881d9e - + https://github.com/dotnet/msbuild - 3d01db7c23495c327f010b6392961082839041a6 + 02b334e3afaa105221d0adb49a7b224407c5334c - + https://github.com/dotnet/msbuild - 3d01db7c23495c327f010b6392961082839041a6 + 02b334e3afaa105221d0adb49a7b224407c5334c https://github.com/dotnet/fsharp diff --git a/eng/Versions.props b/eng/Versions.props index a7200c997e06..bb3614679120 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -105,7 +105,7 @@ - 17.4.0-preview-22464-02 + 17.4.0-preview-22465-02 - 6.4.0-preview.3.80 + 6.4.0-preview.3.86 $(NuGetBuildTasksPackageVersion) 6.0.0-rc.278 $(NuGetBuildTasksPackageVersion) From ad1cd45610b3819f8debf402567660203f885b7d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 15 Sep 2022 17:34:58 +0000 Subject: [PATCH 085/185] Update dependencies from https://github.com/dotnet/fsharp build 20220915.4 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 7.0.0-beta.22464.7 -> To Version 7.0.0-beta.22465.4 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4908fb08ea5e..3926a390e00e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -50,13 +50,13 @@ https://github.com/dotnet/msbuild 3d01db7c23495c327f010b6392961082839041a6 - + https://github.com/dotnet/fsharp - 430d645d778ec0db10ad7ad0b02de9fab3ce5647 + c706dcc522c65aae19d36c0901352e3ae3954f88 - + https://github.com/dotnet/fsharp - 430d645d778ec0db10ad7ad0b02de9fab3ce5647 + c706dcc522c65aae19d36c0901352e3ae3954f88 diff --git a/eng/Versions.props b/eng/Versions.props index a7200c997e06..2f0bf2faa436 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -135,7 +135,7 @@ - 12.0.5-beta.22464.7 + 12.0.5-beta.22465.4 From a950c36a7e121d637ab067e5b3ad298b050e5f0b Mon Sep 17 00:00:00 2001 From: Jan Krivanek Date: Thu, 15 Sep 2022 20:01:20 +0200 Subject: [PATCH 086/185] Add HelixAccessToken for internal build --- eng/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/build.yml b/eng/build.yml index f144a5626d15..ffa2497e46e2 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -267,7 +267,7 @@ jobs: displayName: Run AoT Tests in Helix env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) - HelixAccessToken: '' + HelixAccessToken: $(_HelixApiToken) RunAoTTests: 'true' - ${{ if eq(parameters.agentOs, 'Darwin') }}: From b30397b50398c7c9a056bf5d19d03adffa36b86e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 15 Sep 2022 18:59:37 +0000 Subject: [PATCH 087/185] Update dependencies from https://github.com/dotnet/msbuild build 20220915.5 Microsoft.Build , Microsoft.Build.Localization From Version 17.4.0-preview-22465-02 -> To Version 17.4.0-preview-22465-05 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 60434b5e3f02..2f30856cbe8e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,13 +42,13 @@ https://github.com/dotnet/runtime c623d96fe33cc360bd9981c9e6f6a646d7881d9e - + https://github.com/dotnet/msbuild - 02b334e3afaa105221d0adb49a7b224407c5334c + 6033e4c95bcd9fa31ebe9b52462c15521cda8f62 - + https://github.com/dotnet/msbuild - 02b334e3afaa105221d0adb49a7b224407c5334c + 6033e4c95bcd9fa31ebe9b52462c15521cda8f62 https://github.com/dotnet/fsharp diff --git a/eng/Versions.props b/eng/Versions.props index 7b78d24cbd79..8f605a1101ee 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -105,7 +105,7 @@ - 17.4.0-preview-22465-02 + 17.4.0-preview-22465-05 - <_EolNetCoreTargetFrameworkVersions Include="1.0;1.1;2.0;2.1;2.2;3.0" /> + <_EolNetCoreTargetFrameworkVersions Include="1.0;1.1;2.0;2.1;2.2;3.0;5.0" /> Date: Thu, 15 Sep 2022 23:45:16 +0000 Subject: [PATCH 090/185] Update dependencies from https://github.com/dotnet/fsharp build 20220915.8 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 7.0.0-beta.22465.4 -> To Version 7.0.0-beta.22465.8 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7c58bc272f7a..d4a4f5bac98c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -50,13 +50,13 @@ https://github.com/dotnet/msbuild 6033e4c95bcd9fa31ebe9b52462c15521cda8f62 - + https://github.com/dotnet/fsharp - c706dcc522c65aae19d36c0901352e3ae3954f88 + 1f56aa9c36d2919ba52c5b4f5abd449161e7ca01 - + https://github.com/dotnet/fsharp - c706dcc522c65aae19d36c0901352e3ae3954f88 + 1f56aa9c36d2919ba52c5b4f5abd449161e7ca01 diff --git a/eng/Versions.props b/eng/Versions.props index f25be735df16..afa8104af47c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -135,7 +135,7 @@ - 12.0.5-beta.22465.4 + 12.0.5-beta.22465.8 From 564870b89fe617512f492fd1e80c8fd60be80286 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 16 Sep 2022 17:11:37 +0000 Subject: [PATCH 091/185] Update dependencies from https://github.com/dotnet/msbuild build 20220916.3 (#27959) [release/7.0.1xx-rc2] Update dependencies from dotnet/msbuild --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d4a4f5bac98c..e8d8320066f4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,13 +42,13 @@ https://github.com/dotnet/runtime c623d96fe33cc360bd9981c9e6f6a646d7881d9e - + https://github.com/dotnet/msbuild - 6033e4c95bcd9fa31ebe9b52462c15521cda8f62 + 48ab5664b8734afdf4aedba5f72a0663435eef16 - + https://github.com/dotnet/msbuild - 6033e4c95bcd9fa31ebe9b52462c15521cda8f62 + 48ab5664b8734afdf4aedba5f72a0663435eef16 https://github.com/dotnet/fsharp diff --git a/eng/Versions.props b/eng/Versions.props index afa8104af47c..ba5a3b422b19 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -105,7 +105,7 @@ - 17.4.0-preview-22465-05 + 17.4.0-preview-22466-03 - 6.4.0-preview.3.86 + 6.4.0-preview.3.88 $(NuGetBuildTasksPackageVersion) 6.0.0-rc.278 $(NuGetBuildTasksPackageVersion) From 43f51a115a8f20b0c1374afa180c2a67db2e357e Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Mon, 19 Sep 2022 09:24:07 -0700 Subject: [PATCH 093/185] Also check runtime identifiers in asserts --- .../Microsoft.NET.RuntimeIdentifierInference.targets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets index e7f3be936b49..84b21ee0dd82 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets @@ -162,19 +162,19 @@ Copyright (c) .NET Foundation. All rights reserved. Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(HasRuntimeOutput)' == 'true'"> - - - - From 08675b9e5301b3f3909a2728ebd8ef655bcad55c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 19 Sep 2022 20:07:57 +0000 Subject: [PATCH 094/185] Update dependencies from https://github.com/dotnet/runtime build 20220916.12 Microsoft.DotNet.ILCompiler , Microsoft.Extensions.DependencyModel , Microsoft.NET.HostModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.Platforms , System.CodeDom , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , VS.Redist.Common.NetCore.SharedFramework.x64.7.0 , VS.Redist.Common.NetCore.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22464.1 -> To Version 7.0.0-rc.2.22466.12 --- eng/Version.Details.xml | 60 ++++++++++++++++++++--------------------- eng/Versions.props | 24 ++++++++--------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 115e6a248cdc..563125bc37aa 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -6,41 +6,41 @@ ee515068a25631542f1fb0f0fdd53f9ec638373c - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 https://github.com/dotnet/msbuild @@ -114,30 +114,30 @@ 5f9bfd94d9c687207872ae03f751ea19704381c0 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 https://github.com/dotnet/linker 5f9bfd94d9c687207872ae03f751ea19704381c0 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 https://github.com/dotnet/windowsdesktop @@ -284,9 +284,9 @@ https://github.com/dotnet/arcade 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/runtime - c623d96fe33cc360bd9981c9e6f6a646d7881d9e + 5634242a3a8bd4d2f35e063537d7350939162e80 https://github.com/dotnet/xliff-tasks diff --git a/eng/Versions.props b/eng/Versions.props index d2b094ca9bd5..dd6c8e410915 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,12 +35,12 @@ 6.0.0 7.0.0-beta.22418.4 7.0.0-preview.22423.2 - 7.0.0-rc.2.22464.1 + 7.0.0-rc.2.22466.12 4.3.0 4.3.0 4.0.5 6.0.0 - 7.0.0-rc.2.22464.1 + 7.0.0-rc.2.22466.12 4.6.0 2.0.0-beta4.22402.1 1.0.0-preview5.1.22263.1 @@ -48,13 +48,13 @@ - 7.0.0-rc.2.22464.1 - 7.0.0-rc.2.22464.1 - 7.0.0-rc.2.22464.1 + 7.0.0-rc.2.22466.12 + 7.0.0-rc.2.22466.12 + 7.0.0-rc.2.22466.12 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) - 7.0.0-rc.2.22464.1 - 7.0.0-rc.2.22464.1 - 7.0.0-rc.2.22464.1 + 7.0.0-rc.2.22466.12 + 7.0.0-rc.2.22466.12 + 7.0.0-rc.2.22466.12 6.0.0-preview.7.21363.9 $(MicrosoftExtensionsDependencyModelPackageVersion) 6.0.0 @@ -90,10 +90,10 @@ - 7.0.0-rc.2.22464.1 - 7.0.0-rc.2.22464.1 - 7.0.0-rc.2.22464.1 - 7.0.0-rc.2.22464.1 + 7.0.0-rc.2.22466.12 + 7.0.0-rc.2.22466.12 + 7.0.0-rc.2.22466.12 + 7.0.0-rc.2.22466.12 From f3a83ffc8923f52948f10cfeb168c623dcf83333 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 20 Sep 2022 02:39:30 +0000 Subject: [PATCH 095/185] Update dependencies from https://github.com/dotnet/runtime build 20220919.6 Microsoft.DotNet.ILCompiler , Microsoft.Extensions.DependencyModel , Microsoft.NET.HostModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.Platforms , System.CodeDom , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , VS.Redist.Common.NetCore.SharedFramework.x64.7.0 , VS.Redist.Common.NetCore.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22466.12 -> To Version 7.0.0-rc.2.22469.6 --- eng/Version.Details.xml | 60 ++++++++++++++++++++--------------------- eng/Versions.props | 24 ++++++++--------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 563125bc37aa..d0023e40abda 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -6,41 +6,41 @@ ee515068a25631542f1fb0f0fdd53f9ec638373c - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 https://github.com/dotnet/msbuild @@ -114,30 +114,30 @@ 5f9bfd94d9c687207872ae03f751ea19704381c0 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 https://github.com/dotnet/linker 5f9bfd94d9c687207872ae03f751ea19704381c0 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 https://github.com/dotnet/windowsdesktop @@ -284,9 +284,9 @@ https://github.com/dotnet/arcade 0c027eede69ba22bafca9a1955f1e00848655ece - + https://github.com/dotnet/runtime - 5634242a3a8bd4d2f35e063537d7350939162e80 + b23dc07bd7363fcd986a17230c2734bc656e71a7 https://github.com/dotnet/xliff-tasks diff --git a/eng/Versions.props b/eng/Versions.props index dd6c8e410915..459fa19bb445 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,12 +35,12 @@ 6.0.0 7.0.0-beta.22418.4 7.0.0-preview.22423.2 - 7.0.0-rc.2.22466.12 + 7.0.0-rc.2.22469.6 4.3.0 4.3.0 4.0.5 6.0.0 - 7.0.0-rc.2.22466.12 + 7.0.0-rc.2.22469.6 4.6.0 2.0.0-beta4.22402.1 1.0.0-preview5.1.22263.1 @@ -48,13 +48,13 @@ - 7.0.0-rc.2.22466.12 - 7.0.0-rc.2.22466.12 - 7.0.0-rc.2.22466.12 + 7.0.0-rc.2.22469.6 + 7.0.0-rc.2.22469.6 + 7.0.0-rc.2.22469.6 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) - 7.0.0-rc.2.22466.12 - 7.0.0-rc.2.22466.12 - 7.0.0-rc.2.22466.12 + 7.0.0-rc.2.22469.6 + 7.0.0-rc.2.22469.6 + 7.0.0-rc.2.22469.6 6.0.0-preview.7.21363.9 $(MicrosoftExtensionsDependencyModelPackageVersion) 6.0.0 @@ -90,10 +90,10 @@ - 7.0.0-rc.2.22466.12 - 7.0.0-rc.2.22466.12 - 7.0.0-rc.2.22466.12 - 7.0.0-rc.2.22466.12 + 7.0.0-rc.2.22469.6 + 7.0.0-rc.2.22469.6 + 7.0.0-rc.2.22469.6 + 7.0.0-rc.2.22469.6 From 68e47e38b51e8c690e13a81eb852d19c290c7e41 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 07:53:07 -0700 Subject: [PATCH 096/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20220920.2 (#28031) Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22459.5 -> To Version 7.0.0-rc.2.22470.2 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 7.0.0-rc.2.22431.6 -> To Version 7.0.0-rc.2.22470.3 (parent: Microsoft.WindowsDesktop.App.Ref Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d0023e40abda..c8420e67fce4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -139,25 +139,25 @@ https://github.com/dotnet/runtime b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/windowsdesktop - 2be63be7944666ad0c9f7079db7d265b08d8af03 + 2ca54cc198a91208ebb5d2405a417a29c91fde66 - + https://github.com/dotnet/windowsdesktop - 2be63be7944666ad0c9f7079db7d265b08d8af03 + 2ca54cc198a91208ebb5d2405a417a29c91fde66 - + https://github.com/dotnet/windowsdesktop - 2be63be7944666ad0c9f7079db7d265b08d8af03 + 2ca54cc198a91208ebb5d2405a417a29c91fde66 - + https://github.com/dotnet/windowsdesktop - 2be63be7944666ad0c9f7079db7d265b08d8af03 + 2ca54cc198a91208ebb5d2405a417a29c91fde66 - + https://github.com/dotnet/wpf - c9a6d9f821616f6f119088d50da6d0d0ce4891d5 + 75b8ed5e4708531ec9a53b6d6e3adb5971c37ac6 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 459fa19bb445..f5080b056efd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -166,7 +166,7 @@ - 7.0.0-rc.2.22431.6 + 7.0.0-rc.2.22470.3 From 8db4879af71baf405b7fdda0a41be9c98603cce6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 20 Sep 2022 17:56:51 +0000 Subject: [PATCH 097/185] Update dependencies from https://github.com/dotnet/roslyn build 20220920.1 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-2.22464.20 -> To Version 4.4.0-3.22470.1 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c8420e67fce4..ed4df27170c9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,34 +64,34 @@ b2c62dccc3261307096b2a67ae3f91dd9b0f98e6 - + https://github.com/dotnet/roslyn - 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 + fbdc03126486aadaec6fd255ccffd241a70aa3dc - + https://github.com/dotnet/roslyn - 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 + fbdc03126486aadaec6fd255ccffd241a70aa3dc - + https://github.com/dotnet/roslyn - 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 + fbdc03126486aadaec6fd255ccffd241a70aa3dc - + https://github.com/dotnet/roslyn - 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 + fbdc03126486aadaec6fd255ccffd241a70aa3dc - + https://github.com/dotnet/roslyn - 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 + fbdc03126486aadaec6fd255ccffd241a70aa3dc - + https://github.com/dotnet/roslyn - 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 + fbdc03126486aadaec6fd255ccffd241a70aa3dc - + https://github.com/dotnet/roslyn - 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 + fbdc03126486aadaec6fd255ccffd241a70aa3dc https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index f5080b056efd..5e4fcbd9aa03 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -139,13 +139,13 @@ - 4.4.0-2.22464.20 - 4.4.0-2.22464.20 - 4.4.0-2.22464.20 - 4.4.0-2.22464.20 - 4.4.0-2.22464.20 - 4.4.0-2.22464.20 - 4.4.0-2.22464.20 + 4.4.0-3.22470.1 + 4.4.0-3.22470.1 + 4.4.0-3.22470.1 + 4.4.0-3.22470.1 + 4.4.0-3.22470.1 + 4.4.0-3.22470.1 + 4.4.0-3.22470.1 $(MicrosoftNetCompilersToolsetPackageVersion) From b0d6f72360d470e2c91e41fdace8d6c3bdb1d8a7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 20 Sep 2022 18:01:01 +0000 Subject: [PATCH 098/185] Update dependencies from https://github.com/dotnet/arcade build 20220914.4 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 7.0.0-beta.22418.4 -> To Version 7.0.0-beta.22464.4 Dependency coherency updates Microsoft.DotNet.XliffTasks From Version 1.0.0-beta.22415.3 -> To Version 1.0.0-beta.22427.1 (parent: Microsoft.DotNet.Arcade.Sdk --- eng/Version.Details.xml | 20 ++++----- eng/Versions.props | 6 +-- eng/common/cross/arm/sources.list.focal | 11 +++++ eng/common/cross/arm/sources.list.jammy | 11 +++++ eng/common/cross/arm64/sources.list.focal | 11 +++++ eng/common/cross/arm64/sources.list.jammy | 11 +++++ eng/common/cross/build-rootfs.sh | 41 +++++++++++-------- eng/common/cross/x86/sources.list.focal | 11 +++++ eng/common/cross/x86/sources.list.jammy | 11 +++++ eng/common/generate-locproject.ps1 | 4 +- eng/common/templates/job/execute-sdl.yml | 2 +- eng/common/templates/job/onelocbuild.yml | 2 +- eng/common/templates/job/source-build.yml | 4 +- .../templates/job/source-index-stage1.yml | 4 +- eng/common/templates/jobs/jobs.yml | 2 +- eng/common/templates/jobs/source-build.yml | 2 +- .../templates/post-build/post-build.yml | 8 ++-- global.json | 6 +-- 18 files changed, 119 insertions(+), 48 deletions(-) create mode 100644 eng/common/cross/arm/sources.list.focal create mode 100644 eng/common/cross/arm/sources.list.jammy create mode 100644 eng/common/cross/arm64/sources.list.focal create mode 100644 eng/common/cross/arm64/sources.list.jammy create mode 100644 eng/common/cross/x86/sources.list.focal create mode 100644 eng/common/cross/x86/sources.list.jammy diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c8420e67fce4..0a20b1f1764f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -267,30 +267,30 @@ - + https://github.com/dotnet/arcade - 0c027eede69ba22bafca9a1955f1e00848655ece + 720af493900b2f2bdc48e9ee12577983a5c9be36 - + https://github.com/dotnet/arcade - 0c027eede69ba22bafca9a1955f1e00848655ece + 720af493900b2f2bdc48e9ee12577983a5c9be36 - + https://github.com/dotnet/arcade - 0c027eede69ba22bafca9a1955f1e00848655ece + 720af493900b2f2bdc48e9ee12577983a5c9be36 - + https://github.com/dotnet/arcade - 0c027eede69ba22bafca9a1955f1e00848655ece + 720af493900b2f2bdc48e9ee12577983a5c9be36 https://github.com/dotnet/runtime b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/xliff-tasks - 47a504cdc72993370f057a11c2a39a7faa3111ad + 740189d758fb3bbdc118c5b6171ef1a7351a8c44 diff --git a/eng/Versions.props b/eng/Versions.props index f5080b056efd..3443f593bdf1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -33,7 +33,7 @@ 6.0.0 4.0.0 6.0.0 - 7.0.0-beta.22418.4 + 7.0.0-beta.22464.4 7.0.0-preview.22423.2 7.0.0-rc.2.22469.6 4.3.0 @@ -175,7 +175,7 @@ - 1.0.0-beta.22415.3 + 1.0.0-beta.22427.1 @@ -185,7 +185,7 @@ 6.7.0 6.1.0 - 7.0.0-beta.22418.4 + 7.0.0-beta.22464.4 4.8.2 6.0.0-beta.22262.1 diff --git a/eng/common/cross/arm/sources.list.focal b/eng/common/cross/arm/sources.list.focal new file mode 100644 index 000000000000..4de2600c1747 --- /dev/null +++ b/eng/common/cross/arm/sources.list.focal @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse diff --git a/eng/common/cross/arm/sources.list.jammy b/eng/common/cross/arm/sources.list.jammy new file mode 100644 index 000000000000..6bb0453029cc --- /dev/null +++ b/eng/common/cross/arm/sources.list.jammy @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/sources.list.focal b/eng/common/cross/arm64/sources.list.focal new file mode 100644 index 000000000000..4de2600c1747 --- /dev/null +++ b/eng/common/cross/arm64/sources.list.focal @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/sources.list.jammy b/eng/common/cross/arm64/sources.list.jammy new file mode 100644 index 000000000000..6bb0453029cc --- /dev/null +++ b/eng/common/cross/arm64/sources.list.jammy @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index 032f5f193732..5680980fa296 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -186,32 +186,27 @@ while :; do __UbuntuArch=i386 __UbuntuRepo="http://archive.ubuntu.com/ubuntu/" ;; - lldb3.6) - __LLDB_Package="lldb-3.6-dev" - ;; - lldb3.8) - __LLDB_Package="lldb-3.8-dev" - ;; - lldb3.9) - __LLDB_Package="liblldb-3.9-dev" - ;; - lldb4.0) - __LLDB_Package="liblldb-4.0-dev" - ;; - lldb5.0) - __LLDB_Package="liblldb-5.0-dev" - ;; - lldb6.0) - __LLDB_Package="liblldb-6.0-dev" + lldb*) + version="${lowerI/lldb/}" + parts=(${version//./ }) + + # for versions > 6.0, lldb has dropped the minor version + if [[ "${parts[0]}" -gt 6 ]]; then + version="${parts[0]}" + fi + + __LLDB_Package="liblldb-${version}-dev" ;; no-lldb) unset __LLDB_Package ;; llvm*) - version="$(echo "$lowerI" | tr -d '[:alpha:]-=')" + version="${lowerI/llvm/}" parts=(${version//./ }) __LLVM_MajorVersion="${parts[0]}" __LLVM_MinorVersion="${parts[1]}" + + # for versions > 6.0, llvm has dropped the minor version if [[ -z "$__LLVM_MinorVersion" && "$__LLVM_MajorVersion" -le 6 ]]; then __LLVM_MinorVersion=0; fi @@ -231,6 +226,16 @@ while :; do __CodeName=bionic fi ;; + focal) # Ubuntu 20.04 + if [[ "$__CodeName" != "jessie" ]]; then + __CodeName=focal + fi + ;; + jammy) # Ubuntu 22.04 + if [[ "$__CodeName" != "jessie" ]]; then + __CodeName=jammy + fi + ;; jessie) # Debian 8 __CodeName=jessie __UbuntuRepo="http://ftp.debian.org/debian/" diff --git a/eng/common/cross/x86/sources.list.focal b/eng/common/cross/x86/sources.list.focal new file mode 100644 index 000000000000..99d5731330e7 --- /dev/null +++ b/eng/common/cross/x86/sources.list.focal @@ -0,0 +1,11 @@ +deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted +deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted + +deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse diff --git a/eng/common/cross/x86/sources.list.jammy b/eng/common/cross/x86/sources.list.jammy new file mode 100644 index 000000000000..af1c1feaeac1 --- /dev/null +++ b/eng/common/cross/x86/sources.list.jammy @@ -0,0 +1,11 @@ +deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe +deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe + +deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted +deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted + +deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1 index 846e7950ce94..bab18543d6c4 100644 --- a/eng/common/generate-locproject.ps1 +++ b/eng/common/generate-locproject.ps1 @@ -62,7 +62,7 @@ $locJson = @{ $outputPath = "$(($_.DirectoryName | Resolve-Path -Relative) + "\")" $continue = $true foreach ($exclusion in $exclusions.Exclusions) { - if ($outputPath.Contains($exclusion)) + if ($_.FullName.Contains($exclusion)) { $continue = $false } @@ -98,7 +98,7 @@ $locJson = @{ $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\" $continue = $true foreach ($exclusion in $exclusions.Exclusions) { - if ($outputPath.Contains($exclusion)) + if ($_.FullName.Contains($exclusion)) { $continue = $false } diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml index 9ff6a10a682c..aaeb83b4dcbd 100644 --- a/eng/common/templates/job/execute-sdl.yml +++ b/eng/common/templates/job/execute-sdl.yml @@ -53,7 +53,7 @@ jobs: demands: Cmd # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: - checkout: self diff --git a/eng/common/templates/job/onelocbuild.yml b/eng/common/templates/job/onelocbuild.yml index 6c523b714f40..6b8fc9970808 100644 --- a/eng/common/templates/job/onelocbuild.yml +++ b/eng/common/templates/job/onelocbuild.yml @@ -40,7 +40,7 @@ jobs: demands: Cmd # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals windows.vs2019.amd64 variables: diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml index 88f6f75a622d..b6137f44ada1 100644 --- a/eng/common/templates/job/source-build.yml +++ b/eng/common/templates/job/source-build.yml @@ -46,10 +46,10 @@ jobs: # source-build builds run in Docker, including the default managed platform. pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Public + name: NetCore-Svc-Public demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 ${{ if ne(parameters.platform.pool, '') }}: pool: ${{ parameters.platform.pool }} diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml index 21fd12276b65..59a42c338ab1 100644 --- a/eng/common/templates/job/source-index-stage1.yml +++ b/eng/common/templates/job/source-index-stage1.yml @@ -28,10 +28,10 @@ jobs: ${{ if eq(parameters.pool, '') }}: pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Public + name: NetCore-Svc-Public demands: ImageOverride -equals windows.vs2019.amd64.open ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml index 64e5929f2216..297e7946b0be 100644 --- a/eng/common/templates/jobs/jobs.yml +++ b/eng/common/templates/jobs/jobs.yml @@ -95,7 +95,7 @@ jobs: demands: Cmd # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals windows.vs2019.amd64 runAsPublic: ${{ parameters.runAsPublic }} diff --git a/eng/common/templates/jobs/source-build.yml b/eng/common/templates/jobs/source-build.yml index 00aa98eb3bfd..8dd2d355f22d 100644 --- a/eng/common/templates/jobs/source-build.yml +++ b/eng/common/templates/jobs/source-build.yml @@ -14,7 +14,7 @@ parameters: # This is the default platform provided by Arcade, intended for use by a managed-only repo. defaultManagedPlatform: name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343' + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-20220809204800-17a4aab' # Defines the platforms on which to run build jobs. One job is created for each platform, and the # object in this array is sent to the job template as 'platform'. If no platforms are specified, diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 87fcae940cff..957375c1c1a6 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -106,7 +106,7 @@ stages: demands: Cmd # If it's not devdiv, it's dnceng ${{ else }}: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: @@ -143,7 +143,7 @@ stages: demands: Cmd # If it's not devdiv, it's dnceng ${{ else }}: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml @@ -203,7 +203,7 @@ stages: demands: Cmd # If it's not devdiv, it's dnceng ${{ else }}: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml @@ -262,7 +262,7 @@ stages: demands: Cmd # If it's not devdiv, it's dnceng ${{ else }}: - name: NetCore1ESPool-Internal + name: NetCore1ESPool-Svc-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml diff --git a/global.json b/global.json index 34f6643a0d0f..01d845abfa21 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "7.0.100-preview.7.22377.5", + "dotnet": "7.0.100-rc.1.22431.12", "runtimes": { "dotnet": [ "$(VSRedistCommonNetCoreSharedFrameworkx6470PackageVersion)" @@ -11,7 +11,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22418.4", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22418.4" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22464.4", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22464.4" } } From 59fa9ca0bd4332de208c4d3a50c7ade6c3d8290d Mon Sep 17 00:00:00 2001 From: Kartheek Penagamuri Date: Tue, 20 Sep 2022 11:16:23 -0700 Subject: [PATCH 099/185] update NuGet version number to 6.4.0-preview.3.94 --- eng/Version.Details.xml | 6 +++--- eng/Versions.props | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c8420e67fce4..e12cb9c9f607 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -101,9 +101,9 @@ https://github.com/dotnet/aspnetcore 0bb3d6897e3cae58517217b628c08e585d0bede6 - - https://github.com/nuget/nuget.client - 3ed642746f2609c6f586d096803630095b4add78 + + https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted + 8fe69e373c7930dbf556a7800012f0c2d9ac199f https://github.com/microsoft/vstest diff --git a/eng/Versions.props b/eng/Versions.props index f5080b056efd..a0f73dd55692 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -62,7 +62,7 @@ - 6.4.0-preview.3.88 + 6.4.0-preview.3.94 $(NuGetBuildTasksPackageVersion) 6.0.0-rc.278 $(NuGetBuildTasksPackageVersion) From 90f3d744cb3277d594872714fe4279c204d955b3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 20 Sep 2022 18:56:48 +0000 Subject: [PATCH 100/185] Update dependencies from https://github.com/dotnet/fsharp build 20220920.2 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 7.0.0-beta.22465.8 -> To Version 7.0.0-beta.22470.2 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c8420e67fce4..3b7e87da34e6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -50,13 +50,13 @@ https://github.com/dotnet/msbuild 48ab5664b8734afdf4aedba5f72a0663435eef16 - + https://github.com/dotnet/fsharp - 1f56aa9c36d2919ba52c5b4f5abd449161e7ca01 + da42031ad1cf0880768dfedac75c782b721cd175 - + https://github.com/dotnet/fsharp - 1f56aa9c36d2919ba52c5b4f5abd449161e7ca01 + da42031ad1cf0880768dfedac75c782b721cd175 diff --git a/eng/Versions.props b/eng/Versions.props index f5080b056efd..f9ce79a50747 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -135,7 +135,7 @@ - 12.0.5-beta.22465.8 + 12.0.5-beta.22470.2 From 46d1c42bcc3a8af281de09fb0d19ee5eb27fbccc Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Tue, 20 Sep 2022 20:02:57 +0000 Subject: [PATCH 101/185] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20220920.11 dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.JSInterop , VS.Redist.Common.AspNetCore.SharedFramework.x64.7.0 From Version 7.0.0-rc.2.22464.13 -> To Version 7.0.0-rc.2.22470.11 --- eng/Version.Details.xml | 102 ++++++++++++++++++++-------------------- eng/Versions.props | 12 ++--- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e12cb9c9f607..c3d2ba7a0870 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -93,13 +93,13 @@ https://github.com/dotnet/roslyn 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -159,50 +159,50 @@ https://github.com/dotnet/wpf 75b8ed5e4708531ec9a53b6d6e3adb5971c37ac6 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 https://github.com/dotnet/razor-compiler @@ -221,21 +221,21 @@ https://github.com/dotnet/razor-compiler a41514681a4db83c7cae7e17debf668d12efc1bb - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 - - https://github.com/dotnet/aspnetcore - 0bb3d6897e3cae58517217b628c08e585d0bede6 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + 7b7659c3ea0ea495219e4a632c0110143c70cde8 https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index a0f73dd55692..a84e9160181c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -150,12 +150,12 @@ - 7.0.0-rc.2.22464.13 - 7.0.0-rc.2.22464.13 - 7.0.0-rc.2.22464.13 - 7.0.0-rc.2.22464.13 - 7.0.0-rc.2.22464.13 - 7.0.0-rc.2.22464.13 + 7.0.0-rc.2.22470.11 + 7.0.0-rc.2.22470.11 + 7.0.0-rc.2.22470.11 + 7.0.0-rc.2.22470.11 + 7.0.0-rc.2.22470.11 + 7.0.0-rc.2.22470.11 From f855b73483111c1dca40f039bb98c49996783c9c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 20 Sep 2022 20:22:15 +0000 Subject: [PATCH 102/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20220920.10 Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22470.2 -> To Version 7.0.0-rc.2.22470.10 --- eng/Version.Details.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c8420e67fce4..6174acce30c2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -139,21 +139,21 @@ https://github.com/dotnet/runtime b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/windowsdesktop - 2ca54cc198a91208ebb5d2405a417a29c91fde66 + 5fd191686f606737ee5a59cd4859e43238d7b040 - + https://github.com/dotnet/windowsdesktop - 2ca54cc198a91208ebb5d2405a417a29c91fde66 + 5fd191686f606737ee5a59cd4859e43238d7b040 - + https://github.com/dotnet/windowsdesktop - 2ca54cc198a91208ebb5d2405a417a29c91fde66 + 5fd191686f606737ee5a59cd4859e43238d7b040 - + https://github.com/dotnet/windowsdesktop - 2ca54cc198a91208ebb5d2405a417a29c91fde66 + 5fd191686f606737ee5a59cd4859e43238d7b040 https://github.com/dotnet/wpf From 6694faa6f16ecbd1e82780c8a4e9532c694526c6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 20 Sep 2022 22:01:08 +0000 Subject: [PATCH 103/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20220920.14 Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22470.2 -> To Version 7.0.0-rc.2.22470.14 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 7.0.0-rc.2.22470.3 -> To Version 7.0.0-rc.2.22470.9 (parent: Microsoft.WindowsDesktop.App.Ref --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6174acce30c2..b68def9cc3bf 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -139,25 +139,25 @@ https://github.com/dotnet/runtime b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/windowsdesktop - 5fd191686f606737ee5a59cd4859e43238d7b040 + df3aaa651892bc480c7faf4c39c069fd3dcf9924 - + https://github.com/dotnet/windowsdesktop - 5fd191686f606737ee5a59cd4859e43238d7b040 + df3aaa651892bc480c7faf4c39c069fd3dcf9924 - + https://github.com/dotnet/windowsdesktop - 5fd191686f606737ee5a59cd4859e43238d7b040 + df3aaa651892bc480c7faf4c39c069fd3dcf9924 - + https://github.com/dotnet/windowsdesktop - 5fd191686f606737ee5a59cd4859e43238d7b040 + df3aaa651892bc480c7faf4c39c069fd3dcf9924 - + https://github.com/dotnet/wpf - 75b8ed5e4708531ec9a53b6d6e3adb5971c37ac6 + 69922c22a702f022e66ca7a950a495e766e54b21 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index f5080b056efd..2546b1671fe4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -166,7 +166,7 @@ - 7.0.0-rc.2.22470.3 + 7.0.0-rc.2.22470.9 From 002ccaf3c3dbcbb1dd988093e70374c231e2eb70 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 20 Sep 2022 23:29:19 +0000 Subject: [PATCH 104/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20220920.17 Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22470.2 -> To Version 7.0.0-rc.2.22470.17 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 7.0.0-rc.2.22470.3 -> To Version 7.0.0-rc.2.22470.10 (parent: Microsoft.WindowsDesktop.App.Ref --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b68def9cc3bf..7b6e17cfc09a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -139,25 +139,25 @@ https://github.com/dotnet/runtime b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/windowsdesktop - df3aaa651892bc480c7faf4c39c069fd3dcf9924 + f434393ce959ec60bf9108855ca31dde93334d77 - + https://github.com/dotnet/windowsdesktop - df3aaa651892bc480c7faf4c39c069fd3dcf9924 + f434393ce959ec60bf9108855ca31dde93334d77 - + https://github.com/dotnet/windowsdesktop - df3aaa651892bc480c7faf4c39c069fd3dcf9924 + f434393ce959ec60bf9108855ca31dde93334d77 - + https://github.com/dotnet/windowsdesktop - df3aaa651892bc480c7faf4c39c069fd3dcf9924 + f434393ce959ec60bf9108855ca31dde93334d77 - + https://github.com/dotnet/wpf - 69922c22a702f022e66ca7a950a495e766e54b21 + 8d64d3ffc118bf021c201590e826a46a253e7ac7 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 2546b1671fe4..f2cadef9a009 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -166,7 +166,7 @@ - 7.0.0-rc.2.22470.9 + 7.0.0-rc.2.22470.10 From 450ea550073be6650159d442a689daee8656b43a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 21 Sep 2022 01:32:22 +0000 Subject: [PATCH 105/185] Update dependencies from https://github.com/dotnet/roslyn build 20220920.9 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-2.22464.20 -> To Version 4.4.0-3.22470.9 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ed4df27170c9..08db3efff7e0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,34 +64,34 @@ b2c62dccc3261307096b2a67ae3f91dd9b0f98e6 - + https://github.com/dotnet/roslyn - fbdc03126486aadaec6fd255ccffd241a70aa3dc + f5c759ac1e39bc71906d4da10436e131f0488bd7 - + https://github.com/dotnet/roslyn - fbdc03126486aadaec6fd255ccffd241a70aa3dc + f5c759ac1e39bc71906d4da10436e131f0488bd7 - + https://github.com/dotnet/roslyn - fbdc03126486aadaec6fd255ccffd241a70aa3dc + f5c759ac1e39bc71906d4da10436e131f0488bd7 - + https://github.com/dotnet/roslyn - fbdc03126486aadaec6fd255ccffd241a70aa3dc + f5c759ac1e39bc71906d4da10436e131f0488bd7 - + https://github.com/dotnet/roslyn - fbdc03126486aadaec6fd255ccffd241a70aa3dc + f5c759ac1e39bc71906d4da10436e131f0488bd7 - + https://github.com/dotnet/roslyn - fbdc03126486aadaec6fd255ccffd241a70aa3dc + f5c759ac1e39bc71906d4da10436e131f0488bd7 - + https://github.com/dotnet/roslyn - fbdc03126486aadaec6fd255ccffd241a70aa3dc + f5c759ac1e39bc71906d4da10436e131f0488bd7 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 5e4fcbd9aa03..b6e52e0a9a14 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -139,13 +139,13 @@ - 4.4.0-3.22470.1 - 4.4.0-3.22470.1 - 4.4.0-3.22470.1 - 4.4.0-3.22470.1 - 4.4.0-3.22470.1 - 4.4.0-3.22470.1 - 4.4.0-3.22470.1 + 4.4.0-3.22470.9 + 4.4.0-3.22470.9 + 4.4.0-3.22470.9 + 4.4.0-3.22470.9 + 4.4.0-3.22470.9 + 4.4.0-3.22470.9 + 4.4.0-3.22470.9 $(MicrosoftNetCompilersToolsetPackageVersion) From 14e21735ef69d795950d7e8b5eb2e6c3190f8aef Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 21 Sep 2022 01:59:08 +0000 Subject: [PATCH 106/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20220920.18 Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22470.2 -> To Version 7.0.0-rc.2.22470.18 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 7.0.0-rc.2.22470.3 -> To Version 7.0.0-rc.2.22470.13 (parent: Microsoft.WindowsDesktop.App.Ref --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7b6e17cfc09a..3aaa444110b0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -139,25 +139,25 @@ https://github.com/dotnet/runtime b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/windowsdesktop - f434393ce959ec60bf9108855ca31dde93334d77 + ba99224e838b81baa1c09606347a602f3a02db7d - + https://github.com/dotnet/windowsdesktop - f434393ce959ec60bf9108855ca31dde93334d77 + ba99224e838b81baa1c09606347a602f3a02db7d - + https://github.com/dotnet/windowsdesktop - f434393ce959ec60bf9108855ca31dde93334d77 + ba99224e838b81baa1c09606347a602f3a02db7d - + https://github.com/dotnet/windowsdesktop - f434393ce959ec60bf9108855ca31dde93334d77 + ba99224e838b81baa1c09606347a602f3a02db7d - + https://github.com/dotnet/wpf - 8d64d3ffc118bf021c201590e826a46a253e7ac7 + dc634630fcd2e65f9e2d20baebd8331f21710e50 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index f2cadef9a009..1f107e309366 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -166,7 +166,7 @@ - 7.0.0-rc.2.22470.10 + 7.0.0-rc.2.22470.13 From 8f425daed9b5252b6d8b3f85027dbb7dccf70a37 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 21 Sep 2022 04:09:21 +0000 Subject: [PATCH 107/185] Update dependencies from https://github.com/dotnet/roslyn build 20220920.11 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-2.22464.20 -> To Version 4.4.0-3.22470.11 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 08db3efff7e0..7368cebcd896 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,34 +64,34 @@ b2c62dccc3261307096b2a67ae3f91dd9b0f98e6 - + https://github.com/dotnet/roslyn - f5c759ac1e39bc71906d4da10436e131f0488bd7 + 30eae7ac85af9650d82127ca697fecadd1ca4e9c - + https://github.com/dotnet/roslyn - f5c759ac1e39bc71906d4da10436e131f0488bd7 + 30eae7ac85af9650d82127ca697fecadd1ca4e9c - + https://github.com/dotnet/roslyn - f5c759ac1e39bc71906d4da10436e131f0488bd7 + 30eae7ac85af9650d82127ca697fecadd1ca4e9c - + https://github.com/dotnet/roslyn - f5c759ac1e39bc71906d4da10436e131f0488bd7 + 30eae7ac85af9650d82127ca697fecadd1ca4e9c - + https://github.com/dotnet/roslyn - f5c759ac1e39bc71906d4da10436e131f0488bd7 + 30eae7ac85af9650d82127ca697fecadd1ca4e9c - + https://github.com/dotnet/roslyn - f5c759ac1e39bc71906d4da10436e131f0488bd7 + 30eae7ac85af9650d82127ca697fecadd1ca4e9c - + https://github.com/dotnet/roslyn - f5c759ac1e39bc71906d4da10436e131f0488bd7 + 30eae7ac85af9650d82127ca697fecadd1ca4e9c https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index b6e52e0a9a14..6960fd5d618d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -139,13 +139,13 @@ - 4.4.0-3.22470.9 - 4.4.0-3.22470.9 - 4.4.0-3.22470.9 - 4.4.0-3.22470.9 - 4.4.0-3.22470.9 - 4.4.0-3.22470.9 - 4.4.0-3.22470.9 + 4.4.0-3.22470.11 + 4.4.0-3.22470.11 + 4.4.0-3.22470.11 + 4.4.0-3.22470.11 + 4.4.0-3.22470.11 + 4.4.0-3.22470.11 + 4.4.0-3.22470.11 $(MicrosoftNetCompilersToolsetPackageVersion) From bfe586c4730e3c03cba5fc713344d200dde188eb Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 21 Sep 2022 04:27:56 +0000 Subject: [PATCH 108/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20220920.20 Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22470.2 -> To Version 7.0.0-rc.2.22470.20 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 7.0.0-rc.2.22470.3 -> To Version 7.0.0-rc.2.22470.14 (parent: Microsoft.WindowsDesktop.App.Ref --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3aaa444110b0..3068e0ffde83 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -139,25 +139,25 @@ https://github.com/dotnet/runtime b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/windowsdesktop - ba99224e838b81baa1c09606347a602f3a02db7d + 5383d6c708f7f2219d1c1d6534698f7d524e1eaa - + https://github.com/dotnet/windowsdesktop - ba99224e838b81baa1c09606347a602f3a02db7d + 5383d6c708f7f2219d1c1d6534698f7d524e1eaa - + https://github.com/dotnet/windowsdesktop - ba99224e838b81baa1c09606347a602f3a02db7d + 5383d6c708f7f2219d1c1d6534698f7d524e1eaa - + https://github.com/dotnet/windowsdesktop - ba99224e838b81baa1c09606347a602f3a02db7d + 5383d6c708f7f2219d1c1d6534698f7d524e1eaa - + https://github.com/dotnet/wpf - dc634630fcd2e65f9e2d20baebd8331f21710e50 + 532fc68c74c1a49def5fa4796b23f991b3944e55 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 1f107e309366..f06e87f40569 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -166,7 +166,7 @@ - 7.0.0-rc.2.22470.13 + 7.0.0-rc.2.22470.14 From 50f9bfeb6d625b1ce0f5778b37c4d315045f8f5d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 21 Sep 2022 06:46:29 +0000 Subject: [PATCH 109/185] Update dependencies from https://github.com/dotnet/roslyn build 20220920.12 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-2.22464.20 -> To Version 4.4.0-3.22470.12 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7368cebcd896..922989fcdbb1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,34 +64,34 @@ b2c62dccc3261307096b2a67ae3f91dd9b0f98e6 - + https://github.com/dotnet/roslyn - 30eae7ac85af9650d82127ca697fecadd1ca4e9c + 506a5457806ffa864fc239e6164442690baa5fea - + https://github.com/dotnet/roslyn - 30eae7ac85af9650d82127ca697fecadd1ca4e9c + 506a5457806ffa864fc239e6164442690baa5fea - + https://github.com/dotnet/roslyn - 30eae7ac85af9650d82127ca697fecadd1ca4e9c + 506a5457806ffa864fc239e6164442690baa5fea - + https://github.com/dotnet/roslyn - 30eae7ac85af9650d82127ca697fecadd1ca4e9c + 506a5457806ffa864fc239e6164442690baa5fea - + https://github.com/dotnet/roslyn - 30eae7ac85af9650d82127ca697fecadd1ca4e9c + 506a5457806ffa864fc239e6164442690baa5fea - + https://github.com/dotnet/roslyn - 30eae7ac85af9650d82127ca697fecadd1ca4e9c + 506a5457806ffa864fc239e6164442690baa5fea - + https://github.com/dotnet/roslyn - 30eae7ac85af9650d82127ca697fecadd1ca4e9c + 506a5457806ffa864fc239e6164442690baa5fea https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 6960fd5d618d..5b1eda18c6ce 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -139,13 +139,13 @@ - 4.4.0-3.22470.11 - 4.4.0-3.22470.11 - 4.4.0-3.22470.11 - 4.4.0-3.22470.11 - 4.4.0-3.22470.11 - 4.4.0-3.22470.11 - 4.4.0-3.22470.11 + 4.4.0-3.22470.12 + 4.4.0-3.22470.12 + 4.4.0-3.22470.12 + 4.4.0-3.22470.12 + 4.4.0-3.22470.12 + 4.4.0-3.22470.12 + 4.4.0-3.22470.12 $(MicrosoftNetCompilersToolsetPackageVersion) From 9a9b3d1e80608db301e25d2de3787ee4cad1dd19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Wed, 21 Sep 2022 09:31:34 +0200 Subject: [PATCH 110/185] [release/7.0.1xx-rc2] Update dependencies from microsoft/vstest (#28044) Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3b7e87da34e6..df98ee13dad1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -105,9 +105,9 @@ https://github.com/nuget/nuget.client 3ed642746f2609c6f586d096803630095b4add78 - + https://github.com/microsoft/vstest - d94aafd04f9ebecda6d36cce3f8cc1605d88f4ed + e3ef271ba4d8ef1cda34bfa544e33c350fce622e https://github.com/dotnet/linker diff --git a/eng/Versions.props b/eng/Versions.props index f9ce79a50747..4c4c6ea1fd7c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -79,7 +79,7 @@ - 17.4.0-preview-20220913-02 + 17.4.0-release-20220920-01 $(MicrosoftNETTestSdkPackageVersion) $(MicrosoftNETTestSdkPackageVersion) From f946209d31d061709c73442e341acdcbccce71ed Mon Sep 17 00:00:00 2001 From: Vlada Shubina Date: Fri, 9 Sep 2022 12:51:11 +0200 Subject: [PATCH 111/185] fixed nullable errors --- .../HostDataLoaderTests.cs | 2 ++ .../ParserTests/InstallTests.cs | 8 ++++-- .../ParserTests/ListTests.cs | 3 ++- .../ParserTests/SearchTests.cs | 3 ++- .../ParserTests/UpdateTests.cs | 8 ++++-- .../dotnet-new/DotnetSlnPostActionTests.cs | 25 +++++++++++-------- 6 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/HostDataLoaderTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/HostDataLoaderTests.cs index 16953d090ee4..46fcdc639b95 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/HostDataLoaderTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/HostDataLoaderTests.cs @@ -40,6 +40,7 @@ public void CanLoadHostDataFile() Assert.False(data.IsHidden); Assert.Equal(2, data.UsageExamples?.Count); + Assert.NotNull(data.UsageExamples); Assert.Contains("--framework netcoreapp3.1 --langVersion '9.0'", data.UsageExamples); Assert.Equal(4, data.SymbolInfo?.Count); Assert.Contains("TargetFrameworkOverride", data.HiddenParameterNames); @@ -83,6 +84,7 @@ public void CanReadHostDataFromITemplateInfo() Assert.False(data.IsHidden); Assert.Equal(2, data.UsageExamples?.Count); + Assert.NotNull(data.UsageExamples); Assert.Contains("--framework netcoreapp3.1 --langVersion '9.0'", data.UsageExamples); Assert.Equal(4, data.SymbolInfo?.Count); Assert.Contains("TargetFrameworkOverride", data.HiddenParameterNames); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstallTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstallTests.cs index 708871f55367..1a8f333fe02c 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstallTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstallTests.cs @@ -21,6 +21,7 @@ public void Install_CanParseAddSourceOption(string optionName) ParseResult parseResult = myCommand.Parse($"new install source {optionName} my-custom-source"); InstallCommandArgs args = new((InstallCommand)parseResult.CommandResult.Command, parseResult); + Assert.NotNull(args.AdditionalSources); Assert.Single(args.AdditionalSources); Assert.Contains("my-custom-source", args.AdditionalSources); Assert.Single(args.TemplatePackages); @@ -65,7 +66,8 @@ public void Install_CanParseAddSourceOption_MultipleEntries(string testCase) ParseResult parseResult = myCommand.Parse(testCase); InstallCommandArgs args = new((InstallCommand)parseResult.CommandResult.Command, parseResult); - Assert.Equal(2, args.AdditionalSources?.Count); + Assert.NotNull(args.AdditionalSources); + Assert.Equal(2, args.AdditionalSources.Count); Assert.Contains("my-custom-source1", args.AdditionalSources); Assert.Contains("my-custom-source2", args.AdditionalSources); Assert.Single(args.TemplatePackages); @@ -140,6 +142,7 @@ public void Install_Legacy_CanParseAddSourceOption(string testCase) ParseResult parseResult = myCommand.Parse(testCase); InstallCommandArgs args = new((LegacyInstallCommand)parseResult.CommandResult.Command, parseResult); + Assert.NotNull(args.AdditionalSources); Assert.Single(args.AdditionalSources); Assert.Contains("my-custom-source", args.AdditionalSources); Assert.Single(args.TemplatePackages); @@ -189,7 +192,8 @@ public void Install_Legacy_CanParseAddSourceOption_MultipleEntries(string testCa ParseResult parseResult = myCommand.Parse(testCase); InstallCommandArgs args = new((LegacyInstallCommand)parseResult.CommandResult.Command, parseResult); - Assert.Equal(2, args.AdditionalSources?.Count); + Assert.NotNull(args.AdditionalSources); + Assert.Equal(2, args.AdditionalSources.Count); Assert.Contains("my-custom-source1", args.AdditionalSources); Assert.Contains("my-custom-source2", args.AdditionalSources); Assert.Single(args.TemplatePackages); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/ListTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/ListTests.cs index 94a88f0f031e..56d85431e779 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/ListTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/ListTests.cs @@ -220,8 +220,9 @@ public void List_CanParseColumns(string command, string[] expectedColumns) ListCommandArgs args = new((BaseListCommand)parseResult.CommandResult.Command, parseResult); Assert.False(args.DisplayAllColumns); + Assert.NotNull(args.ColumnsToDisplay); Assert.NotEmpty(args.ColumnsToDisplay); - Assert.Equal(expectedColumns.Length, args.ColumnsToDisplay?.Count); + Assert.Equal(expectedColumns.Length, args.ColumnsToDisplay.Count); foreach (string column in expectedColumns) { Assert.Contains(column, args.ColumnsToDisplay); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/SearchTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/SearchTests.cs index 50c2b7e60feb..e36ef67f2341 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/SearchTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/SearchTests.cs @@ -217,9 +217,10 @@ public void Search_CanParseColumns(string command, string[] expectedColumns) SearchCommandArgs args = new((BaseSearchCommand)parseResult.CommandResult.Command, parseResult); + Assert.NotNull(args.ColumnsToDisplay); Assert.False(args.DisplayAllColumns); Assert.NotEmpty(args.ColumnsToDisplay); - Assert.Equal(expectedColumns.Length, args.ColumnsToDisplay?.Count); + Assert.Equal(expectedColumns.Length, args.ColumnsToDisplay.Count); foreach (string column in expectedColumns) { Assert.Contains(column, args.ColumnsToDisplay); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/UpdateTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/UpdateTests.cs index 244d34184cc9..b7d8d406f885 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/UpdateTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/UpdateTests.cs @@ -21,6 +21,7 @@ public void Update_CanParseAddSourceOption(string optionName) ParseResult parseResult = myCommand.Parse($"new update {optionName} my-custom-source"); UpdateCommandArgs args = new((UpdateCommand)parseResult.CommandResult.Command, parseResult); + Assert.NotNull(args.AdditionalSources); Assert.Single(args.AdditionalSources); Assert.Contains("my-custom-source", args.AdditionalSources); } @@ -50,7 +51,8 @@ public void Update_CanParseAddSourceOption_MultipleEntries(string testCase) ParseResult parseResult = myCommand.Parse(testCase); UpdateCommandArgs args = new((UpdateCommand)parseResult.CommandResult.Command, parseResult); - Assert.Equal(2, args.AdditionalSources?.Count); + Assert.NotNull(args.AdditionalSources); + Assert.Equal(2, args.AdditionalSources.Count); Assert.Contains("my-custom-source1", args.AdditionalSources); Assert.Contains("my-custom-source2", args.AdditionalSources); } @@ -120,6 +122,7 @@ public void Update_Legacy_CanParseAddSourceOption(string testCase) ParseResult parseResult = myCommand.Parse(testCase); UpdateCommandArgs args = new((BaseUpdateCommand)parseResult.CommandResult.Command, parseResult); + Assert.NotNull(args.AdditionalSources); Assert.Single(args.AdditionalSources); Assert.Contains("my-custom-source", args.AdditionalSources); } @@ -149,7 +152,8 @@ public void Update_Legacy_CanParseAddSourceOption_MultipleEntries(string testCas ParseResult parseResult = myCommand.Parse(testCase); UpdateCommandArgs args = new((BaseUpdateCommand)parseResult.CommandResult.Command, parseResult); - Assert.Equal(2, args.AdditionalSources?.Count); + Assert.NotNull(args.AdditionalSources); + Assert.Equal(2, args.AdditionalSources.Count); Assert.Contains("my-custom-source1", args.AdditionalSources); Assert.Contains("my-custom-source2", args.AdditionalSources); } diff --git a/src/Tests/dotnet.Tests/dotnet-new/DotnetSlnPostActionTests.cs b/src/Tests/dotnet.Tests/dotnet-new/DotnetSlnPostActionTests.cs index a360eedf7611..2d407d63d2bf 100644 --- a/src/Tests/dotnet.Tests/dotnet-new/DotnetSlnPostActionTests.cs +++ b/src/Tests/dotnet.Tests/dotnet-new/DotnetSlnPostActionTests.cs @@ -77,11 +77,12 @@ public void AddProjectToSolutionPostActionFindsMultipleProjectsToAdd() }); Assert.True(DotnetSlnPostActionProcessor.TryGetProjectFilesToAdd( postAction, creationResult, outputBasePath, out IReadOnlyList? foundProjectFiles)); - Assert.Equal(2, foundProjectFiles?.Count); - Assert.Contains(creationResult.PrimaryOutputs[0].Path, foundProjectFiles?.ToList()); - Assert.Contains(creationResult.PrimaryOutputs[2].Path, foundProjectFiles?.ToList()); + Assert.NotNull(foundProjectFiles); + Assert.Equal(2, foundProjectFiles.Count); + Assert.Contains(creationResult.PrimaryOutputs[0].Path, foundProjectFiles.ToList()); + Assert.Contains(creationResult.PrimaryOutputs[2].Path, foundProjectFiles.ToList()); - Assert.DoesNotContain(creationResult.PrimaryOutputs[1].Path, foundProjectFiles?.ToList()); + Assert.DoesNotContain(creationResult.PrimaryOutputs[1].Path, foundProjectFiles.ToList()); } [Fact(DisplayName = nameof(AddProjectToSolutionPostActionDoesntFindProjectOutOfRange))] @@ -128,11 +129,12 @@ public void AddProjectToSolutionPostActionFindsMultipleProjectsToAddWithOutputBa string outputFileFullPath2 = Path.Combine(outputBasePath, creationResult.PrimaryOutputs[2].Path); Assert.True(DotnetSlnPostActionProcessor.TryGetProjectFilesToAdd( postAction, creationResult, outputBasePath, out IReadOnlyList? foundProjectFiles)); - Assert.Equal(2, foundProjectFiles?.Count); - Assert.Contains(outputFileFullPath0, foundProjectFiles?.ToList()); - Assert.Contains(outputFileFullPath2, foundProjectFiles?.ToList()); + Assert.NotNull(foundProjectFiles); + Assert.Equal(2, foundProjectFiles.Count); + Assert.Contains(outputFileFullPath0, foundProjectFiles.ToList()); + Assert.Contains(outputFileFullPath2, foundProjectFiles.ToList()); - Assert.DoesNotContain(dontFindMeFullPath1, foundProjectFiles?.ToList()); + Assert.DoesNotContain(dontFindMeFullPath1, foundProjectFiles.ToList()); } [Fact(DisplayName = nameof(AddProjectToSolutionPostActionWithoutPrimaryOutputIndexesWithOutputBasePath))] @@ -156,9 +158,10 @@ public void AddProjectToSolutionPostActionWithoutPrimaryOutputIndexesWithOutputB string outputFileFullPath1 = Path.Combine(outputBasePath, creationResult.PrimaryOutputs[1].Path); Assert.True(DotnetSlnPostActionProcessor.TryGetProjectFilesToAdd( postAction, creationResult, outputBasePath, out IReadOnlyList? foundProjectFiles)); - Assert.Equal(2, foundProjectFiles?.Count); - Assert.Contains(outputFileFullPath0, foundProjectFiles?.ToList()); - Assert.Contains(outputFileFullPath1, foundProjectFiles?.ToList()); + Assert.NotNull(foundProjectFiles); + Assert.Equal(2, foundProjectFiles.Count); + Assert.Contains(outputFileFullPath0, foundProjectFiles.ToList()); + Assert.Contains(outputFileFullPath1, foundProjectFiles.ToList()); } [Fact(DisplayName = nameof(AddProjectToSolutionCanTargetASingleProjectWithAJsonArray))] From 83603b67803128c85699101807bbc84b4075a336 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Tue, 13 Sep 2022 15:25:19 -0700 Subject: [PATCH 112/185] Fix test to workaround CS8604 as .Empty doesn't appear to handle nullable correctly. --- .../StartupHookTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests/StartupHookTests.cs b/src/Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests/StartupHookTests.cs index 5db15105974f..a722d5301a73 100644 --- a/src/Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests/StartupHookTests.cs +++ b/src/Tests/Microsoft.Extensions.DotNetDeltaApplier.Tests/StartupHookTests.cs @@ -25,7 +25,7 @@ public void ClearHotReloadEnvironmentVariables_ClearsStartupHook() (name, value) => environmentVariables[name] = value); // Assert - Assert.Empty(environmentVariables["DOTNET_STARTUP_HOOKS"]); + Assert.True(string.IsNullOrEmpty(environmentVariables["DOTNET_STARTUP_HOOKS"])); } [Fact] From 6ef8e35fb1b7f25e900bbaf9fe4e58e08528fce4 Mon Sep 17 00:00:00 2001 From: Tanay Parikh Date: Thu, 15 Sep 2022 15:31:28 -0700 Subject: [PATCH 113/185] Manual bump to 6.0.8 --- .../Publish60Hosted_Works.Publish.files.json | 6 ++--- ...0Hosted_Works.Publish.staticwebassets.json | 22 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.files.json b/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.files.json index 7906564fb8eb..f21bfc510c68 100644 --- a/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.files.json +++ b/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.files.json @@ -92,9 +92,9 @@ "${OutputPath}\\wwwroot\\_framework\\blazor.webassembly.js", "${OutputPath}\\wwwroot\\_framework\\blazor.webassembly.js.br", "${OutputPath}\\wwwroot\\_framework\\blazor.webassembly.js.gz", - "${OutputPath}\\wwwroot\\_framework\\dotnet.6.0.7.[[hash]].js", - "${OutputPath}\\wwwroot\\_framework\\dotnet.6.0.7.[[hash]].js.br", - "${OutputPath}\\wwwroot\\_framework\\dotnet.6.0.7.[[hash]].js.gz", + "${OutputPath}\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js", + "${OutputPath}\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js.br", + "${OutputPath}\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js.gz", "${OutputPath}\\wwwroot\\_framework\\dotnet.timezones.blat", "${OutputPath}\\wwwroot\\_framework\\dotnet.timezones.blat.br", "${OutputPath}\\wwwroot\\_framework\\dotnet.timezones.blat.gz", diff --git a/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.staticwebassets.json b/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.staticwebassets.json index ef24746cf0fb..c1d687551e57 100644 --- a/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.staticwebassets.json +++ b/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.staticwebassets.json @@ -46,12 +46,12 @@ "OriginalItemSpec": "${RestorePath}\\microsoft.aspnetcore.components.webassembly\\[[CustomPackageVersion]]\\build\\net6.0\\blazor.webassembly.js" }, { - "Identity": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.7.[[hash]].js", + "Identity": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js", "SourceId": "BlazorWasmHosted60.Client", "SourceType": "Project", "ContentRoot": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\publish\\wwwroot\\", "BasePath": "/", - "RelativePath": "_framework/dotnet.6.0.7.[[hash]].js", + "RelativePath": "_framework/dotnet.6.0.8.[[hash]].js", "AssetKind": "Publish", "AssetMode": "All", "AssetRole": "Primary", @@ -60,7 +60,7 @@ "AssetTraitValue": "native", "CopyToOutputDirectory": "Never", "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.7.[[hash]].js" + "OriginalItemSpec": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js" }, { "Identity": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.timezones.blat", @@ -233,21 +233,21 @@ "OriginalItemSpec": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\blazor.webassembly.js" }, { - "Identity": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\build-gz\\[[_framework/dotnet.6.0.7.[[hash]].js.gz]]", + "Identity": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\build-gz\\[[_framework/dotnet.6.0.8.[[hash]].js.gz]]", "SourceId": "BlazorWasmHosted60.Client", "SourceType": "Project", "ContentRoot": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\publish\\wwwroot\\", "BasePath": "/", - "RelativePath": "_framework/dotnet.6.0.7.[[hash]].js.gz", + "RelativePath": "_framework/dotnet.6.0.8.[[hash]].js.gz", "AssetKind": "Publish", "AssetMode": "All", "AssetRole": "Alternative", - "RelatedAsset": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.7.[[hash]].js", + "RelatedAsset": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js", "AssetTraitName": "Content-Encoding", "AssetTraitValue": "gzip", "CopyToOutputDirectory": "Never", "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\build-gz\\[[_framework/dotnet.6.0.7.[[hash]].js.gz]]" + "OriginalItemSpec": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\build-gz\\[[_framework/dotnet.6.0.8.[[hash]].js.gz]]" }, { "Identity": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\build-gz\\[[_framework/dotnet.wasm.gz]]", @@ -1270,21 +1270,21 @@ "OriginalItemSpec": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\blazor.webassembly.js" }, { - "Identity": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\compress\\[[_framework/dotnet.6.0.7.[[hash]].js.br]]", + "Identity": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\compress\\[[_framework/dotnet.6.0.8.[[hash]].js.br]]", "SourceId": "BlazorWasmHosted60.Client", "SourceType": "Project", "ContentRoot": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\publish\\wwwroot\\", "BasePath": "/", - "RelativePath": "_framework/dotnet.6.0.7.[[hash]].js.br", + "RelativePath": "_framework/dotnet.6.0.8.[[hash]].js.br", "AssetKind": "Publish", "AssetMode": "All", "AssetRole": "Alternative", - "RelatedAsset": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.7.[[hash]].js", + "RelatedAsset": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js", "AssetTraitName": "Content-Encoding", "AssetTraitValue": "br", "CopyToOutputDirectory": "Never", "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.7.[[hash]].js" + "OriginalItemSpec": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js" }, { "Identity": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\compress\\[[_framework/dotnet.timezones.blat.br]]", From 52633b1ea9c8a4938cfcc4c9e3b888f781682f72 Mon Sep 17 00:00:00 2001 From: Tanay Parikh Date: Thu, 15 Sep 2022 15:31:32 -0700 Subject: [PATCH 114/185] Create update-test-baselines.ps1 --- src/RazorSdk/update-test-baselines.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/RazorSdk/update-test-baselines.ps1 diff --git a/src/RazorSdk/update-test-baselines.ps1 b/src/RazorSdk/update-test-baselines.ps1 new file mode 100644 index 000000000000..38c7e9553632 --- /dev/null +++ b/src/RazorSdk/update-test-baselines.ps1 @@ -0,0 +1,6 @@ +$RepoRoot= Resolve-Path "$PSScriptRoot/../.." + +$TestProjects = "Microsoft.NET.Sdk.Razor.Tests", "Microsoft.NET.Sdk.BlazorWebAssembly.Tests" | + ForEach-Object { Join-Path -Path "$RepoRoot/src/Tests/" -ChildPath $_ }; + +$TestProjects | ForEach-Object { dotnet test --no-build -l "console;verbosity=normal" $_ -e ASPNETCORE_TEST_BASELINES=true --filter AspNetCore=BaselineTest } From b97111100da7d6f0ede4bc5ef673ef94cb20b8ad Mon Sep 17 00:00:00 2001 From: Jason Zhai Date: Wed, 21 Sep 2022 01:44:09 -0700 Subject: [PATCH 115/185] Update Assets baselines --- .../Publish60Hosted_Works.Publish.files.json | 6 ++--- ...0Hosted_Works.Publish.staticwebassets.json | 22 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.files.json b/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.files.json index f21bfc510c68..5cd05af188ff 100644 --- a/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.files.json +++ b/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.files.json @@ -92,9 +92,9 @@ "${OutputPath}\\wwwroot\\_framework\\blazor.webassembly.js", "${OutputPath}\\wwwroot\\_framework\\blazor.webassembly.js.br", "${OutputPath}\\wwwroot\\_framework\\blazor.webassembly.js.gz", - "${OutputPath}\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js", - "${OutputPath}\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js.br", - "${OutputPath}\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js.gz", + "${OutputPath}\\wwwroot\\_framework\\dotnet.6.0.9.[[hash]].js", + "${OutputPath}\\wwwroot\\_framework\\dotnet.6.0.9.[[hash]].js.br", + "${OutputPath}\\wwwroot\\_framework\\dotnet.6.0.9.[[hash]].js.gz", "${OutputPath}\\wwwroot\\_framework\\dotnet.timezones.blat", "${OutputPath}\\wwwroot\\_framework\\dotnet.timezones.blat.br", "${OutputPath}\\wwwroot\\_framework\\dotnet.timezones.blat.gz", diff --git a/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.staticwebassets.json b/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.staticwebassets.json index c1d687551e57..f73f86ac25f2 100644 --- a/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.staticwebassets.json +++ b/src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/StaticWebAssetsBaselines/Publish60Hosted_Works.Publish.staticwebassets.json @@ -46,12 +46,12 @@ "OriginalItemSpec": "${RestorePath}\\microsoft.aspnetcore.components.webassembly\\[[CustomPackageVersion]]\\build\\net6.0\\blazor.webassembly.js" }, { - "Identity": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js", + "Identity": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.9.[[hash]].js", "SourceId": "BlazorWasmHosted60.Client", "SourceType": "Project", "ContentRoot": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\publish\\wwwroot\\", "BasePath": "/", - "RelativePath": "_framework/dotnet.6.0.8.[[hash]].js", + "RelativePath": "_framework/dotnet.6.0.9.[[hash]].js", "AssetKind": "Publish", "AssetMode": "All", "AssetRole": "Primary", @@ -60,7 +60,7 @@ "AssetTraitValue": "native", "CopyToOutputDirectory": "Never", "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js" + "OriginalItemSpec": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.9.[[hash]].js" }, { "Identity": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.timezones.blat", @@ -233,21 +233,21 @@ "OriginalItemSpec": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\blazor.webassembly.js" }, { - "Identity": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\build-gz\\[[_framework/dotnet.6.0.8.[[hash]].js.gz]]", + "Identity": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\build-gz\\[[_framework/dotnet.6.0.9.[[hash]].js.gz]]", "SourceId": "BlazorWasmHosted60.Client", "SourceType": "Project", "ContentRoot": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\publish\\wwwroot\\", "BasePath": "/", - "RelativePath": "_framework/dotnet.6.0.8.[[hash]].js.gz", + "RelativePath": "_framework/dotnet.6.0.9.[[hash]].js.gz", "AssetKind": "Publish", "AssetMode": "All", "AssetRole": "Alternative", - "RelatedAsset": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js", + "RelatedAsset": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.9.[[hash]].js", "AssetTraitName": "Content-Encoding", "AssetTraitValue": "gzip", "CopyToOutputDirectory": "Never", "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\build-gz\\[[_framework/dotnet.6.0.8.[[hash]].js.gz]]" + "OriginalItemSpec": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\build-gz\\[[_framework/dotnet.6.0.9.[[hash]].js.gz]]" }, { "Identity": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\build-gz\\[[_framework/dotnet.wasm.gz]]", @@ -1270,21 +1270,21 @@ "OriginalItemSpec": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\blazor.webassembly.js" }, { - "Identity": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\compress\\[[_framework/dotnet.6.0.8.[[hash]].js.br]]", + "Identity": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\compress\\[[_framework/dotnet.6.0.9.[[hash]].js.br]]", "SourceId": "BlazorWasmHosted60.Client", "SourceType": "Project", "ContentRoot": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\publish\\wwwroot\\", "BasePath": "/", - "RelativePath": "_framework/dotnet.6.0.8.[[hash]].js.br", + "RelativePath": "_framework/dotnet.6.0.9.[[hash]].js.br", "AssetKind": "Publish", "AssetMode": "All", "AssetRole": "Alternative", - "RelatedAsset": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js", + "RelatedAsset": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.9.[[hash]].js", "AssetTraitName": "Content-Encoding", "AssetTraitValue": "br", "CopyToOutputDirectory": "Never", "CopyToPublishDirectory": "PreserveNewest", - "OriginalItemSpec": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.8.[[hash]].js" + "OriginalItemSpec": "${ProjectRoot}\\Client\\bin\\Debug\\net6.0\\wwwroot\\_framework\\dotnet.6.0.9.[[hash]].js" }, { "Identity": "${ProjectRoot}\\Client\\obj\\Debug\\net6.0\\compress\\[[_framework/dotnet.timezones.blat.br]]", From da00f1243fe413002f3cb3164a487494c8df72e3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 21 Sep 2022 16:32:08 +0000 Subject: [PATCH 116/185] Update dependencies from https://github.com/dotnet/roslyn build 20220921.3 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-2.22464.20 -> To Version 4.4.0-3.22471.3 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 922989fcdbb1..d2c1a53892e2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,34 +64,34 @@ b2c62dccc3261307096b2a67ae3f91dd9b0f98e6 - + https://github.com/dotnet/roslyn - 506a5457806ffa864fc239e6164442690baa5fea + b78ae6178b876c17f80a5e88294ffac7a9f6a000 - + https://github.com/dotnet/roslyn - 506a5457806ffa864fc239e6164442690baa5fea + b78ae6178b876c17f80a5e88294ffac7a9f6a000 - + https://github.com/dotnet/roslyn - 506a5457806ffa864fc239e6164442690baa5fea + b78ae6178b876c17f80a5e88294ffac7a9f6a000 - + https://github.com/dotnet/roslyn - 506a5457806ffa864fc239e6164442690baa5fea + b78ae6178b876c17f80a5e88294ffac7a9f6a000 - + https://github.com/dotnet/roslyn - 506a5457806ffa864fc239e6164442690baa5fea + b78ae6178b876c17f80a5e88294ffac7a9f6a000 - + https://github.com/dotnet/roslyn - 506a5457806ffa864fc239e6164442690baa5fea + b78ae6178b876c17f80a5e88294ffac7a9f6a000 - + https://github.com/dotnet/roslyn - 506a5457806ffa864fc239e6164442690baa5fea + b78ae6178b876c17f80a5e88294ffac7a9f6a000 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 5b1eda18c6ce..2aa6a7b2327f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -139,13 +139,13 @@ - 4.4.0-3.22470.12 - 4.4.0-3.22470.12 - 4.4.0-3.22470.12 - 4.4.0-3.22470.12 - 4.4.0-3.22470.12 - 4.4.0-3.22470.12 - 4.4.0-3.22470.12 + 4.4.0-3.22471.3 + 4.4.0-3.22471.3 + 4.4.0-3.22471.3 + 4.4.0-3.22471.3 + 4.4.0-3.22471.3 + 4.4.0-3.22471.3 + 4.4.0-3.22471.3 $(MicrosoftNetCompilersToolsetPackageVersion) From f5bdaaa1feb47de8d471549de89f48b4db4f7ac6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 21 Sep 2022 16:59:54 +0000 Subject: [PATCH 117/185] Update dependencies from https://github.com/dotnet/razor-compiler build 20220921.1 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.AspNetCore.Razor.SourceGenerator.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.5.22412.2 -> To Version 7.0.0-preview.5.22471.1 --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1442bab1bc00..61bfeedb3bd0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -204,22 +204,22 @@ https://github.com/dotnet/aspnetcore 0bb3d6897e3cae58517217b628c08e585d0bede6 - + https://github.com/dotnet/razor-compiler - a41514681a4db83c7cae7e17debf668d12efc1bb + 883416c9d9ec221a9d73e62de093a43f2e2daf90 - + https://github.com/dotnet/razor-compiler - a41514681a4db83c7cae7e17debf668d12efc1bb + 883416c9d9ec221a9d73e62de093a43f2e2daf90 - + https://github.com/dotnet/razor-compiler - a41514681a4db83c7cae7e17debf668d12efc1bb + 883416c9d9ec221a9d73e62de093a43f2e2daf90 - + https://github.com/dotnet/razor-compiler - a41514681a4db83c7cae7e17debf668d12efc1bb + 883416c9d9ec221a9d73e62de093a43f2e2daf90 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 9da50e2167d6..dfc68d2f2e91 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -159,10 +159,10 @@ - 7.0.0-preview.5.22412.2 - 7.0.0-preview.5.22412.2 - 7.0.0-preview.5.22412.2 - 7.0.0-preview.5.22412.2 + 7.0.0-preview.5.22471.1 + 7.0.0-preview.5.22471.1 + 7.0.0-preview.5.22471.1 + 7.0.0-preview.5.22471.1 From 01a2fb0d318de8a62c0561039bd6dfb4be19f5ef Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 21 Sep 2022 18:03:12 +0000 Subject: [PATCH 118/185] Update dependencies from https://github.com/dotnet/fsharp build 20220921.2 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 7.0.0-beta.22470.2 -> To Version 7.0.0-beta.22471.2 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1442bab1bc00..8516f62277a2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -50,13 +50,13 @@ https://github.com/dotnet/msbuild 48ab5664b8734afdf4aedba5f72a0663435eef16 - + https://github.com/dotnet/fsharp - da42031ad1cf0880768dfedac75c782b721cd175 + 6278c751c0b2fd68ee90c46b1ad631203c824a21 - + https://github.com/dotnet/fsharp - da42031ad1cf0880768dfedac75c782b721cd175 + 6278c751c0b2fd68ee90c46b1ad631203c824a21 diff --git a/eng/Versions.props b/eng/Versions.props index 9da50e2167d6..53c8a80ee0ab 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -135,7 +135,7 @@ - 12.0.5-beta.22470.2 + 12.0.5-beta.22471.2 From 581d0d97ca9b1b3fbe7bc570b82d45b110415816 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Wed, 21 Sep 2022 20:04:26 +0000 Subject: [PATCH 119/185] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20220921.3 dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.JSInterop , VS.Redist.Common.AspNetCore.SharedFramework.x64.7.0 From Version 7.0.0-rc.2.22470.11 -> To Version 7.0.0-rc.2.22471.3 --- eng/Version.Details.xml | 68 ++++++++++++++++++++--------------------- eng/Versions.props | 12 ++++---- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3394db783a75..bf7d725b635a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -93,13 +93,13 @@ https://github.com/dotnet/roslyn 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -159,50 +159,50 @@ https://github.com/dotnet/wpf 532fc68c74c1a49def5fa4796b23f991b3944e55 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 https://github.com/dotnet/razor-compiler @@ -221,21 +221,21 @@ https://github.com/dotnet/razor-compiler 883416c9d9ec221a9d73e62de093a43f2e2daf90 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 7b7659c3ea0ea495219e4a632c0110143c70cde8 + 52c98542ed55c172151dc3caaeda8c2e9fc38609 https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index 96e84db86f18..b30abef80340 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -150,12 +150,12 @@ - 7.0.0-rc.2.22470.11 - 7.0.0-rc.2.22470.11 - 7.0.0-rc.2.22470.11 - 7.0.0-rc.2.22470.11 - 7.0.0-rc.2.22470.11 - 7.0.0-rc.2.22470.11 + 7.0.0-rc.2.22471.3 + 7.0.0-rc.2.22471.3 + 7.0.0-rc.2.22471.3 + 7.0.0-rc.2.22471.3 + 7.0.0-rc.2.22471.3 + 7.0.0-rc.2.22471.3 From efaf58878dfbd6eb655166e961e7078be8138c64 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 21 Sep 2022 20:16:11 +0000 Subject: [PATCH 120/185] Update dependencies from https://github.com/dotnet/roslyn build 20220921.4 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-2.22464.20 -> To Version 4.4.0-3.22471.4 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d2c1a53892e2..85d322ad0a18 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,34 +64,34 @@ b2c62dccc3261307096b2a67ae3f91dd9b0f98e6 - + https://github.com/dotnet/roslyn - b78ae6178b876c17f80a5e88294ffac7a9f6a000 + b4bc5b3c2e27557c300496b3cdd04e7d292acc20 - + https://github.com/dotnet/roslyn - b78ae6178b876c17f80a5e88294ffac7a9f6a000 + b4bc5b3c2e27557c300496b3cdd04e7d292acc20 - + https://github.com/dotnet/roslyn - b78ae6178b876c17f80a5e88294ffac7a9f6a000 + b4bc5b3c2e27557c300496b3cdd04e7d292acc20 - + https://github.com/dotnet/roslyn - b78ae6178b876c17f80a5e88294ffac7a9f6a000 + b4bc5b3c2e27557c300496b3cdd04e7d292acc20 - + https://github.com/dotnet/roslyn - b78ae6178b876c17f80a5e88294ffac7a9f6a000 + b4bc5b3c2e27557c300496b3cdd04e7d292acc20 - + https://github.com/dotnet/roslyn - b78ae6178b876c17f80a5e88294ffac7a9f6a000 + b4bc5b3c2e27557c300496b3cdd04e7d292acc20 - + https://github.com/dotnet/roslyn - b78ae6178b876c17f80a5e88294ffac7a9f6a000 + b4bc5b3c2e27557c300496b3cdd04e7d292acc20 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 2aa6a7b2327f..327a2b172fdf 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -139,13 +139,13 @@ - 4.4.0-3.22471.3 - 4.4.0-3.22471.3 - 4.4.0-3.22471.3 - 4.4.0-3.22471.3 - 4.4.0-3.22471.3 - 4.4.0-3.22471.3 - 4.4.0-3.22471.3 + 4.4.0-3.22471.4 + 4.4.0-3.22471.4 + 4.4.0-3.22471.4 + 4.4.0-3.22471.4 + 4.4.0-3.22471.4 + 4.4.0-3.22471.4 + 4.4.0-3.22471.4 $(MicrosoftNetCompilersToolsetPackageVersion) From a5f6fcae82a3ed82cce28b36c731bbd0e0779cef Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Wed, 21 Sep 2022 15:31:39 -0500 Subject: [PATCH 121/185] MSBuild on .NET 7: Downgrade compile-time references (#28090) * Update dependencies from https://github.com/dotnet/msbuild build 20220919.4 Microsoft.Build , Microsoft.Build.Localization From Version 17.4.0-preview-22466-03 -> To Version 17.4.0-preview-22469-04 * Pin MSBuild references to a lower version Always referencing the latest MSBuild means that some things like the SDK resolver would be forced to target MSBuild's latest runtime, and that would break compat with uses. For instance, VSMac is currently on .NET 6.0 and can't run a net7.0 resolver. We do, however, want to always _ship_ the latest MSBuild. Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 9 +++++---- src/Layout/tool_msbuild/tool_msbuild.csproj | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 927701998e56..e9c080bd7a36 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,13 +42,13 @@ https://github.com/dotnet/runtime b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/msbuild - 48ab5664b8734afdf4aedba5f72a0663435eef16 + cc3db358d34ad4cd1ec0c67e17582d7ca2a15040 - + https://github.com/dotnet/msbuild - 48ab5664b8734afdf4aedba5f72a0663435eef16 + cc3db358d34ad4cd1ec0c67e17582d7ca2a15040 https://github.com/dotnet/fsharp diff --git a/eng/Versions.props b/eng/Versions.props index 578b56fd0f68..fdb5f54c8d3e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -105,15 +105,16 @@ - 17.4.0-preview-22466-03 - - $([System.IO.File]::ReadAllText('$(RepoRoot)\src\Layout\redist\minimumMSBuildVersion').Trim()) + $([System.IO.File]::ReadAllText('$(RepoRoot)\src\Layout\redist\minimumMSBuildVersion').Trim()) $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) - 17.4.0-preview-22466-03 + 17.4.0-preview-22469-04 $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) diff --git a/src/Layout/tool_msbuild/tool_msbuild.csproj b/src/Layout/tool_msbuild/tool_msbuild.csproj index 3c51e686e286..ab613387f90d 100644 --- a/src/Layout/tool_msbuild/tool_msbuild.csproj +++ b/src/Layout/tool_msbuild/tool_msbuild.csproj @@ -7,7 +7,7 @@ - + From 65eb37a246e785308be598f7084604d06cd5a5b6 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Wed, 21 Sep 2022 18:05:39 -0500 Subject: [PATCH 122/185] Gate warnings for localization asset locales on TFM >= 7 (#28060) Gate warnings for localization asset locales on TFM >= 7 --- .../GivenAResolvePackageAssetsTask.cs | 93 ++++++++++--------- .../Mocks/MockPackageResolver.cs | 5 +- .../IPackageResolver.cs | 2 + .../ResolvePackageAssets.cs | 33 ++++++- 4 files changed, 82 insertions(+), 51 deletions(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageAssetsTask.cs b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageAssetsTask.cs index e0aaa508409c..c75c1fe46a67 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageAssetsTask.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageAssetsTask.cs @@ -4,7 +4,6 @@ using FluentAssertions; using Microsoft.Build.Framework; using System; -using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; @@ -117,15 +116,11 @@ public void It_does_not_error_on_duplicate_package_names() new CacheWriter(task); // Should not error } - [Fact] - public void It_warns_on_invalid_culture_codes_of_resources() - { - string projectAssetsJsonPath = Path.GetTempFileName(); - var assetsContent = @" + private static string AssetsFileWithInvalidLocale(string tfm, string locale) => @" { `version`: 3, `targets`: { - `net7.0`: { + `{tfm}`: { `JavaScriptEngineSwitcher.Core/3.3.0`: { `type`: `package`, `compile`: { @@ -136,59 +131,65 @@ public void It_warns_on_invalid_culture_codes_of_resources() }, `resource`: { `lib/netstandard2.0/ru-ru/JavaScriptEngineSwitcher.Core.resources.dll`: { - `locale`: `what is this even` + `locale`: `{locale}` } } } } + }, + `project`: { + `version`: `1.0.0`, + `frameworks`: { + `{tfm}`: { + `targetAlias`: `{tfm}` + } + } } -}".Replace("`", "\""); +}".Replace("`", "\"").Replace("{tfm}", tfm).Replace("{locale}", locale); + + [InlineData("net7.0", true)] + [InlineData("net6.0", false)] + [Theory] + public void It_warns_on_invalid_culture_codes_of_resources(string tfm, bool shouldHaveWarnings) + { + string projectAssetsJsonPath = Path.GetTempFileName(); + var assetsContent = AssetsFileWithInvalidLocale(tfm, "what is this even"); File.WriteAllText(projectAssetsJsonPath, assetsContent); var task = InitializeTask(out _); task.ProjectAssetsFile = projectAssetsJsonPath; - task.TargetFramework = "net7.0"; - var writer = new CacheWriter(task); - writer.WriteToCacheFile(); - var messages = (task.BuildEngine as MockBuildEngine).Warnings; - var invalidContextMessages = messages.Where(msg => msg.Code == "NETSDK1188"); - invalidContextMessages.Should().HaveCount(1); + task.TargetFramework = tfm; + var writer = new CacheWriter(task, new MockPackageResolver()); + writer.WriteToMemoryStream(); + var engine = task.BuildEngine as MockBuildEngine; + + var invalidContextWarnings = engine.Warnings.Where(msg => msg.Code == "NETSDK1188"); + invalidContextWarnings.Should().HaveCount(shouldHaveWarnings ? 1 : 0); + + var invalidContextMessages = engine.Messages.Where(msg => msg.Code == "NETSDK1188"); + invalidContextMessages.Should().HaveCount(shouldHaveWarnings ? 0 : 1); + } - - [Fact] - public void It_warns_on_incorrectly_cased_culture_codes_of_resources() + + [InlineData("net7.0", true)] + [InlineData("net6.0", false)] + [Theory] + public void It_warns_on_incorrectly_cased_culture_codes_of_resources(string tfm, bool shouldHaveWarnings) { string projectAssetsJsonPath = Path.GetTempFileName(); - var assetsContent = @" -{ - `version`: 3, - `targets`: { - `net7.0`: { - `JavaScriptEngineSwitcher.Core/3.3.0`: { - `type`: `package`, - `compile`: { - `lib/netstandard2.0/JavaScriptEngineSwitcher.Core.dll`: {} - }, - `runtime`: { - `lib/netstandard2.0/JavaScriptEngineSwitcher.Core.dll`: {} - }, - `resource`: { - `lib/netstandard2.0/ru-ru/JavaScriptEngineSwitcher.Core.resources.dll`: { - `locale`: `ru-ru` - } - } - } - } - } -}".Replace("`", "\""); + var assetsContent = AssetsFileWithInvalidLocale(tfm, "ru-ru"); File.WriteAllText(projectAssetsJsonPath, assetsContent); var task = InitializeTask(out _); task.ProjectAssetsFile = projectAssetsJsonPath; - task.TargetFramework = "net7.0"; - var writer = new CacheWriter(task); - writer.WriteToCacheFile(); - var messages = (task.BuildEngine as MockBuildEngine).Warnings; - var invalidContextMessages = messages.Where(msg => msg.Code == "NETSDK1187"); - invalidContextMessages.Should().HaveCount(1); + task.TargetFramework = tfm; + var writer = new CacheWriter(task, new MockPackageResolver()); + writer.WriteToMemoryStream(); + var engine = task.BuildEngine as MockBuildEngine; + + var invalidContextWarnings = engine.Warnings.Where(msg => msg.Code == "NETSDK1187"); + invalidContextWarnings.Should().HaveCount(shouldHaveWarnings ? 1 : 0); + + var invalidContextMessages = engine.Messages.Where(msg => msg.Code == "NETSDK1187"); + invalidContextMessages.Should().HaveCount(shouldHaveWarnings ? 0 : 1); } private ResolvePackageAssets InitializeTask(out IEnumerable inputProperties) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/Mocks/MockPackageResolver.cs b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/Mocks/MockPackageResolver.cs index 85ccb9da17c2..1945185459ba 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/Mocks/MockPackageResolver.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/Mocks/MockPackageResolver.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using NuGet.ProjectModel; using NuGet.Versioning; using System.IO; @@ -24,5 +25,7 @@ public string GetPackageDirectory(string packageId, NuGetVersion version, out st packageRoot = _root; return Path.Combine(_root, packageId, version.ToNormalizedString(), "path"); } + + public string ResolvePackageAssetPath(LockFileTargetLibrary package, string relativePath) => Path.Combine(GetPackageDirectory(package.Name, package.Version), relativePath); } -} \ No newline at end of file +} diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/IPackageResolver.cs b/src/Tasks/Microsoft.NET.Build.Tasks/IPackageResolver.cs index 1540f00e5089..e208ba1bcfca 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/IPackageResolver.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/IPackageResolver.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using NuGet.ProjectModel; using NuGet.Versioning; namespace Microsoft.NET.Build.Tasks @@ -9,5 +10,6 @@ internal interface IPackageResolver { string GetPackageDirectory(string packageId, NuGetVersion version); string GetPackageDirectory(string packageId, NuGetVersion version, out string packageRoot); + string ResolvePackageAssetPath(LockFileTargetLibrary package, string relativePath); } } diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs b/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs index a9880dbd8fc7..bcdcf048ffc6 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs @@ -657,8 +657,8 @@ internal sealed class CacheWriter : IDisposable private ResolvePackageAssets _task; private BinaryWriter _writer; private LockFile _lockFile; - private NuGetPackageResolver _packageResolver; private LockFileTarget _compileTimeTarget; + private IPackageResolver _packageResolver; private LockFileTarget _runtimeTarget; private Dictionary _stringTable; private List _metadataStrings; @@ -677,6 +677,15 @@ internal sealed class CacheWriter : IDisposable private const char RelatedPropertySeparator = ';'; + /// + /// This constructor should only be used for testing - IPackgeResolver carries a lot of + /// state so using mocks really help with testing this component. + /// + public CacheWriter(ResolvePackageAssets task, IPackageResolver resolver) : this(task) + { + _packageResolver = resolver; + } + public CacheWriter(ResolvePackageAssets task) { _targetFramework = task.TargetFramework; @@ -1425,14 +1434,30 @@ private void WriteResourceAssemblies() var normalizedLocale = System.Globalization.CultureInfo.GetCultureInfo(locale).Name; if (normalizedLocale != locale) { - _task.Log.LogWarning(Strings.PackageContainsIncorrectlyCasedLocale, package.Name, package.Version.ToNormalizedString(), locale, normalizedLocale); + var tfm = _lockFile.GetTargetAndThrowIfNotFound(_targetFramework, null).TargetFramework; + if (tfm.Version.Major >= 7) + { + _task.Log.LogWarning(Strings.PackageContainsIncorrectlyCasedLocale, package.Name, package.Version.ToNormalizedString(), locale, normalizedLocale); + } + else + { + _task.Log.LogMessage(Strings.PackageContainsIncorrectlyCasedLocale, package.Name, package.Version.ToNormalizedString(), locale, normalizedLocale); + } } locale = normalizedLocale; } catch (System.Globalization.CultureNotFoundException cnf) { - _task.Log.LogWarning(Strings.PackageContainsUnknownLocale, package.Name, package.Version.ToNormalizedString(), cnf.InvalidCultureName); - // We could potentially strip this unknown locales at this point, but we do not. + var tfm = _lockFile.GetTargetAndThrowIfNotFound(_targetFramework, null).TargetFramework; + if (tfm.Version.Major >= 7) + { + _task.Log.LogWarning(Strings.PackageContainsUnknownLocale, package.Name, package.Version.ToNormalizedString(), cnf.InvalidCultureName); + } else + { + _task.Log.LogMessage(Strings.PackageContainsUnknownLocale, package.Name, package.Version.ToNormalizedString(), cnf.InvalidCultureName); + } + + // We could potentially strip this unknown locale at this point, but we do not. // Locale data can change over time (it's typically an OS database that's kept updated), // and the data on the system running the build may not be the same data as // the system executing the built code. So we should be permissive for this case. From eb68df4c6de41db24d98984035723543074e30bf Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 21 Sep 2022 16:05:48 -0700 Subject: [PATCH 123/185] [release/7.0.1xx-rc2] Update dependencies from dotnet/templating (#28018) * Update dependencies from https://github.com/dotnet/templating build 20220919.19 Microsoft.TemplateEngine.Abstractions From Version 7.0.100-rc.2.22458.5 -> To Version 7.0.100-rc.2.22469.19 * Update dependencies from https://github.com/dotnet/templating build 20220920.5 Microsoft.TemplateEngine.Abstractions From Version 7.0.100-rc.2.22458.5 -> To Version 7.0.100-rc.2.22470.5 * Attempt update of xunit version * Update dependencies from https://github.com/dotnet/templating build 20220921.2 Microsoft.TemplateEngine.Abstractions From Version 7.0.100-rc.2.22458.5 -> To Version 7.0.100-rc.2.22471.2 * Update dependencies from https://github.com/dotnet/templating build 20220921.7 Microsoft.TemplateEngine.Abstractions From Version 7.0.100-rc.2.22458.5 -> To Version 7.0.100-rc.2.22471.7 Co-authored-by: dotnet-maestro[bot] Co-authored-by: Matt Mitchell --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- testAsset.props | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 32bd7f2d1b70..fcdcfa7c8b0f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,9 +1,9 @@ - + https://github.com/dotnet/templating - ee515068a25631542f1fb0f0fdd53f9ec638373c + fa746f97346c696a4453b4a37a98b2400d56d540 diff --git a/eng/Versions.props b/eng/Versions.props index 60236347ffb0..dbfcf8c252c5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -125,7 +125,7 @@ - 7.0.100-rc.2.22458.5 + 7.0.100-rc.2.22471.7 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) diff --git a/testAsset.props b/testAsset.props index 8acb3b6f3d52..96f7069126c5 100644 --- a/testAsset.props +++ b/testAsset.props @@ -14,6 +14,6 @@ false - 2.4.1-pre.build.4059 + 2.4.2 From cca7e234579a1d4dc25e23b711101e5f56ea2cff Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 21 Sep 2022 23:12:52 +0000 Subject: [PATCH 124/185] Update dependencies from https://github.com/dotnet/roslyn build 20220921.7 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-2.22464.20 -> To Version 4.4.0-3.22471.7 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 85d322ad0a18..af580837dad8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,34 +64,34 @@ b2c62dccc3261307096b2a67ae3f91dd9b0f98e6 - + https://github.com/dotnet/roslyn - b4bc5b3c2e27557c300496b3cdd04e7d292acc20 + 8d8902878cb4d291191ffe9e546a4bf4d37e800c - + https://github.com/dotnet/roslyn - b4bc5b3c2e27557c300496b3cdd04e7d292acc20 + 8d8902878cb4d291191ffe9e546a4bf4d37e800c - + https://github.com/dotnet/roslyn - b4bc5b3c2e27557c300496b3cdd04e7d292acc20 + 8d8902878cb4d291191ffe9e546a4bf4d37e800c - + https://github.com/dotnet/roslyn - b4bc5b3c2e27557c300496b3cdd04e7d292acc20 + 8d8902878cb4d291191ffe9e546a4bf4d37e800c - + https://github.com/dotnet/roslyn - b4bc5b3c2e27557c300496b3cdd04e7d292acc20 + 8d8902878cb4d291191ffe9e546a4bf4d37e800c - + https://github.com/dotnet/roslyn - b4bc5b3c2e27557c300496b3cdd04e7d292acc20 + 8d8902878cb4d291191ffe9e546a4bf4d37e800c - + https://github.com/dotnet/roslyn - b4bc5b3c2e27557c300496b3cdd04e7d292acc20 + 8d8902878cb4d291191ffe9e546a4bf4d37e800c https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 327a2b172fdf..7a6cc637a854 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -139,13 +139,13 @@ - 4.4.0-3.22471.4 - 4.4.0-3.22471.4 - 4.4.0-3.22471.4 - 4.4.0-3.22471.4 - 4.4.0-3.22471.4 - 4.4.0-3.22471.4 - 4.4.0-3.22471.4 + 4.4.0-3.22471.7 + 4.4.0-3.22471.7 + 4.4.0-3.22471.7 + 4.4.0-3.22471.7 + 4.4.0-3.22471.7 + 4.4.0-3.22471.7 + 4.4.0-3.22471.7 $(MicrosoftNetCompilersToolsetPackageVersion) From 57829d9d848f554c5ee60e7bb6f7daf90c9f4571 Mon Sep 17 00:00:00 2001 From: DotNet-Bot Date: Wed, 21 Sep 2022 23:46:33 +0000 Subject: [PATCH 125/185] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore build 20220921.5 dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.JSInterop , VS.Redist.Common.AspNetCore.SharedFramework.x64.7.0 From Version 7.0.0-rc.2.22470.11 -> To Version 7.0.0-rc.2.22471.5 --- eng/Version.Details.xml | 68 ++++++++++++++++++++--------------------- eng/Versions.props | 12 ++++---- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index bf7d725b635a..ed8e52faa133 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -93,13 +93,13 @@ https://github.com/dotnet/roslyn 91902d4dd2c07549fb64357ed5c3a0ee9d7c3610 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -159,50 +159,50 @@ https://github.com/dotnet/wpf 532fc68c74c1a49def5fa4796b23f991b3944e55 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 https://github.com/dotnet/razor-compiler @@ -221,21 +221,21 @@ https://github.com/dotnet/razor-compiler 883416c9d9ec221a9d73e62de093a43f2e2daf90 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 52c98542ed55c172151dc3caaeda8c2e9fc38609 + 697875ce4d26f24ba72fdf6d4e35949f69cfe293 https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index b30abef80340..c17181832071 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -150,12 +150,12 @@ - 7.0.0-rc.2.22471.3 - 7.0.0-rc.2.22471.3 - 7.0.0-rc.2.22471.3 - 7.0.0-rc.2.22471.3 - 7.0.0-rc.2.22471.3 - 7.0.0-rc.2.22471.3 + 7.0.0-rc.2.22471.5 + 7.0.0-rc.2.22471.5 + 7.0.0-rc.2.22471.5 + 7.0.0-rc.2.22471.5 + 7.0.0-rc.2.22471.5 + 7.0.0-rc.2.22471.5 From 4407e86c4ad758ce5ee714b2ce1551991d57b2ac Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 22 Sep 2022 00:03:15 +0000 Subject: [PATCH 126/185] Update dependencies from https://github.com/dotnet/fsharp build 20220921.6 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 7.0.0-beta.22471.2 -> To Version 7.0.0-beta.22471.6 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index fcdcfa7c8b0f..b55326b1a006 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -50,13 +50,13 @@ https://github.com/dotnet/msbuild cc3db358d34ad4cd1ec0c67e17582d7ca2a15040 - + https://github.com/dotnet/fsharp - 6278c751c0b2fd68ee90c46b1ad631203c824a21 + de216eb65d741d01aff5d32a4bdc495ca730290a - + https://github.com/dotnet/fsharp - 6278c751c0b2fd68ee90c46b1ad631203c824a21 + de216eb65d741d01aff5d32a4bdc495ca730290a diff --git a/eng/Versions.props b/eng/Versions.props index dbfcf8c252c5..36cd137f935b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -136,7 +136,7 @@ - 12.0.5-beta.22471.2 + 12.0.5-beta.22471.6 From 80efe46fb783c5ed5c3f39551da635a72d46c639 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 22 Sep 2022 01:06:55 +0000 Subject: [PATCH 127/185] Update dependencies from https://github.com/dotnet/roslyn build 20220921.11 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-2.22464.20 -> To Version 4.4.0-3.22471.11 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index af580837dad8..c6fb2b429b22 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,34 +64,34 @@ b2c62dccc3261307096b2a67ae3f91dd9b0f98e6 - + https://github.com/dotnet/roslyn - 8d8902878cb4d291191ffe9e546a4bf4d37e800c + 8ba552ae5538f09f41dff70c360269b9736603e7 - + https://github.com/dotnet/roslyn - 8d8902878cb4d291191ffe9e546a4bf4d37e800c + 8ba552ae5538f09f41dff70c360269b9736603e7 - + https://github.com/dotnet/roslyn - 8d8902878cb4d291191ffe9e546a4bf4d37e800c + 8ba552ae5538f09f41dff70c360269b9736603e7 - + https://github.com/dotnet/roslyn - 8d8902878cb4d291191ffe9e546a4bf4d37e800c + 8ba552ae5538f09f41dff70c360269b9736603e7 - + https://github.com/dotnet/roslyn - 8d8902878cb4d291191ffe9e546a4bf4d37e800c + 8ba552ae5538f09f41dff70c360269b9736603e7 - + https://github.com/dotnet/roslyn - 8d8902878cb4d291191ffe9e546a4bf4d37e800c + 8ba552ae5538f09f41dff70c360269b9736603e7 - + https://github.com/dotnet/roslyn - 8d8902878cb4d291191ffe9e546a4bf4d37e800c + 8ba552ae5538f09f41dff70c360269b9736603e7 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 7a6cc637a854..f8871436a635 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -139,13 +139,13 @@ - 4.4.0-3.22471.7 - 4.4.0-3.22471.7 - 4.4.0-3.22471.7 - 4.4.0-3.22471.7 - 4.4.0-3.22471.7 - 4.4.0-3.22471.7 - 4.4.0-3.22471.7 + 4.4.0-3.22471.11 + 4.4.0-3.22471.11 + 4.4.0-3.22471.11 + 4.4.0-3.22471.11 + 4.4.0-3.22471.11 + 4.4.0-3.22471.11 + 4.4.0-3.22471.11 $(MicrosoftNetCompilersToolsetPackageVersion) From 855df7c59d1fd9619de5ebf20e0f29f698bfc7a4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 22 Sep 2022 04:20:44 +0000 Subject: [PATCH 128/185] Update dependencies from https://github.com/dotnet/roslyn build 20220921.13 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-2.22464.20 -> To Version 4.4.0-3.22471.13 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c6fb2b429b22..164ffd0627f9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,34 +64,34 @@ b2c62dccc3261307096b2a67ae3f91dd9b0f98e6 - + https://github.com/dotnet/roslyn - 8ba552ae5538f09f41dff70c360269b9736603e7 + e8c869b1dfe4fd78cbb6c839895b51be020380fb - + https://github.com/dotnet/roslyn - 8ba552ae5538f09f41dff70c360269b9736603e7 + e8c869b1dfe4fd78cbb6c839895b51be020380fb - + https://github.com/dotnet/roslyn - 8ba552ae5538f09f41dff70c360269b9736603e7 + e8c869b1dfe4fd78cbb6c839895b51be020380fb - + https://github.com/dotnet/roslyn - 8ba552ae5538f09f41dff70c360269b9736603e7 + e8c869b1dfe4fd78cbb6c839895b51be020380fb - + https://github.com/dotnet/roslyn - 8ba552ae5538f09f41dff70c360269b9736603e7 + e8c869b1dfe4fd78cbb6c839895b51be020380fb - + https://github.com/dotnet/roslyn - 8ba552ae5538f09f41dff70c360269b9736603e7 + e8c869b1dfe4fd78cbb6c839895b51be020380fb - + https://github.com/dotnet/roslyn - 8ba552ae5538f09f41dff70c360269b9736603e7 + e8c869b1dfe4fd78cbb6c839895b51be020380fb https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index f8871436a635..edfd0dbbcc0c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -139,13 +139,13 @@ - 4.4.0-3.22471.11 - 4.4.0-3.22471.11 - 4.4.0-3.22471.11 - 4.4.0-3.22471.11 - 4.4.0-3.22471.11 - 4.4.0-3.22471.11 - 4.4.0-3.22471.11 + 4.4.0-3.22471.13 + 4.4.0-3.22471.13 + 4.4.0-3.22471.13 + 4.4.0-3.22471.13 + 4.4.0-3.22471.13 + 4.4.0-3.22471.13 + 4.4.0-3.22471.13 $(MicrosoftNetCompilersToolsetPackageVersion) From aeb8d99177e451a3220fda5db00586e393936f6b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 22 Sep 2022 04:58:16 +0000 Subject: [PATCH 129/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20220921.7 Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22470.20 -> To Version 7.0.0-rc.2.22471.7 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 7.0.0-rc.2.22470.14 -> To Version 7.0.0-rc.2.22471.7 (parent: Microsoft.WindowsDesktop.App.Ref --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b55326b1a006..4842ab9c25d9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -139,25 +139,25 @@ https://github.com/dotnet/runtime b23dc07bd7363fcd986a17230c2734bc656e71a7 - + https://github.com/dotnet/windowsdesktop - 5383d6c708f7f2219d1c1d6534698f7d524e1eaa + 530d99d4abbd876bdce09440b08d7d1c159345ab - + https://github.com/dotnet/windowsdesktop - 5383d6c708f7f2219d1c1d6534698f7d524e1eaa + 530d99d4abbd876bdce09440b08d7d1c159345ab - + https://github.com/dotnet/windowsdesktop - 5383d6c708f7f2219d1c1d6534698f7d524e1eaa + 530d99d4abbd876bdce09440b08d7d1c159345ab - + https://github.com/dotnet/windowsdesktop - 5383d6c708f7f2219d1c1d6534698f7d524e1eaa + 530d99d4abbd876bdce09440b08d7d1c159345ab - + https://github.com/dotnet/wpf - 532fc68c74c1a49def5fa4796b23f991b3944e55 + 86014c685bfd664ae185b236188980455ccc83e5 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 36cd137f935b..2e0cc67bc2c7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -167,7 +167,7 @@ - 7.0.0-rc.2.22470.14 + 7.0.0-rc.2.22471.7 From ca06763c866e48cb11a44e7a130672be14aa923c Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Thu, 22 Sep 2022 10:42:13 -0700 Subject: [PATCH 130/185] Fix test issues --- .../SymbolFactory.cs | 5 ++-- .../Assertions/AssemblyAssertions.cs | 26 ++++++++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs index b468a568da7d..9882f46473a0 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs @@ -7,6 +7,7 @@ using System.IO; using System.Linq; using System.Runtime.CompilerServices; +using System.ServiceModel.Configuration; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.DotNet.ApiCompatibility.Abstractions; @@ -99,13 +100,13 @@ private static CSharpCompilation CreateCSharpCompilation(string name, bool enabl return CSharpCompilation.Create(name, options: compilationOptions, references: DefaultReferences); } - private static CSharpParseOptions ParseOptions { get; } = new(preprocessorSymbols: + private static CSharpParseOptions ParseOptions { get; } = new CSharpParseOptions(preprocessorSymbols: #if NETFRAMEWORK new string[] { "NETFRAMEWORK" } #else Array.Empty() #endif - ); + ).WithFeatures(new[] { new KeyValuePair("noRefSafetyRulesAttribute", "") }); private static IEnumerable> DiagnosticOptions { get; } = new[] { diff --git a/src/Tests/Microsoft.NET.TestFramework/Assertions/AssemblyAssertions.cs b/src/Tests/Microsoft.NET.TestFramework/Assertions/AssemblyAssertions.cs index 389fcd7173ad..3372a5c51291 100644 --- a/src/Tests/Microsoft.NET.TestFramework/Assertions/AssemblyAssertions.cs +++ b/src/Tests/Microsoft.NET.TestFramework/Assertions/AssemblyAssertions.cs @@ -79,10 +79,28 @@ private IEnumerable GetAssemblyAttributes() return metadataReader.CustomAttributes.Where(t => !t.IsNil).Select(t => { var attribute = metadataReader.GetCustomAttribute(t); - var constructor = metadataReader.GetMemberReference((MemberReferenceHandle)attribute.Constructor); - var type = metadataReader.GetTypeReference((TypeReferenceHandle)constructor.Parent); - - return metadataReader.GetString(type.Namespace) + "." + metadataReader.GetString(type.Name); + switch (attribute.Constructor.Kind) + { + case HandleKind.MethodDefinition: + { + var methodDef = metadataReader.GetMethodDefinition((MethodDefinitionHandle)attribute.Constructor); + var declaringTypeHandle = methodDef.GetDeclaringType(); + var typeDefinition = metadataReader.GetTypeDefinition(declaringTypeHandle); + var @namespace = metadataReader.GetString(typeDefinition.Namespace); + var name = metadataReader.GetString(typeDefinition.Name); + return $"{@namespace}.{name}"; + } + case HandleKind.MemberReference: + { + var memberRef = metadataReader.GetMemberReference((MemberReferenceHandle)attribute.Constructor); + var typeRef = metadataReader.GetTypeReference((TypeReferenceHandle)memberRef.Parent); + var @namespace = metadataReader.GetString(typeRef.Namespace); + var name = metadataReader.GetString(typeRef.Name); + return $"{@namespace}.{name}"; + } + default: + throw new InvalidOperationException(); + } }).ToArray(); } } From 50de3add63fc8921c976730b699b41deaa5d2ca9 Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Thu, 22 Sep 2022 10:44:37 -0700 Subject: [PATCH 131/185] Fixup --- .../Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs index 9882f46473a0..013337a46e28 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs @@ -7,7 +7,6 @@ using System.IO; using System.Linq; using System.Runtime.CompilerServices; -using System.ServiceModel.Configuration; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.DotNet.ApiCompatibility.Abstractions; From f9178e0725a3238cc50c02e2eaa7fa1437183366 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 22 Sep 2022 20:00:36 +0200 Subject: [PATCH 132/185] Fix test assumptions about a single namespace in APICompat --- .../AssemblySymbolLoaderTests.cs | 6 +++--- .../SymbolFactory.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/AssemblySymbolLoaderTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/AssemblySymbolLoaderTests.cs index 8d83ce6c2cfa..09a804c8c45b 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/AssemblySymbolLoaderTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/AssemblySymbolLoaderTests.cs @@ -210,7 +210,7 @@ public void LoadsSimpleAssemblyFromDirectory() IEnumerable types = symbols.FirstOrDefault() .GlobalNamespace .GetNamespaceMembers() - .FirstOrDefault() + .FirstOrDefault((n) => n.Name == "MyNamespace") .GetTypeMembers(); Assert.Single(types); @@ -226,7 +226,7 @@ public void LoadSimpleAssemblyFullPath() IEnumerable types = symbol.GlobalNamespace .GetNamespaceMembers() - .FirstOrDefault() + .FirstOrDefault((n) => n.Name == "MyNamespace") .GetTypeMembers(); Assert.Single(types); @@ -332,7 +332,7 @@ public void LoadAssemblyFromStreamNoWarns() IEnumerable types = symbol.GlobalNamespace .GetNamespaceMembers() - .FirstOrDefault() + .FirstOrDefault((n) => n.Name == "MyNamespace") .GetTypeMembers(); Assert.Single(types); diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs index 013337a46e28..0768c766efa7 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs @@ -105,7 +105,7 @@ private static CSharpCompilation CreateCSharpCompilation(string name, bool enabl #else Array.Empty() #endif - ).WithFeatures(new[] { new KeyValuePair("noRefSafetyRulesAttribute", "") }); + ); private static IEnumerable> DiagnosticOptions { get; } = new[] { From 3051312b3bd70326088bda5e90b9315ae42b4636 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 22 Sep 2022 18:01:49 +0000 Subject: [PATCH 133/185] Update dependencies from https://github.com/dotnet/roslyn build 20220922.1 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-2.22464.20 -> To Version 4.4.0-3.22472.1 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ddf9f234fb5d..6b836c8e1cc2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,34 +64,34 @@ b2c62dccc3261307096b2a67ae3f91dd9b0f98e6 - + https://github.com/dotnet/roslyn - e8c869b1dfe4fd78cbb6c839895b51be020380fb + 50437c7f79d45a61cfe197b416c3eb543eed5e26 - + https://github.com/dotnet/roslyn - e8c869b1dfe4fd78cbb6c839895b51be020380fb + 50437c7f79d45a61cfe197b416c3eb543eed5e26 - + https://github.com/dotnet/roslyn - e8c869b1dfe4fd78cbb6c839895b51be020380fb + 50437c7f79d45a61cfe197b416c3eb543eed5e26 - + https://github.com/dotnet/roslyn - e8c869b1dfe4fd78cbb6c839895b51be020380fb + 50437c7f79d45a61cfe197b416c3eb543eed5e26 - + https://github.com/dotnet/roslyn - e8c869b1dfe4fd78cbb6c839895b51be020380fb + 50437c7f79d45a61cfe197b416c3eb543eed5e26 - + https://github.com/dotnet/roslyn - e8c869b1dfe4fd78cbb6c839895b51be020380fb + 50437c7f79d45a61cfe197b416c3eb543eed5e26 - + https://github.com/dotnet/roslyn - e8c869b1dfe4fd78cbb6c839895b51be020380fb + 50437c7f79d45a61cfe197b416c3eb543eed5e26 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index fa71a605f7a0..620e42ab8528 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -140,13 +140,13 @@ - 4.4.0-3.22471.13 - 4.4.0-3.22471.13 - 4.4.0-3.22471.13 - 4.4.0-3.22471.13 - 4.4.0-3.22471.13 - 4.4.0-3.22471.13 - 4.4.0-3.22471.13 + 4.4.0-3.22472.1 + 4.4.0-3.22472.1 + 4.4.0-3.22472.1 + 4.4.0-3.22472.1 + 4.4.0-3.22472.1 + 4.4.0-3.22472.1 + 4.4.0-3.22472.1 $(MicrosoftNetCompilersToolsetPackageVersion) From 08f11c5195c186d62f934aec26fafe9e39ece8d7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 11:14:38 -0700 Subject: [PATCH 134/185] [release/7.0.1xx-rc2] Update dependencies from dotnet/runtime (#28056) * Update dependencies from https://github.com/dotnet/runtime build 20220919.16 Microsoft.DotNet.ILCompiler , Microsoft.Extensions.DependencyModel , Microsoft.NET.HostModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.Platforms , System.CodeDom , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , VS.Redist.Common.NetCore.SharedFramework.x64.7.0 , VS.Redist.Common.NetCore.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22469.6 -> To Version 7.0.0-rc.2.22469.16 * Update dependencies from https://github.com/dotnet/runtime build 20220920.11 Microsoft.DotNet.ILCompiler , Microsoft.Extensions.DependencyModel , Microsoft.NET.HostModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.Platforms , System.CodeDom , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , VS.Redist.Common.NetCore.SharedFramework.x64.7.0 , VS.Redist.Common.NetCore.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22469.6 -> To Version 7.0.0-rc.2.22470.11 * Update dependencies from https://github.com/dotnet/runtime build 20220920.14 Microsoft.DotNet.ILCompiler , Microsoft.Extensions.DependencyModel , Microsoft.NET.HostModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.Platforms , System.CodeDom , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , VS.Redist.Common.NetCore.SharedFramework.x64.7.0 , VS.Redist.Common.NetCore.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22469.6 -> To Version 7.0.0-rc.2.22470.14 * Temporarily redirect Full Framework runs to helix int environment to get VS 17.4 preview 2.1 * Update dependencies from https://github.com/dotnet/runtime build 20220921.7 Microsoft.DotNet.ILCompiler , Microsoft.Extensions.DependencyModel , Microsoft.NET.HostModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.Platforms , System.CodeDom , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , VS.Redist.Common.NetCore.SharedFramework.x64.7.0 , VS.Redist.Common.NetCore.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22469.6 -> To Version 7.0.0-rc.2.22471.7 Co-authored-by: dotnet-maestro[bot] Co-authored-by: Jose Perez Rodriguez --- eng/Version.Details.xml | 60 ++++++++++++++++++++--------------------- eng/Versions.props | 24 ++++++++--------- eng/build.yml | 2 ++ 3 files changed, 44 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4842ab9c25d9..1d10a535b9f3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -6,41 +6,41 @@ fa746f97346c696a4453b4a37a98b2400d56d540 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 https://github.com/dotnet/msbuild @@ -114,30 +114,30 @@ 5f9bfd94d9c687207872ae03f751ea19704381c0 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 https://github.com/dotnet/linker 5f9bfd94d9c687207872ae03f751ea19704381c0 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 https://github.com/dotnet/windowsdesktop @@ -284,9 +284,9 @@ https://github.com/dotnet/arcade 720af493900b2f2bdc48e9ee12577983a5c9be36 - + https://github.com/dotnet/runtime - b23dc07bd7363fcd986a17230c2734bc656e71a7 + 132f2974df922004c6af85dfdf2c182cc0d07aa1 https://github.com/dotnet/xliff-tasks diff --git a/eng/Versions.props b/eng/Versions.props index 2e0cc67bc2c7..52ad8bbd1249 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,12 +35,12 @@ 6.0.0 7.0.0-beta.22464.4 7.0.0-preview.22423.2 - 7.0.0-rc.2.22469.6 + 7.0.0-rc.2.22471.7 4.3.0 4.3.0 4.0.5 6.0.0 - 7.0.0-rc.2.22469.6 + 7.0.0-rc.2.22471.7 4.6.0 2.0.0-beta4.22402.1 1.0.0-preview5.1.22263.1 @@ -48,13 +48,13 @@ - 7.0.0-rc.2.22469.6 - 7.0.0-rc.2.22469.6 - 7.0.0-rc.2.22469.6 + 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22471.7 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) - 7.0.0-rc.2.22469.6 - 7.0.0-rc.2.22469.6 - 7.0.0-rc.2.22469.6 + 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22471.7 6.0.0-preview.7.21363.9 $(MicrosoftExtensionsDependencyModelPackageVersion) 6.0.0 @@ -90,10 +90,10 @@ - 7.0.0-rc.2.22469.6 - 7.0.0-rc.2.22469.6 - 7.0.0-rc.2.22469.6 - 7.0.0-rc.2.22469.6 + 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22471.7 diff --git a/eng/build.yml b/eng/build.yml index f144a5626d15..d865ea084270 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -118,6 +118,7 @@ jobs: -test -projects $(Build.SourcesDirectory)\src\Tests\UnitTests.proj /bl:$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\TestInHelix.binlog + /p:HelixBaseUri="https://helix.int-dot.net/" /p:_CustomHelixTargetQueue=${{ parameters.helixTargetQueue }} $(_InternalRuntimeDownloadArgs) displayName: Run Tests in Helix @@ -157,6 +158,7 @@ jobs: -test -projects $(Build.SourcesDirectory)/src/Tests/UnitTests.proj /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/TestInHelix.binlog + /p:HelixBaseUri="https://helix.int-dot.net/" /p:_CustomHelixTargetQueue=${{ parameters.helixTargetQueue }} $(_InternalRuntimeDownloadArgs) displayName: Run Tests in Helix From c998bd7789c93eab4f4a3f6f2d0edbc228f8f0f1 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Thu, 22 Sep 2022 18:19:48 +0000 Subject: [PATCH 135/185] Merged PR 25954: [internal/release/7.0.1xx-rc2] Update dependencies from devdiv/DevDiv/DotNet-msbuild-Trusted This pull request updates the following dependencies [marker]: <> (Begin:7ec3ca9e-eedc-40ed-f5b1-08da9a7d0e9c) ## From https://dev.azure.com/devdiv/DevDiv/_git/DotNet-msbuild-Trusted - **Subscription**: 7ec3ca9e-eedc-40ed-f5b1-08da9a7d0e9c - **Build**: 20220920.8 - **Date Produced**: September 20, 2022 9:33:24 PM UTC - **Commit**: 6521b1591e1e6b3bf3d548a611263c9c888e5bcf - **Branch**: refs/heads/vs17.4 [DependencyUpdate]: <> (Begin) - **Updates**: - **Microsoft.Build**: [from 17.4.0-preview-22466-03 to 17.4.0-preview-22470-08][2] - **Microsoft.Build.Localization**: [from 17.4.0-preview-22466-03 to 17.4.0-preview-22470-08][2] [2]: https://dev.azure.com/devdiv/DevDiv/_git/DotNet-msbuild-Trusted/branches?baseVersion=GC48ab566&targetVersion=GC6521b15&_a=files [DependencyUpdate]: <> (End) [marker]: <> (End:7ec3ca9e-eedc-40ed-f5b1-08da9a7d0e9c) --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6f9460e6956e..ef72663a06bb 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,13 +42,13 @@ https://github.com/dotnet/runtime b23dc07bd7363fcd986a17230c2734bc656e71a7 - - https://github.com/dotnet/msbuild - cc3db358d34ad4cd1ec0c67e17582d7ca2a15040 + + https://dev.azure.com/devdiv/DevDiv/_git/DotNet-msbuild-Trusted + 6521b1591e1e6b3bf3d548a611263c9c888e5bcf - - https://github.com/dotnet/msbuild - cc3db358d34ad4cd1ec0c67e17582d7ca2a15040 + + https://dev.azure.com/devdiv/DevDiv/_git/DotNet-msbuild-Trusted + 6521b1591e1e6b3bf3d548a611263c9c888e5bcf https://github.com/dotnet/fsharp diff --git a/eng/Versions.props b/eng/Versions.props index c8905036595e..386d87fbd38e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -105,7 +105,7 @@ - 17.4.0-preview-22469-04 + 17.4.0-preview-22470-08 $(MicrosoftBuildPackageVersion) - 4.4.0-3.22472.1 - 4.4.0-3.22472.1 - 4.4.0-3.22472.1 - 4.4.0-3.22472.1 - 4.4.0-3.22472.1 - 4.4.0-3.22472.1 - 4.4.0-3.22472.1 + 4.4.0-3.22472.2 + 4.4.0-3.22472.2 + 4.4.0-3.22472.2 + 4.4.0-3.22472.2 + 4.4.0-3.22472.2 + 4.4.0-3.22472.2 + 4.4.0-3.22472.2 $(MicrosoftNetCompilersToolsetPackageVersion) From 5757c00a2290e4edcf3ea200b138696b6a9a5ca0 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 22 Sep 2022 16:40:31 -0700 Subject: [PATCH 137/185] Fix Property Parsing in Publish (#28059) * Use forwarding function instead of speaking to Property Parser interface * Complete the patch * Remove userPropertyArgs * apply patch to program.cs for publish too * Improve tests * Squashed Test Improvements Make parser static again instead of internal Fix last remaining test Squash me * Helix fix: Uniquely identify test folders * Index directly into KV Array Co-authored-by: Daniel Plaisted * Apply chet's suggested revision Co-authored-by: Daniel Plaisted --- .../dotnet/ReleasePropertyProjectLocator.cs | 18 ++++----- .../commands/dotnet-pack/PackCommand.cs | 2 +- .../dotnet/commands/dotnet-publish/Program.cs | 2 +- ...enThatWeWantToPublishAHelloWorldProject.cs | 40 +++++++++++++++---- .../GivenDotnetPublishPublishesProjects.cs | 18 +++++++++ 5 files changed, 62 insertions(+), 18 deletions(-) diff --git a/src/Cli/dotnet/ReleasePropertyProjectLocator.cs b/src/Cli/dotnet/ReleasePropertyProjectLocator.cs index 70a6ecae1e1c..52aac61ab583 100644 --- a/src/Cli/dotnet/ReleasePropertyProjectLocator.cs +++ b/src/Cli/dotnet/ReleasePropertyProjectLocator.cs @@ -34,12 +34,11 @@ public IEnumerable GetCustomDefaultConfigurationValueIfSpecified( ParseResult parseResult, string defaultedConfigurationProperty, IEnumerable slnOrProjectArgs, - Option configOption, - IEnumerable userPropertyArgs + Option configOption ) { ProjectInstance project = null; - var globalProperties = GetGlobalPropertiesFromUserArgs(userPropertyArgs); + var globalProperties = GetGlobalPropertiesFromUserArgs(parseResult); if (parseResult.HasOption(configOption) || globalProperties.ContainsKey(MSBuildPropertyNames.CONFIGURATION)) yield break; @@ -151,7 +150,7 @@ public ProjectInstance GetSlnProject(string slnPath, Dictionary { lock (projectDataLock) { - configuredProjects.Add(projectData); // we don't care about race conditions here + configuredProjects.Add(projectData); configValues.Add(useReleaseConfiguraton.ToLower()); } } @@ -186,15 +185,16 @@ private bool IsValidProjectFilePath(string path) } /// A case-insensitive dictionary of any properties passed from the user and their values. - private Dictionary GetGlobalPropertiesFromUserArgs(IEnumerable userPropertyArgs) + private Dictionary GetGlobalPropertiesFromUserArgs(ParseResult parseResult) { Dictionary globalProperties = new Dictionary(StringComparer.OrdinalIgnoreCase); - IEnumerable<(string key, string value)> globalPropEnumerable = MSBuildPropertyParser.ParseProperties(String.Join(";", userPropertyArgs)); - // The parser puts keys into the format --property:Key no matter the user input, so we can expect that pattern and extract the key. - foreach (var kvPair in globalPropEnumerable) + string[] globalPropEnumerable = parseResult.GetValueForOption(CommonOptions.PropertiesOption); + + foreach (var keyEqVal in globalPropEnumerable) { - globalProperties[kvPair.key.Split(new string[] { "--property:" }, StringSplitOptions.None).Last()] = kvPair.value; + string[] keyValuePair = keyEqVal.Split("=", 2); + globalProperties[keyValuePair[0]] = keyValuePair[1]; } return globalProperties; } diff --git a/src/Cli/dotnet/commands/dotnet-pack/PackCommand.cs b/src/Cli/dotnet/commands/dotnet-pack/PackCommand.cs index 89312574bd5f..17b205e8bab1 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/PackCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-pack/PackCommand.cs @@ -45,7 +45,7 @@ public static PackCommand FromParseResult(ParseResult parseResult, string msbuil msbuildArgs.AddRange(parseResult.OptionValuesToBeForwarded(PackCommandParser.GetCommand())); ReleasePropertyProjectLocator projectLocator = new ReleasePropertyProjectLocator(Environment.GetEnvironmentVariable(EnvironmentVariableNames.ENABLE_PACK_RELEASE_FOR_SOLUTIONS) != null); msbuildArgs.AddRange(projectLocator.GetCustomDefaultConfigurationValueIfSpecified(parseResult, MSBuildPropertyNames.PACK_RELEASE, - slnOrProjectArgs, PackCommandParser.ConfigurationOption, msbuildArgs) ?? Array.Empty()); + slnOrProjectArgs, PackCommandParser.ConfigurationOption) ?? Array.Empty()); msbuildArgs.AddRange(slnOrProjectArgs ?? Array.Empty()); bool noRestore = parseResult.HasOption(PackCommandParser.NoRestoreOption) || parseResult.HasOption(PackCommandParser.NoBuildOption); diff --git a/src/Cli/dotnet/commands/dotnet-publish/Program.cs b/src/Cli/dotnet/commands/dotnet-publish/Program.cs index e024a5d54a53..b75fa918da25 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/Program.cs +++ b/src/Cli/dotnet/commands/dotnet-publish/Program.cs @@ -57,7 +57,7 @@ public static PublishCommand FromParseResult(ParseResult parseResult, string msb msbuildArgs.AddRange(parseResult.OptionValuesToBeForwarded(PublishCommandParser.GetCommand())); ReleasePropertyProjectLocator projectLocator = new ReleasePropertyProjectLocator(Environment.GetEnvironmentVariable(EnvironmentVariableNames.ENABLE_PUBLISH_RELEASE_FOR_SOLUTIONS) != null); msbuildArgs.AddRange(projectLocator.GetCustomDefaultConfigurationValueIfSpecified(parseResult, MSBuildPropertyNames.PUBLISH_RELEASE, - slnOrProjectArgs, PublishCommandParser.ConfigurationOption, msbuildArgs) ?? Array.Empty()); + slnOrProjectArgs, PublishCommandParser.ConfigurationOption) ?? Array.Empty()); msbuildArgs.AddRange(slnOrProjectArgs ?? Array.Empty()); bool noRestore = parseResult.HasOption(PublishCommandParser.NoRestoreOption) diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs index 979965fc3b69..a7c76ba87922 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs @@ -563,6 +563,27 @@ public void It_warns_if_PublishRelease_set_on_sln_but_env_var_not_used() .HaveStdOutContaining("NETSDK1190"); } + [Fact] + public void It_publishes_correctly_in_PublishRelease_evaluation_despite_option_forwarded_format() + { + var helloWorldAsset = _testAssetsManager + .CopyTestAsset("HelloWorld", $"PublishesWithProperyFormats") + .WithSource() + .WithTargetFramework(ToolsetInfo.CurrentTargetFramework); + + new BuildCommand(helloWorldAsset) + .Execute() + .Should() + .Pass(); + + var publishCommand = new DotnetPublishCommand(Log, helloWorldAsset.TestRoot); + + publishCommand + .Execute("-f", "net7.0") + .Should() + .Pass().And.NotHaveStdErr(); + } + [Fact] public void It_publishes_on_release_if_PublishRelease_property_set_in_csproj() { @@ -661,11 +682,16 @@ public void PublishRelease_does_not_override_custom_Configuration_on_proj_and_lo Assert.False(File.Exists(releaseAssetPath)); // build will produce a debug asset, need to make sure this doesn't exist either. } - [Fact] - public void PublishRelease_does_not_override_Configuration_property() + [Theory] + [InlineData("-p:Configuration=Debug")] + [InlineData("-property:Configuration=Debug")] + [InlineData("--property:Configuration=Debug")] + [InlineData("/p:Configuration=Debug")] + [InlineData("/property:Configuration=Debug")] + public void PublishRelease_does_not_override_Configuration_property_across_formats(string configOpt) { var helloWorldAsset = _testAssetsManager - .CopyTestAsset("HelloWorld", "PublishReleaseHelloWorldCsProjConfigPropOverride") + .CopyTestAsset("HelloWorld", $"PublishReleaseHelloWorldCsProjConfigPropOverride{configOpt}") .WithSource() .WithTargetFramework(ToolsetInfo.CurrentTargetFramework) .WithProjectChanges(project => @@ -676,16 +702,16 @@ public void PublishRelease_does_not_override_Configuration_property() }); new BuildCommand(helloWorldAsset) - .Execute("-p:Configuration=Debug") + .Execute(configOpt) .Should() .Pass(); var publishCommand = new DotnetPublishCommand(Log, helloWorldAsset.TestRoot); publishCommand - .Execute("-p:Configuration=Debug") + .Execute(configOpt) .Should() - .Pass(); + .Pass().And.NotHaveStdErr(); var expectedAssetPath = System.IO.Path.Combine(helloWorldAsset.Path, "bin", "Debug", ToolsetInfo.CurrentTargetFramework, "HelloWorld.dll"); Assert.True(File.Exists(expectedAssetPath)); @@ -734,7 +760,7 @@ public void PublishRelease_interacts_similarly_with_PublishProfile_Configuration var rid = EnvironmentInfo.GetCompatibleRid(tfm); var helloWorldAsset = _testAssetsManager - .CopyTestAsset("HelloWorld", "PublishReleaseHelloWorldCsProjPublishProfile") + .CopyTestAsset("HelloWorld", $"PublishReleaseHelloWorldCsProjPublishProfile{config}") .WithSource() .WithTargetFramework(ToolsetInfo.CurrentTargetFramework) .WithProjectChanges(project => diff --git a/src/Tests/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs b/src/Tests/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs index 6f166254055d..c7f439774a27 100644 --- a/src/Tests/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs +++ b/src/Tests/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs @@ -99,6 +99,24 @@ public void ItDoesNotImplicitlyRestoreAProjectWhenPublishingWithTheNoRestoreOpti .And.HaveStdOutContaining("project.assets.json"); } + [Theory] + [InlineData("publish", "-property", "Configuration=Debug")] + [InlineData("publish", "-p", "Configuration=Debug")] + [InlineData("publish", "--property", "Configuration=Debug")] + public void ItParsesSpacedPropertiesInPublishReleaseEvaluationPhase(string command, string propertyKey, string propertyVal) + { + var testInstance = _testAssetsManager.CopyTestAsset("TestAppSimple") + .WithSource() + .Restore(Log); + + var rootDir = testInstance.Path; + + new DotnetCommand(Log) + .WithWorkingDirectory(rootDir) + .Execute(command, propertyKey, propertyVal) + .Should().Pass().And.NotHaveStdErr(); + } + [Theory] [InlineData(null)] [InlineData("--sc")] From f37556f9aa1f12056df0ccc2fa4fcfafe0e089fc Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 23 Sep 2022 02:20:55 +0000 Subject: [PATCH 138/185] Update dependencies from https://github.com/dotnet/runtime build 20220922.3 Microsoft.DotNet.ILCompiler , Microsoft.Extensions.DependencyModel , Microsoft.NET.HostModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.Platforms , System.CodeDom , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , VS.Redist.Common.NetCore.SharedFramework.x64.7.0 , VS.Redist.Common.NetCore.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22471.7 -> To Version 7.0.0-rc.2.22472.3 --- eng/Version.Details.xml | 60 ++++++++++++++++++++--------------------- eng/Versions.props | 24 ++++++++--------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1c70bb6b0f7f..7d0d4e03e3f4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -6,41 +6,41 @@ fa746f97346c696a4453b4a37a98b2400d56d540 - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe https://github.com/dotnet/msbuild @@ -114,30 +114,30 @@ 5f9bfd94d9c687207872ae03f751ea19704381c0 - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe https://github.com/dotnet/linker 5f9bfd94d9c687207872ae03f751ea19704381c0 - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe https://github.com/dotnet/windowsdesktop @@ -284,9 +284,9 @@ https://github.com/dotnet/arcade 720af493900b2f2bdc48e9ee12577983a5c9be36 - + https://github.com/dotnet/runtime - 132f2974df922004c6af85dfdf2c182cc0d07aa1 + 550605cc93d9b903c4fbaf8f1f83e387d2f79dbe https://github.com/dotnet/xliff-tasks diff --git a/eng/Versions.props b/eng/Versions.props index 7e1e5a4e2b1a..4669aa82484b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,12 +35,12 @@ 6.0.0 7.0.0-beta.22464.4 7.0.0-preview.22423.2 - 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22472.3 4.3.0 4.3.0 4.0.5 6.0.0 - 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22472.3 4.6.0 2.0.0-beta4.22402.1 1.0.0-preview5.1.22263.1 @@ -48,13 +48,13 @@ - 7.0.0-rc.2.22471.7 - 7.0.0-rc.2.22471.7 - 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22472.3 + 7.0.0-rc.2.22472.3 + 7.0.0-rc.2.22472.3 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) - 7.0.0-rc.2.22471.7 - 7.0.0-rc.2.22471.7 - 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22472.3 + 7.0.0-rc.2.22472.3 + 7.0.0-rc.2.22472.3 6.0.0-preview.7.21363.9 $(MicrosoftExtensionsDependencyModelPackageVersion) 6.0.0 @@ -90,10 +90,10 @@ - 7.0.0-rc.2.22471.7 - 7.0.0-rc.2.22471.7 - 7.0.0-rc.2.22471.7 - 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22472.3 + 7.0.0-rc.2.22472.3 + 7.0.0-rc.2.22472.3 + 7.0.0-rc.2.22472.3 From e6c45b7c352bbacfa1216a87f08e6e621f1269c5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 23 Sep 2022 04:59:46 +0000 Subject: [PATCH 139/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20220922.10 Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22471.7 -> To Version 7.0.0-rc.2.22472.10 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 7.0.0-rc.2.22471.7 -> To Version 7.0.0-rc.2.22472.8 (parent: Microsoft.WindowsDesktop.App.Ref --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1c70bb6b0f7f..914417e1e9dd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -139,25 +139,25 @@ https://github.com/dotnet/runtime 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/windowsdesktop - 530d99d4abbd876bdce09440b08d7d1c159345ab + 5f420ca9a9a3ec694dc7ac29c3863880b07ba871 - + https://github.com/dotnet/windowsdesktop - 530d99d4abbd876bdce09440b08d7d1c159345ab + 5f420ca9a9a3ec694dc7ac29c3863880b07ba871 - + https://github.com/dotnet/windowsdesktop - 530d99d4abbd876bdce09440b08d7d1c159345ab + 5f420ca9a9a3ec694dc7ac29c3863880b07ba871 - + https://github.com/dotnet/windowsdesktop - 530d99d4abbd876bdce09440b08d7d1c159345ab + 5f420ca9a9a3ec694dc7ac29c3863880b07ba871 - + https://github.com/dotnet/wpf - 86014c685bfd664ae185b236188980455ccc83e5 + 521541248d070017530e46fd968e1c6f65b73230 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 7e1e5a4e2b1a..110d3f3c9c9a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -167,7 +167,7 @@ - 7.0.0-rc.2.22471.7 + 7.0.0-rc.2.22472.8 From 4ae4d4f165a8134b8f1142f20b9139e701a75027 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 23 Sep 2022 08:06:51 +0000 Subject: [PATCH 140/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20220922.13 Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0-rc.2.22471.7 -> To Version 7.0.0-rc.2.22472.13 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 7.0.0-rc.2.22471.7 -> To Version 7.0.0-rc.2.22472.9 (parent: Microsoft.WindowsDesktop.App.Ref --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 914417e1e9dd..c1356b841c0e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -139,25 +139,25 @@ https://github.com/dotnet/runtime 132f2974df922004c6af85dfdf2c182cc0d07aa1 - + https://github.com/dotnet/windowsdesktop - 5f420ca9a9a3ec694dc7ac29c3863880b07ba871 + 50c77e366492856d6ac854e6b1a2e8ca4675aa12 - + https://github.com/dotnet/windowsdesktop - 5f420ca9a9a3ec694dc7ac29c3863880b07ba871 + 50c77e366492856d6ac854e6b1a2e8ca4675aa12 - + https://github.com/dotnet/windowsdesktop - 5f420ca9a9a3ec694dc7ac29c3863880b07ba871 + 50c77e366492856d6ac854e6b1a2e8ca4675aa12 - + https://github.com/dotnet/windowsdesktop - 5f420ca9a9a3ec694dc7ac29c3863880b07ba871 + 50c77e366492856d6ac854e6b1a2e8ca4675aa12 - + https://github.com/dotnet/wpf - 521541248d070017530e46fd968e1c6f65b73230 + 7ac25017197ea1f7906e189d1479717c6fb12298 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 110d3f3c9c9a..2d77a62a2916 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -167,7 +167,7 @@ - 7.0.0-rc.2.22472.8 + 7.0.0-rc.2.22472.9 From 7311a594238baf45e25438bcc30fac07563a6317 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 23 Sep 2022 09:03:46 +0000 Subject: [PATCH 141/185] Update dependencies from https://github.com/dotnet/templating build 20220923.1 Microsoft.TemplateEngine.Abstractions From Version 7.0.100-rc.2.22471.7 -> To Version 7.0.100-rc.2.22473.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1c70bb6b0f7f..4231a648f5ff 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,9 +1,9 @@ - + https://github.com/dotnet/templating - fa746f97346c696a4453b4a37a98b2400d56d540 + f7c2dea3772e234107c453b642beb6b1f69af407 diff --git a/eng/Versions.props b/eng/Versions.props index 7e1e5a4e2b1a..fd306c110bb7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -125,7 +125,7 @@ - 7.0.100-rc.2.22471.7 + 7.0.100-rc.2.22473.1 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) From d41dac7effaa8cbcfefef80587e5c261805dff87 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 23 Sep 2022 16:02:24 +0000 Subject: [PATCH 142/185] Update dependencies from https://github.com/dotnet/fsharp build 20220923.1 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 7.0.0-beta.22471.6 -> To Version 7.0.0-beta.22473.1 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1c70bb6b0f7f..6eabda69a4cc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -50,13 +50,13 @@ https://github.com/dotnet/msbuild cc3db358d34ad4cd1ec0c67e17582d7ca2a15040 - + https://github.com/dotnet/fsharp - de216eb65d741d01aff5d32a4bdc495ca730290a + 1d7f0abd1b52a9ff44fc5742c98908633011f0a1 - + https://github.com/dotnet/fsharp - de216eb65d741d01aff5d32a4bdc495ca730290a + 1d7f0abd1b52a9ff44fc5742c98908633011f0a1 diff --git a/eng/Versions.props b/eng/Versions.props index 7e1e5a4e2b1a..0349f47d56f1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -136,7 +136,7 @@ - 12.0.5-beta.22471.6 + 12.0.5-beta.22473.1 From b5063147c14aff515a033bc89364af55a387957f Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Mon, 26 Sep 2022 19:03:38 +0000 Subject: [PATCH 143/185] Merged PR 26141: [internal/release/7.0.1xx-rc2] Update dependencies from dnceng/internal/dotnet-aspnetcore This pull request updates the following dependencies [marker]: <> (Begin:fbc41143-1c57-423d-b8c7-08da91234a73) ## From https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - **Subscription**: fbc41143-1c57-423d-b8c7-08da91234a73 - **Build**: 20220926.2 - **Date Produced**: September 26, 2022 5:00:54 PM UTC - **Commit**: b12b77b241f0a093d53508c3cb2084860bd5339d - **Branch**: refs/heads/internal/release/7.0-rc2 [DependencyUpdate]: <> (Begin) - **Updates**: - **dotnet-dev-certs**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **dotnet-user-jwts**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **dotnet-user-secrets**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.AspNetCore.Analyzers**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.AspNetCore.App.Ref**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.AspNetCore.App.Ref.Internal**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.AspNetCore.App.Runtime.win-x64**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.AspNetCore.Authorization**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.AspNetCore.Components.SdkAnalyzers**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.AspNetCore.Components.Web**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.AspNetCore.DeveloperCertificates.XPlat**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.AspNetCore.Mvc.Analyzers**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.AspNetCore.Mvc.Api.Analyzers**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.AspNetCore.TestHost**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.Extensions.FileProviders.Embedded**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **Microsoft.JSInterop**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] - **VS.Redist.Common.AspNetCore.SharedFramework.x64.7.0**: [from 7.0.0-rc.2.22471.5 to 7.0.0-rc.2.22476.2][4] [4]: https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore/branches?baseVersion=GC697875c&targetVersion=GCb12b77b&_a=files [DependencyUpdate]: <> (End) [marker]: <> (End:fbc41143-1c57-423d-b8c7-08da91234a73) --- eng/Version.Details.xml | 68 ++++++++++++++++++++--------------------- eng/Versions.props | 12 ++++---- eng/build.yml | 8 ++--- 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index cb98f0cd5ba5..5e786d412b51 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -93,13 +93,13 @@ https://github.com/dotnet/roslyn 7a48ae565f3c36155fc8f606384e20b2a54f98c8 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted @@ -159,50 +159,50 @@ https://github.com/dotnet/wpf 7ac25017197ea1f7906e189d1479717c6fb12298 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d https://github.com/dotnet/razor-compiler @@ -221,21 +221,21 @@ https://github.com/dotnet/razor-compiler 883416c9d9ec221a9d73e62de093a43f2e2daf90 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 697875ce4d26f24ba72fdf6d4e35949f69cfe293 + b12b77b241f0a093d53508c3cb2084860bd5339d https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index e5146f4c87cb..276285ecd856 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -151,12 +151,12 @@ - 7.0.0-rc.2.22471.5 - 7.0.0-rc.2.22471.5 - 7.0.0-rc.2.22471.5 - 7.0.0-rc.2.22471.5 - 7.0.0-rc.2.22471.5 - 7.0.0-rc.2.22471.5 + 7.0.0-rc.2.22476.2 + 7.0.0-rc.2.22476.2 + 7.0.0-rc.2.22476.2 + 7.0.0-rc.2.22476.2 + 7.0.0-rc.2.22476.2 + 7.0.0-rc.2.22476.2 diff --git a/eng/build.yml b/eng/build.yml index 2c0dcc05761a..68a11abe15dd 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -79,7 +79,7 @@ jobs: env: BuildConfig: $(_BuildConfig) SYSTEM_ACCESSTOKEN: $(System.AccessToken) - HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixAccessToken: $(_HelixApiToken) - powershell: eng\common\build.ps1 -configuration $(_BuildConfig) -prepareMachine @@ -109,7 +109,7 @@ jobs: BuildConfig: $(_BuildConfig) TestFullMSBuild: 'true' SYSTEM_ACCESSTOKEN: $(System.AccessToken) - HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixAccessToken: $(_HelixApiToken) - powershell: eng\common\build.ps1 -configuration $(_BuildConfig) -prepareMachine @@ -253,7 +253,7 @@ jobs: env: BuildConfig: $(_BuildConfig) SYSTEM_ACCESSTOKEN: $(System.AccessToken) - HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixAccessToken: $(_HelixApiToken) - script: $(Build.SourcesDirectory)/artifacts/bin/redist/$(_BuildConfig)/dotnet/dotnet workload install wasm-tools --skip-manifest-update displayName: Install wasm-tools Workload continueOnError: false @@ -380,7 +380,7 @@ jobs: env: BuildConfig: $(_BuildConfig) SYSTEM_ACCESSTOKEN: $(System.AccessToken) - HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixAccessToken: $(_HelixApiToken) - powershell: eng\common\build.ps1 -configuration $(_BuildConfig) -prepareMachine From 43c72ef04a47b8a0ebe264d34320386a0389cde4 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Fri, 7 Oct 2022 11:47:13 -0700 Subject: [PATCH 144/185] Set an assembly attribute so we can add an installer test to check for it --- src/Common/CompileOptions.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Common/CompileOptions.cs b/src/Common/CompileOptions.cs index 2ba77d957d5e..05826630636e 100644 --- a/src/Common/CompileOptions.cs +++ b/src/Common/CompileOptions.cs @@ -1,5 +1,10 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System.Reflection; + +#if MICROSOFT_ENABLE_TELEMETRY + [assembly: AssemblyMetadata("OfficialBuilder", "Microsoft")] +#endif namespace Microsoft.DotNet.Cli { From 155b2aee4eb08e6207808d6bb868f640194d7b80 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 7 Oct 2022 22:43:56 +0000 Subject: [PATCH 145/185] Update dependencies from https://github.com/dotnet/roslyn build 20221007.1 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-3.22505.18 -> To Version 4.4.0-3.22507.1 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9c442f05bec7..f974557d9969 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -68,34 +68,34 @@ b4dfe71ccfd40b3c46740471a691b67243c5a70d - + https://github.com/dotnet/roslyn - 6a0bbe19399f7da58f006b25c282c1cd5c5a96eb + 7971633700e06fdd0a46dbae78908582ee533c2a - + https://github.com/dotnet/roslyn - 6a0bbe19399f7da58f006b25c282c1cd5c5a96eb + 7971633700e06fdd0a46dbae78908582ee533c2a - + https://github.com/dotnet/roslyn - 6a0bbe19399f7da58f006b25c282c1cd5c5a96eb + 7971633700e06fdd0a46dbae78908582ee533c2a - + https://github.com/dotnet/roslyn - 6a0bbe19399f7da58f006b25c282c1cd5c5a96eb + 7971633700e06fdd0a46dbae78908582ee533c2a - + https://github.com/dotnet/roslyn - 6a0bbe19399f7da58f006b25c282c1cd5c5a96eb + 7971633700e06fdd0a46dbae78908582ee533c2a - + https://github.com/dotnet/roslyn - 6a0bbe19399f7da58f006b25c282c1cd5c5a96eb + 7971633700e06fdd0a46dbae78908582ee533c2a - + https://github.com/dotnet/roslyn - 6a0bbe19399f7da58f006b25c282c1cd5c5a96eb + 7971633700e06fdd0a46dbae78908582ee533c2a https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index b5919bc43992..90de7f51a38c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -141,13 +141,13 @@ - 4.4.0-3.22505.18 - 4.4.0-3.22505.18 - 4.4.0-3.22505.18 - 4.4.0-3.22505.18 - 4.4.0-3.22505.18 - 4.4.0-3.22505.18 - 4.4.0-3.22505.18 + 4.4.0-3.22507.1 + 4.4.0-3.22507.1 + 4.4.0-3.22507.1 + 4.4.0-3.22507.1 + 4.4.0-3.22507.1 + 4.4.0-3.22507.1 + 4.4.0-3.22507.1 $(MicrosoftNetCompilersToolsetPackageVersion) From ef9e68833606b33edafa4cd8fded35378fed32ee Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 7 Oct 2022 23:06:25 +0000 Subject: [PATCH 146/185] Update dependencies from https://github.com/dotnet/format build 20221007.1 dotnet-format From Version 7.0.350601 -> To Version 7.0.350701 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9c442f05bec7..c15eacad9eaf 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -63,9 +63,9 @@ 532a074f9b304325d8bcd554ac73a1183b74a8f0 - + https://github.com/dotnet/format - b4dfe71ccfd40b3c46740471a691b67243c5a70d + 32d497c2b0fa26dc0262324112023b0fbcff37cf diff --git a/eng/Versions.props b/eng/Versions.props index b5919bc43992..4f4ae565dad4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -98,7 +98,7 @@ - 7.0.350601 + 7.0.350701 From 497c89a7e3952575ae8bc67b56cd9a0ecb3b6857 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 7 Oct 2022 23:52:17 +0000 Subject: [PATCH 147/185] Update dependencies from https://github.com/dotnet/command-line-api build 20221004.1 Microsoft.SourceBuild.Intermediate.command-line-api , System.CommandLine From Version 0.1.340201 -> To Version 0.1.350401 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9c442f05bec7..ebd03cb66e49 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -255,13 +255,13 @@ 846a766f73caa82608db6fee9f2860004298449f - + https://github.com/dotnet/command-line-api - 4b605851d45131db2374ba711f2443040521d702 + c776cd4e906b669b9cce1017fee7d0ba9845d163 - + https://github.com/dotnet/command-line-api - 4b605851d45131db2374ba711f2443040521d702 + c776cd4e906b669b9cce1017fee7d0ba9845d163 diff --git a/eng/Versions.props b/eng/Versions.props index b5919bc43992..095a5c864ac7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,7 +43,7 @@ 6.0.0 7.0.0-rtm.22507.1 4.6.0 - 2.0.0-beta4.22402.1 + 2.0.0-beta4.22504.1 1.0.0-preview5.1.22263.1 3.0.4496 From 331ffa5a4c531af71be17a531da21fc1ddcd0f8a Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Mon, 10 Oct 2022 10:29:12 -0700 Subject: [PATCH 148/185] Reference net7.0 version of msbuild for source-build --- eng/Versions.props | 2 +- .../Microsoft.DotNet.Cli.Utils.csproj | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 90de7f51a38c..2c7b24fda237 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -112,7 +112,7 @@ so target one that matches the version in minimumMSBuildVersion. This avoids the need to juggle references to packages that have been updated in newer MSBuild. --> - $([System.IO.File]::ReadAllText('$(RepoRoot)\src\Layout\redist\minimumMSBuildVersion').Trim()) + $([System.IO.File]::ReadAllText('$(RepoRoot)\src\Layout\redist\minimumMSBuildVersion').Trim()) $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) 17.5.0-preview-22507-04 diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj b/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj index 03ea923734ef..b954e2c4659d 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj @@ -21,8 +21,12 @@ + $(PkgMicrosoft_Build_Runtime)\contentFiles\any\net6.0\MSBuild.dll + $(PkgMicrosoft_Build_Runtime)\contentFiles\any\net7.0\MSBuild.dll From 4b63008c225682c77b8a0c4d8a745a2998a4c807 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 10 Oct 2022 18:00:42 +0000 Subject: [PATCH 149/185] Update dependencies from https://github.com/dotnet/aspnetcore build 20221010.2 dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.JSInterop , VS.Redist.Common.AspNetCore.SharedFramework.x64.7.0 From Version 7.0.0-rtm.22504.29 -> To Version 7.0.0-rtm.22510.2 --- eng/Version.Details.xml | 68 ++++++++++++++++++++--------------------- eng/Versions.props | 12 ++++---- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f974557d9969..88bb68401cfa 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -97,13 +97,13 @@ https://github.com/dotnet/roslyn 7971633700e06fdd0a46dbae78908582ee533c2a - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 https://github.com/nuget/nuget.client @@ -163,50 +163,50 @@ https://github.com/dotnet/wpf 8091341440149a2ff67ed5af6efbb43c349ee537 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 https://github.com/dotnet/razor-compiler @@ -225,21 +225,21 @@ https://github.com/dotnet/razor-compiler a41514681a4db83c7cae7e17debf668d12efc1bb - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 - + https://github.com/dotnet/aspnetcore - 2651d9202b0bf5fdd081930cd7a4438ced351410 + 9ddd2c08647465567262d96a82278eea41ef0101 https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index 90de7f51a38c..de064932d152 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -152,12 +152,12 @@ - 7.0.0-rtm.22504.29 - 7.0.0-rtm.22504.29 - 7.0.0-rtm.22504.29 - 7.0.0-rtm.22504.29 - 7.0.0-rtm.22504.29 - 7.0.0-rtm.22504.29 + 7.0.0-rtm.22510.2 + 7.0.0-rtm.22510.2 + 7.0.0-rtm.22510.2 + 7.0.0-rtm.22510.2 + 7.0.0-rtm.22510.2 + 7.0.0-rtm.22510.2 From f9280d1aafb6735d0f2df431b4e05de365d0c793 Mon Sep 17 00:00:00 2001 From: Akhil Indurti Date: Mon, 10 Oct 2022 14:53:43 -0400 Subject: [PATCH 150/185] [release/7.0.1xx] backport APICompat changes for GA (#28404) This backport consists of 5 changes: 1. c3f9e6dc9740f5de469d41c027dbe5775d1bf052: apicompat: add rule to check change in visibility 2. 5627049bf3fee6912617604588dfff600a855a4d: don't emit attribute added diagnostic in strict mode 3. a9179759a3fdefd9ccb55763bdd6afc367c425a9: don't issue diagnostic when virtual is removed from sealed type 4. ac6cd3913898e579b620b8b07c60783821686db7: apicompat: attribute changed on right must only be emitted in strict mode 5. 8f9568fa6bd20797915d35cf6acff0977e370a20: normalize accessibility when not including internal symbols ## Customer Impact TL;DR Rules behave correctly in strict mode and when internal members are excluded. Previously, the attribute rule was emitting strict-mode diagnostics even outside strict mode. Additionally, internal members were not being excluded from analysis even when specified. These issues caused many false positive diagnostics to be emitted. The backported changes fix this behavior by taking these modes into account. The new visibility change rule was announced for .NET 7, and also maintains parity with the legacy APICompat tool. ## Testing All ApiCompat rules tests pass. The runtime built with this backport branch no longer emits false positive diagnostics. ## Risk Low-Medium. Only affects users who are consuming the opt-in attribute and virtual modifier rules. Additionally, a new rule is added, but it shouldn't affect customers who aren't comparing in strict mode. --- .../DiagnosticIds.cs | 2 + .../Resources.resx | 6 + .../Rules/AttributesMustMatch.cs | 16 +- .../Rules/CannotAddOrRemoveVirtualKeyword.cs | 7 + .../Rules/CannotChangeVisibility.cs | 115 ++++ .../Rules/RuleFactory.cs | 3 +- .../xlf/Resources.cs.xlf | 10 + .../xlf/Resources.de.xlf | 10 + .../xlf/Resources.es.xlf | 10 + .../xlf/Resources.fr.xlf | 10 + .../xlf/Resources.it.xlf | 10 + .../xlf/Resources.ja.xlf | 10 + .../xlf/Resources.ko.xlf | 10 + .../xlf/Resources.pl.xlf | 10 + .../xlf/Resources.pt-BR.xlf | 10 + .../xlf/Resources.ru.xlf | 10 + .../xlf/Resources.tr.xlf | 10 + .../xlf/Resources.zh-Hans.xlf | 10 + .../xlf/Resources.zh-Hant.xlf | 10 + .../Rules/AttributesMustMatchTests.cs | 644 +++++++++++++++++- .../CannotAddOrRemoveVirtualKeywordTests.cs | 7 + .../Rules/CannotChangeVisibilityTests.cs | 426 ++++++++++++ 22 files changed, 1331 insertions(+), 25 deletions(-) create mode 100644 src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotChangeVisibility.cs create mode 100644 src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeVisibilityTests.cs diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DiagnosticIds.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DiagnosticIds.cs index cd86e7d20eb9..ef25359022e4 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DiagnosticIds.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DiagnosticIds.cs @@ -26,6 +26,8 @@ public static class DiagnosticIds public const string CannotAddAttribute = "CP0016"; public const string CannotChangeParameterName = "CP0017"; public const string CannotAddSealedToInterfaceMember = "CP0018"; + public const string CannotReduceVisibility = "CP0019"; + public const string CannotExpandVisibility = "CP0020"; // Assembly loading ids public const string AssemblyNotFound = "CP1001"; diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Resources.resx b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Resources.resx index 7473dcfa8549..9d810ecb933a 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Resources.resx +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Resources.resx @@ -240,4 +240,10 @@ Cannot add sealed keyword to default interface member '{0}'. + + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + \ No newline at end of file diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AttributesMustMatch.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AttributesMustMatch.cs index bd078b4874d4..d4e8ff594acd 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AttributesMustMatch.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AttributesMustMatch.cs @@ -62,6 +62,11 @@ private void AddDifference(IList differences, DifferenceType d return; } + if (!_settings.StrictMode && dt == DifferenceType.Added) + { + return; + } + CompatDifference difference = dt switch { DifferenceType.Changed => new CompatDifference( @@ -167,10 +172,17 @@ private void ReportAttributeDifferences(ISymbol containing, for (int i = 0; i < rightGroup.Attributes.Count; i++) { - if (!rightGroup.Seen[i]) + if (!rightGroup.Seen[i] && _settings.StrictMode) { // Attribute arguments exist on right but not left. - // Issue "changed" diagnostic. + // Left + // [Foo("a")] + // void F() + // Right + // [Foo("a")] + // [Foo("b")] + // void F() + // Issue "changed" diagnostic when in strict mode. AddDifference(differences, DifferenceType.Changed, leftMetadata, rightMetadata, containing, itemRef, rightGroup.Attributes[i]); } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddOrRemoveVirtualKeyword.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddOrRemoveVirtualKeyword.cs index a2be104545fe..1bb7d5ad2198 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddOrRemoveVirtualKeyword.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddOrRemoveVirtualKeyword.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.DotNet.ApiCompatibility.Abstractions; +using Microsoft.DotNet.ApiCompatibility.Extensions; namespace Microsoft.DotNet.ApiCompatibility.Rules { @@ -50,6 +51,12 @@ private void RunOnMemberSymbol(ISymbol? left, ISymbol? right, ITypeSymbol leftCo if (left.IsVirtual) { + // Removing the virtual keyword from a member in a sealed type won't be a breaking change. + if (leftContainingType.IsEffectivelySealed(_settings.IncludeInternalSymbols)) + { + return; + } + // If left is virtual and right is not, then emit a diagnostic // specifying that the virtual modifier cannot be removed. if (!right.IsVirtual) diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotChangeVisibility.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotChangeVisibility.cs new file mode 100644 index 000000000000..5a5ffcd950e2 --- /dev/null +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotChangeVisibility.cs @@ -0,0 +1,115 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using System.Runtime; +using Microsoft.CodeAnalysis; +using Microsoft.DotNet.ApiCompatibility.Abstractions; +using Microsoft.DotNet.ApiCompatibility.Extensions; + +namespace Microsoft.DotNet.ApiCompatibility.Rules +{ + /// + /// This class implements a rule to check that the visibility of symbols is not reduced. + /// In strict mode, it also checks that the visibility isn't expanded. + /// + public class CannotChangeVisibility : IRule + { + private readonly RuleSettings _settings; + + public CannotChangeVisibility(RuleSettings settings, IRuleRegistrationContext context) + { + _settings = settings; + context.RegisterOnMemberSymbolAction(RunOnMemberSymbol); + context.RegisterOnTypeSymbolAction(RunOnTypeSymbol); + } + + private static Accessibility NormalizeInternals(Accessibility a) => a switch + { + Accessibility.ProtectedOrInternal => Accessibility.Protected, + Accessibility.ProtectedAndInternal or Accessibility.Internal => Accessibility.Private, + _ => a, + }; + + private int CompareAccessibility(Accessibility a, Accessibility b) + { + if (!_settings.IncludeInternalSymbols) + { + a = NormalizeInternals(a); + b = NormalizeInternals(b); + } + + if (a == b) + { + return 0; + } + + return (a, b) switch + { + (Accessibility.Public, _) => 1, + (_, Accessibility.Public) => -1, + (Accessibility.ProtectedOrInternal, _) => 1, + (_, Accessibility.ProtectedOrInternal) => -1, + (Accessibility.Protected or Accessibility.Internal, _) => 1, + (_, Accessibility.Protected or Accessibility.Internal) => -1, + (Accessibility.ProtectedAndInternal, _) => 1, + (_, Accessibility.ProtectedAndInternal) => -1, + _ => throw new NotImplementedException(), + }; + } + + private void RunOnSymbol( + ISymbol? left, + ISymbol? right, + MetadataInformation leftMetadata, + MetadataInformation rightMetadata, + IList differences) + { + // The MemberMustExist rule handles missing symbols and therefore this rule only runs when left and right is not null. + if (left is null || right is null) + { + return; + } + + Accessibility leftAccess = left.DeclaredAccessibility; + Accessibility rightAccess = right.DeclaredAccessibility; + int accessComparison = CompareAccessibility(leftAccess, rightAccess); + + if (accessComparison > 0) + { + differences.Add(new CompatDifference(leftMetadata, + rightMetadata, + DiagnosticIds.CannotReduceVisibility, + string.Format(Resources.CannotReduceVisibility, left, leftAccess, rightAccess), + DifferenceType.Changed, + left)); + } + else if (_settings.StrictMode && accessComparison < 0) + { + differences.Add(new CompatDifference(leftMetadata, + rightMetadata, + DiagnosticIds.CannotExpandVisibility, + string.Format(Resources.CannotExpandVisibility, right, leftAccess, rightAccess), + DifferenceType.Changed, + right)); + } + } + + private void RunOnTypeSymbol( + ITypeSymbol? left, + ITypeSymbol? right, + MetadataInformation leftMetadata, + MetadataInformation rightMetadata, + IList differences) => RunOnSymbol(left, right, leftMetadata, rightMetadata, differences); + + private void RunOnMemberSymbol( + ISymbol? left, + ISymbol? right, + ITypeSymbol leftContainingType, + ITypeSymbol rightContainingType, + MetadataInformation leftMetadata, + MetadataInformation rightMetadata, + IList differences) => RunOnSymbol(left, right, leftMetadata, rightMetadata, differences); + } +} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleFactory.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleFactory.cs index 341b875bd16e..747a644dca39 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleFactory.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleFactory.cs @@ -39,7 +39,8 @@ public IRule[] CreateRules(RuleSettings settings, IRuleRegistrationContext conte new CannotRemoveBaseTypeOrInterface(settings, context), new CannotSealType(settings, context), new EnumsMustMatch(settings, context), - new MembersMustExist(settings, context) + new MembersMustExist(settings, context), + new CannotChangeVisibility(settings, context) }; if (_enableRuleAttributesMustMatch) diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.cs.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.cs.xlf index 27cc9270a65c..131100e6ca39 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.cs.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.cs.xlf @@ -87,6 +87,16 @@ Název parametru u člena {0} se změnil z {1} na {2}. + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. Atribut {0} nelze odebrat z {1}. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.de.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.de.xlf index 148f10710e5b..d29904e874cf 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.de.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.de.xlf @@ -87,6 +87,16 @@ Der Parametername des Members "{0}" wurde von "{1}" in "{2}" geändert. + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. Das Attribut "{0}" kann nicht aus "{1}" entfernt werden. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.es.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.es.xlf index fc456bf2c297..6721143f8649 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.es.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.es.xlf @@ -87,6 +87,16 @@ El nombre de parámetro del miembro '{0}' cambió de '{1}' a '{2}'. + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. No se puede quitar el atributo '{0}' de '{1}'. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.fr.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.fr.xlf index 6655b69e4083..2ad359cfdc97 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.fr.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.fr.xlf @@ -87,6 +87,16 @@ Le nom du paramètre sur le membre « {0} » est passé de « {1} » à « {2} ». + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. Impossible de supprimer l’attribut « {0} » de « {1} ». diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.it.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.it.xlf index c36c61b78cff..289caf6c8a81 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.it.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.it.xlf @@ -87,6 +87,16 @@ Il nome del parametro nel membro '{0}' è stato modificato da '{1}' a '{2}'. + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. Non è possibile rimuovere l'attributo '{0}' da '{1}'. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ja.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ja.xlf index f9df9120294d..6acabcccea94 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ja.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ja.xlf @@ -87,6 +87,16 @@ メンバー '{0}' のパラメーター名が '{1}' から '{2}' に変更されました。 + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. 属性 '{0}' を '{1}' から削除できません。 diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ko.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ko.xlf index 2b3f366bad4e..60517def4b2b 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ko.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ko.xlf @@ -87,6 +87,16 @@ 멤버 '{0}'의 매개 변수 이름이 '{1}'에서 '{2}'(으)로 변경되었습니다. + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. '{1}'에서 특성 '{0}'을(를) 제거할 수 없습니다. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pl.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pl.xlf index e30706482074..490b7be942b1 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pl.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pl.xlf @@ -87,6 +87,16 @@ Nazwa parametru elementu członkowskiego „{0}” została zmieniona z „{1}” na „{2}”. + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. Nie można usunąć atrybutu „{0}” z elementu „{1}”. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pt-BR.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pt-BR.xlf index a7bac27d9eb1..13b6c11d7070 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pt-BR.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pt-BR.xlf @@ -87,6 +87,16 @@ Nome do parâmetro no membro '{0}' alterado de '{1}' para '{2}'. + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. Não é possível remover o atributo '{0}' de '{1}'. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ru.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ru.xlf index 128fe9f46c58..cc5d247c856f 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ru.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ru.xlf @@ -87,6 +87,16 @@ Имя параметра на члене "{0}" изменено с "{1}" на "{2}". + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. Не удается удалить атрибут "{0}" из "{1}". diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.tr.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.tr.xlf index da71a633b1ea..9e2b91f92e5d 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.tr.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.tr.xlf @@ -87,6 +87,16 @@ '{0}' üyesinin parametre adı '{1}' iken '{2}' olarak değiştirildi. + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. '{0}' özniteliği '{1}' sınıfından kaldırılamıyor. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hans.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hans.xlf index d8ccd28402ec..1ff387a8d4aa 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hans.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hans.xlf @@ -87,6 +87,16 @@ 成员 "{0}" 上的参数名称已从 "{1}" 更改为 "{2}"。 + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. 无法从 "{1}" 中删除属性 "{0}"。 diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hant.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hant.xlf index c6e3479330c8..caa004f4c38f 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hant.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hant.xlf @@ -87,6 +87,16 @@ 成員 '{0}' 上的參數名稱從 '{1}' 變更為 '{2}'。 + + Visibility of '{0}' expanded from '{1}' to '{2}'. + Visibility of '{0}' expanded from '{1}' to '{2}'. + + + + Visibility of '{0}' reduced from '{1}' to '{2}'. + Visibility of '{0}' reduced from '{1}' to '{2}'. + + Cannot remove attribute '{0}' from '{1}'. 無法從 '{1}' 移除屬性 '{0}'。 diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AttributesMustMatchTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AttributesMustMatchTests.cs index 71f8dcab2fb0..2792a391b650 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AttributesMustMatchTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AttributesMustMatchTests.cs @@ -147,6 +147,46 @@ public class First {} CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "T:CompatTests.First:[T:CompatTests.FooAttribute]") } }, + // Attribute repeated with additional arguments + { + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A; + public int B; + } + + [Serializable] + [Foo(""S"")] + public class First {} +} +", + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A; + public int B; + } + + [Serializable] + [Foo(""S"")] + [Foo(""T"")] + public class First {} +} +", +new CompatDifference[] {} + }, + // Attribute added to type { @" @@ -182,9 +222,7 @@ public FooAttribute(String s) {} public class First {} } ", -new CompatDifference[] { - CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "T:CompatTests.First:[T:System.SerializableAttribute]") -} +new CompatDifference[] {} }, // Attributes with array and type arguments { @@ -321,7 +359,6 @@ public void F() {} new CompatDifference[] { CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "M:CompatTests.First.F:[T:CompatTests.FooAttribute]"), CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "M:CompatTests.First.F:[T:CompatTests.BarAttribute]"), - CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "M:CompatTests.First.F:[T:CompatTests.BazAttribute]") } }, // Attributes on property @@ -381,7 +418,6 @@ public class First { new CompatDifference[] { CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "P:CompatTests.First.F:[T:CompatTests.FooAttribute]"), CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "P:CompatTests.First.F:[T:CompatTests.BarAttribute]"), - CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "P:CompatTests.First.F:[T:CompatTests.BazAttribute]") } }, // Attributes on event @@ -445,7 +481,6 @@ public class First { new CompatDifference[] { CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "E:CompatTests.First.F:[T:CompatTests.FooAttribute]"), CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "E:CompatTests.First.F:[T:CompatTests.BarAttribute]"), - CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "E:CompatTests.First.F:[T:CompatTests.BazAttribute]") } }, // Attributes on constructor @@ -505,7 +540,6 @@ public First() {} new CompatDifference[] { CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "M:CompatTests.First.#ctor:[T:CompatTests.FooAttribute]"), CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "M:CompatTests.First.#ctor:[T:CompatTests.BarAttribute]"), - CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "M:CompatTests.First.#ctor:[T:CompatTests.BazAttribute]") } }, // Attributes on return type @@ -565,7 +599,6 @@ public class First { new CompatDifference[] { CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "M:CompatTests.First.F->int:[T:CompatTests.FooAttribute]"), CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "M:CompatTests.First.F->int:[T:CompatTests.BarAttribute]"), - CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "M:CompatTests.First.F->int:[T:CompatTests.BazAttribute]") } }, // Attributes on method parameter @@ -620,7 +653,6 @@ public void F([Baz] int v, [Foo(""T"")] string s) {} ", new CompatDifference[] { CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "M:CompatTests.First.F(System.Int32,System.String)$0:[T:CompatTests.BarAttribute]"), - CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "M:CompatTests.First.F(System.Int32,System.String)$0:[T:CompatTests.BazAttribute]"), CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "M:CompatTests.First.F(System.Int32,System.String)$1:[T:CompatTests.FooAttribute]"), } @@ -671,7 +703,6 @@ public class First<[Baz] T1, [Foo(""T"")] T2> {} ", new CompatDifference[] { CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "T:CompatTests.First`2<0>:[T:CompatTests.BarAttribute]"), - CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "T:CompatTests.First`2<0>:[T:CompatTests.BazAttribute]"), CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "T:CompatTests.First`2<1>:[T:CompatTests.FooAttribute]"), } @@ -728,25 +759,594 @@ public class First { ", new CompatDifference[] { CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "M:CompatTests.First.F``2<0>:[T:CompatTests.BarAttribute]"), - CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "M:CompatTests.First.F``2<0>:[T:CompatTests.BazAttribute]"), CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "M:CompatTests.First.F``2<1>:[T:CompatTests.FooAttribute]"), } } }; - [Theory] - [MemberData(nameof(TypesCases))] - [MemberData(nameof(MembersCases))] - public void EnsureDiagnosticIsReported(string leftSyntax, string rightSyntax, CompatDifference[] expected) + public static TheoryData StrictMode => new() { - using TempDirectory root = new(); - string filePath = Path.Combine(root.DirPath, "exclusions.txt"); - File.Create(filePath).Dispose(); - TestRuleFactory s_ruleFactory = new((settings, context) => new AttributesMustMatch(settings, context, new[] { filePath })); - IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); - IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(s_ruleFactory); + // Attribute added to type + { + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A; + public int B; + } + + [Foo(""S"", A = true, B = 3)] + public class First {} +} +", + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A; + public int B; + } + + [Serializable] + [Foo(""S"", A = true, B = 3)] + public class First {} +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "T:CompatTests.First:[T:System.SerializableAttribute]") +} + }, + // Attribute repeated with additional arguments + { + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A; + public int B; + } + + [Serializable] + [Foo(""S"")] + public class First {} +} +", + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A; + public int B; + } + + [Serializable] + [Foo(""S"")] + [Foo(""T"")] + public class First {} +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "T:CompatTests.First:[T:CompatTests.FooAttribute]") +} + }, + // Attributes on method + { + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A; + public int B; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + [Foo(""S"", A = true, B = 3)] + [Bar] + public void F() {} + } +} +", + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A = false; + public int B = 0; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + [Foo(""T"")] + [Baz] + public void F() {} + } +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "M:CompatTests.First.F:[T:CompatTests.FooAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "M:CompatTests.First.F:[T:CompatTests.BarAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "M:CompatTests.First.F:[T:CompatTests.BazAttribute]") +} + }, + // Attributes on property + { + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A; + public int B; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + [Foo(""S"", A = true, B = 3)] + [Bar] + public int F { get; } + } +} +", + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A = false; + public int B = 0; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + [Foo(""T"")] + [Baz] + public int F { get; } + } +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "P:CompatTests.First.F:[T:CompatTests.FooAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "P:CompatTests.First.F:[T:CompatTests.BarAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "P:CompatTests.First.F:[T:CompatTests.BazAttribute]") +} + }, + // Attributes on event + { + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A; + public int B; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + public delegate void EventHandler(object sender, object e); + + [Foo(""S"", A = true, B = 3)] + [Bar] + public event EventHandler F; + } +} +", + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A = false; + public int B = 0; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + public delegate void EventHandler(object sender, object e); + + [Foo(""T"")] + [Baz] + public event EventHandler F; + } +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "E:CompatTests.First.F:[T:CompatTests.FooAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "E:CompatTests.First.F:[T:CompatTests.BarAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "E:CompatTests.First.F:[T:CompatTests.BazAttribute]") +} + }, + // Attributes on constructor + { + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A; + public int B; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + [Foo(""S"", A = true, B = 3)] + [Bar] + public First() {} + } +} +", + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A = false; + public int B = 0; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + [Foo(""T"")] + [Baz] + public First() {} + } +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "M:CompatTests.First.#ctor:[T:CompatTests.FooAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "M:CompatTests.First.#ctor:[T:CompatTests.BarAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "M:CompatTests.First.#ctor:[T:CompatTests.BazAttribute]") +} + }, + // Attributes on return type + { + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A; + public int B; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + [return: Foo(""S"", A = true, B = 3)] + [return: Bar] + public int F() => 0; + } +} +", + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A = false; + public int B = 0; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + [return: Foo(""T"")] + [return: Baz] + public int F() => 0; + } +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "M:CompatTests.First.F->int:[T:CompatTests.FooAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "M:CompatTests.First.F->int:[T:CompatTests.BarAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "M:CompatTests.First.F->int:[T:CompatTests.BazAttribute]") +} + }, + // Attributes on method parameter + { + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A = false; + public int B = 0; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + public void F([Bar] int v, [Foo(""S"", A = true, B = 0)] string s) {} + } +} +", + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A = false; + public int B = 0; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + public void F([Baz] int v, [Foo(""T"")] string s) {} + } +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "M:CompatTests.First.F(System.Int32,System.String)$0:[T:CompatTests.BarAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "M:CompatTests.First.F(System.Int32,System.String)$0:[T:CompatTests.BazAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "M:CompatTests.First.F(System.Int32,System.String)$1:[T:CompatTests.FooAttribute]"), + +} + }, + // Attributes on type parameter of class + { + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A = false; + public int B = 0; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First<[Bar] T1, [Foo(""S"", A = true, B = 0)] T2> {} +} +", + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A = false; + public int B = 0; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First<[Baz] T1, [Foo(""T"")] T2> {} +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "T:CompatTests.First`2<0>:[T:CompatTests.BarAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "T:CompatTests.First`2<0>:[T:CompatTests.BazAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "T:CompatTests.First`2<1>:[T:CompatTests.FooAttribute]"), + +} + }, + // Attributes on type parameter of method + { + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A = false; + public int B = 0; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + public void F<[Bar] T1, [Foo(""S"", A = true, B = 0)] T2>() {} + } +} +", + @" +namespace CompatTests +{ + using System; + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class FooAttribute : Attribute { + public FooAttribute(String s) {} + public bool A = false; + public int B = 0; + } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BarAttribute : Attribute { } + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] + public class BazAttribute : Attribute { } + + public class First { + + public void F<[Baz] T1, [Foo(""T"")] T2>() {} + } +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotRemoveAttribute, "", DifferenceType.Removed, "M:CompatTests.First.F``2<0>:[T:CompatTests.BarAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotAddAttribute, "", DifferenceType.Added, "M:CompatTests.First.F``2<0>:[T:CompatTests.BazAttribute]"), + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotChangeAttribute, "", DifferenceType.Changed, "M:CompatTests.First.F``2<1>:[T:CompatTests.FooAttribute]"), + +} + } + }; + + [Theory] + [MemberData(nameof(TypesCases))] + [MemberData(nameof(MembersCases))] + public void EnsureDiagnosticIsReported(string leftSyntax, string rightSyntax, CompatDifference[] expected) + { + using TempDirectory root = new(); + string filePath = Path.Combine(root.DirPath, "exclusions.txt"); + File.Create(filePath).Dispose(); + TestRuleFactory s_ruleFactory = new((settings, context) => new AttributesMustMatch(settings, context, new[] { filePath })); + IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); + IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory); + + IEnumerable actual = differ.GetDifferences(left, right); + + Assert.Equal(expected, actual); + } + + [Theory] + [MemberData(nameof(StrictMode))] + public void EnsureStrictModeReported(string leftSyntax, string rightSyntax, CompatDifference[] expected) + { + using TempDirectory root = new(); + string filePath = Path.Combine(root.DirPath, "exclusions.txt"); + File.Create(filePath).Dispose(); + TestRuleFactory s_ruleFactory = new((settings, context) => new AttributesMustMatch(settings, context, new[] { filePath })); + IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); + IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); IEnumerable actual = differ.GetDifferences(left, right); diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs index 87d9440ed56d..9fe768c6270e 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs @@ -72,6 +72,13 @@ public static IEnumerable RemovedCases() (DifferenceType.Removed, "M:CompatTests.First.remove_F(CompatTests.First.EventHandler)"), (DifferenceType.Removed, "E:CompatTests.First.F")), }; + // effectively sealed containing type + yield return new object[] { + CreateType(" class", "private First() {}", " public virtual void F() {}"), + CreateType(" class", "private First() {}", " public void F() {}"), + false, + CreateDifferences(), + }; } public static IEnumerable AddedCases() diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeVisibilityTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeVisibilityTests.cs new file mode 100644 index 000000000000..3ee2023ee734 --- /dev/null +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeVisibilityTests.cs @@ -0,0 +1,426 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using Microsoft.CodeAnalysis; +using System.Collections.Generic; +using Microsoft.DotNet.ApiCompatibility.Abstractions; +using Microsoft.DotNet.ApiCompatibility.Tests; +using Xunit; + +namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests +{ + public class CannotChangeVisibilityTests + { + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new CannotChangeVisibility(settings, context)); + + /* + * Tests for: + * - Reduce visibility of type + * - Expand visibility of type + * - Expand visibility of member + * - Restricting visibility of protected member inside sealed type + * - Restricting visibility of protected member inside type without accessible constructor + * - Restricting visibility of member + * - Strict mode + */ + + public static TheoryData TestCases => new() + { + // Reduce visibility of type + { + @" +namespace CompatTests +{ + public class First {} +} +", + @" +namespace CompatTests +{ + internal class First {} +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotReduceVisibility, string.Empty, DifferenceType.Changed, "T:CompatTests.First") +} + }, + // Reducing visibility of internal type to protected + { + @" +namespace CompatTests +{ + public class First { + internal int F = 0; + } +} +", + @" +namespace CompatTests +{ + public class First { + protected int F = 0; + } +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotReduceVisibility, string.Empty, DifferenceType.Changed, "F:CompatTests.First.F") +} + }, + // Reducing visibility of protected type to internal + { + @" +namespace CompatTests +{ + public class First { + protected int F = 0; + } +} +", + @" +namespace CompatTests +{ + public class First { + internal int F = 0; + } +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotReduceVisibility, string.Empty, DifferenceType.Changed, "F:CompatTests.First.F") +} + }, + // Expand visibility of type + { + @" +namespace CompatTests +{ + internal class First {} +} +", + @" +namespace CompatTests +{ + public class First {} +} +", +new CompatDifference[] {} + }, + // Expand visibility of member + { + @" +namespace CompatTests +{ + public class First { + protected int F; + } +} +", + @" +namespace CompatTests +{ + public class First { + public int F; + } +} +", +new CompatDifference[] {} + }, + // Reducing visibility of protected member inside sealed type. + // Since we don't visit private members, we don't issue a diagnostic here. + // We suppress the warning for declaring protected members in sealed types, + // since we want to check for a different diagnostic. + { + @" +namespace CompatTests +{ + public sealed class First { + +#pragma warning disable CS0628 + protected int F; + } +} +", + @" +namespace CompatTests +{ + public sealed class First { + +#pragma warning disable CS0169 + private int F; + } +} +", +new CompatDifference[] {} + }, + // Reducing visibility of protected member inside type without accessible constructor + // Since we don't visit private members, we don't issue a diagnostic here. + { + @" +namespace CompatTests +{ + public class First { + private First() {} + +#pragma warning disable CS0628 + protected int F; + } +} +", + @" +namespace CompatTests +{ + public class First { + private First() {} + +#pragma warning disable CS0169 + private int F; + } +} +", +new CompatDifference[] {} + }, + // Reduce visibility of member + { + @" +namespace CompatTests +{ + public class First { + public int F; + } +} +", + @" +namespace CompatTests +{ + public class First { + protected int F; + } +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotReduceVisibility, string.Empty, DifferenceType.Changed, "F:CompatTests.First.F") +} + } + }; + + public static TheoryData StrictMode => new() + { + // Reduce visibility of type + { + @" +namespace CompatTests +{ + public class First {} +} +", + @" +namespace CompatTests +{ + internal class First {} +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotReduceVisibility, string.Empty, DifferenceType.Changed, "T:CompatTests.First") +} + }, + // Expand visibility of type + { + @" +namespace CompatTests +{ + internal class First {} +} +", + @" +namespace CompatTests +{ + public class First {} +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotExpandVisibility, string.Empty, DifferenceType.Changed, "T:CompatTests.First") +} + }, + // Expand visibility of member + { + @" +namespace CompatTests +{ + public class First { + protected int F; + } +} +", + @" +namespace CompatTests +{ + public class First { + public int F; + } +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotExpandVisibility, string.Empty, DifferenceType.Changed, "F:CompatTests.First.F") +} + }, + // Reducing visibility of protected member inside sealed type + // Since we don't visit private members, we don't issue a diagnostic here. + // We suppress the warning for declaring protected members in sealed types, + // since we want to check for a different diagnostic. + { + @" +namespace CompatTests +{ + public sealed class First { + +#pragma warning disable CS0628 + protected int F; + } +} +", + @" +namespace CompatTests +{ + public sealed class First { + +#pragma warning disable CS0169 + private int F; + } +} +", +new CompatDifference[] {} + }, + // Reducing visibility of protected member inside type without accessible constructor + // Since we don't visit private members, we don't issue a diagnostic here. + { + @" +namespace CompatTests +{ + public class First { + private First() {} + +#pragma warning disable CS0628 + protected int F; + } +} +", + @" +namespace CompatTests +{ + public class First { + private First() {} + +#pragma warning disable CS0169 + private int F; + } +} +", +new CompatDifference[] {} + }, + // Reduce visibility of member + { + @" +namespace CompatTests +{ + public class First { + public int F; + } +} +", + @" +namespace CompatTests +{ + public class First { + protected int F; + } +} +", +new CompatDifference[] { + CompatDifference.CreateWithDefaultMetadata(DiagnosticIds.CannotReduceVisibility, string.Empty, DifferenceType.Changed, "F:CompatTests.First.F") +} + } + }; + + public static TheoryData NoInternals => new() + { + // No diagnostic on expanding visibility of type from internal to public + { + @" +namespace CompatTests +{ + internal class First {} +} +", + @" +namespace CompatTests +{ + public class First {} +} +", +new CompatDifference[] {} + }, + // No diagnostic on expanding visibility of member from protected to protected internal + { + @" +namespace CompatTests +{ + public class First { + protected int F; + } +} +", + @" +namespace CompatTests +{ + public class First { + protected internal int F; + } +} +", +new CompatDifference[] {} + }, + }; + + [Theory] + [MemberData(nameof(TestCases))] + public void EnsureDiagnosticIsReported(string leftSyntax, string rightSyntax, CompatDifference[] expected) + { + IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); + IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(includeInternalSymbols: true)); + + IEnumerable actual = differ.GetDifferences(left, right); + + Assert.Equal(expected, actual); + } + + [Theory] + [MemberData(nameof(StrictMode))] + public void EnsureDiagnosticIsReportedInStrictMode(string leftSyntax, string rightSyntax, CompatDifference[] expected) + { + IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); + IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings( + includeInternalSymbols: true, + strictMode: true)); + + IEnumerable actual = differ.GetDifferences(left, right); + + Assert.Equal(expected, actual); + } + + [Theory] + [MemberData(nameof(NoInternals))] + public void EnsureReportedInStrictModeWithoutInternalSymbols(string leftSyntax, string rightSyntax, CompatDifference[] expected) + { + IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); + IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings( + includeInternalSymbols: false, + strictMode: true)); + + IEnumerable actual = differ.GetDifferences(left, right); + + Assert.Equal(expected, actual); + } + } +} From af99d79b359d9a447c2b3009ff133aa0971c46aa Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 10 Oct 2022 19:22:25 +0000 Subject: [PATCH 151/185] Update dependencies from https://github.com/dotnet/templating build 20221010.12 Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 7.0.100-rtm.22507.11 -> To Version 7.0.100-rtm.22510.12 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f974557d9969..04dfd399b62f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,13 +1,13 @@ - + https://github.com/dotnet/templating - 94c03477bb20b6de15238fa2e510c671bdd67925 + b2fee4344be84b38feb34e4966466769c4aa1737 - + https://github.com/dotnet/templating - 94c03477bb20b6de15238fa2e510c671bdd67925 + b2fee4344be84b38feb34e4966466769c4aa1737 diff --git a/eng/Versions.props b/eng/Versions.props index 90de7f51a38c..3abba819f904 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -126,13 +126,13 @@ - 7.0.100-rtm.22507.11 + 7.0.100-rtm.22510.12 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 7.0.100-rtm.22507.11 + 7.0.100-rtm.22510.12 $(MicrosoftTemplateEngineAbstractionsPackageVersion) From 11e456271f3648aed99e31c1e4bc77493b122c0b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 10 Oct 2022 21:39:12 +0000 Subject: [PATCH 152/185] Update dependencies from https://github.com/dotnet/aspnetcore build 20221010.6 dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.JSInterop , VS.Redist.Common.AspNetCore.SharedFramework.x64.7.0 From Version 7.0.0-rtm.22504.29 -> To Version 7.0.0-rtm.22510.6 --- eng/Version.Details.xml | 68 ++++++++++++++++++++--------------------- eng/Versions.props | 12 ++++---- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 88bb68401cfa..1cdaaaa9eb81 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -97,13 +97,13 @@ https://github.com/dotnet/roslyn 7971633700e06fdd0a46dbae78908582ee533c2a - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce https://github.com/nuget/nuget.client @@ -163,50 +163,50 @@ https://github.com/dotnet/wpf 8091341440149a2ff67ed5af6efbb43c349ee537 - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce https://github.com/dotnet/razor-compiler @@ -225,21 +225,21 @@ https://github.com/dotnet/razor-compiler a41514681a4db83c7cae7e17debf668d12efc1bb - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce - + https://github.com/dotnet/aspnetcore - 9ddd2c08647465567262d96a82278eea41ef0101 + 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index de064932d152..e2c751a7e851 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -152,12 +152,12 @@ - 7.0.0-rtm.22510.2 - 7.0.0-rtm.22510.2 - 7.0.0-rtm.22510.2 - 7.0.0-rtm.22510.2 - 7.0.0-rtm.22510.2 - 7.0.0-rtm.22510.2 + 7.0.0-rtm.22510.6 + 7.0.0-rtm.22510.6 + 7.0.0-rtm.22510.6 + 7.0.0-rtm.22510.6 + 7.0.0-rtm.22510.6 + 7.0.0-rtm.22510.6 From 0550aba4fae9a3c10eb72cda6b36d4647b04def8 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Mon, 10 Oct 2022 17:19:34 -0500 Subject: [PATCH 153/185] update test baseline because argument rendering is no longer forced to be optional --- .../DotnetNewHelpTests.CanShowHelp_Install_common.verified.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tests/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelp_Install_common.verified.txt b/src/Tests/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelp_Install_common.verified.txt index 159c7f7db73e..2851f1c56518 100644 --- a/src/Tests/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelp_Install_common.verified.txt +++ b/src/Tests/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelp_Install_common.verified.txt @@ -2,7 +2,7 @@ Installs a template package. Usage: - dotnet new install [...] [options] + dotnet new install ... [options] Arguments: NuGet package ID or path to folder or NuGet package to install. From 1686518d75a0c88107465cb668b0c176e2b66aca Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 10 Oct 2022 23:17:02 +0000 Subject: [PATCH 154/185] Update dependencies from https://github.com/dotnet/roslyn build 20221010.10 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-3.22507.1 -> To Version 4.4.0-3.22510.10 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 04dfd399b62f..db4f3d812c78 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -68,34 +68,34 @@ b4dfe71ccfd40b3c46740471a691b67243c5a70d - + https://github.com/dotnet/roslyn - 7971633700e06fdd0a46dbae78908582ee533c2a + cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb - + https://github.com/dotnet/roslyn - 7971633700e06fdd0a46dbae78908582ee533c2a + cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb - + https://github.com/dotnet/roslyn - 7971633700e06fdd0a46dbae78908582ee533c2a + cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb - + https://github.com/dotnet/roslyn - 7971633700e06fdd0a46dbae78908582ee533c2a + cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb - + https://github.com/dotnet/roslyn - 7971633700e06fdd0a46dbae78908582ee533c2a + cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb - + https://github.com/dotnet/roslyn - 7971633700e06fdd0a46dbae78908582ee533c2a + cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb - + https://github.com/dotnet/roslyn - 7971633700e06fdd0a46dbae78908582ee533c2a + cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 3abba819f904..0c4c883419d1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -141,13 +141,13 @@ - 4.4.0-3.22507.1 - 4.4.0-3.22507.1 - 4.4.0-3.22507.1 - 4.4.0-3.22507.1 - 4.4.0-3.22507.1 - 4.4.0-3.22507.1 - 4.4.0-3.22507.1 + 4.4.0-3.22510.10 + 4.4.0-3.22510.10 + 4.4.0-3.22510.10 + 4.4.0-3.22510.10 + 4.4.0-3.22510.10 + 4.4.0-3.22510.10 + 4.4.0-3.22510.10 $(MicrosoftNetCompilersToolsetPackageVersion) From b7727968fc5406684602c7b208a363d75b12f372 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 11 Oct 2022 01:18:39 +0000 Subject: [PATCH 155/185] Update dependencies from https://github.com/dotnet/fsharp build 20221010.6 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 7.0.0-beta.22507.6 -> To Version 7.0.0-beta.22510.6 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 04dfd399b62f..b863da3b7cfe 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -54,13 +54,13 @@ https://github.com/dotnet/msbuild 9e6f1455a81e01cb7780f1e8ed5041f20cd396a3 - + https://github.com/dotnet/fsharp - 532a074f9b304325d8bcd554ac73a1183b74a8f0 + 5bdd01cf158a4b214f11025fdd45ac7e4774509f - + https://github.com/dotnet/fsharp - 532a074f9b304325d8bcd554ac73a1183b74a8f0 + 5bdd01cf158a4b214f11025fdd45ac7e4774509f diff --git a/eng/Versions.props b/eng/Versions.props index 3abba819f904..4b5bcc2ec00f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -137,7 +137,7 @@ - 12.0.5-beta.22507.6 + 12.0.5-beta.22510.6 From 70f9970c266c579218a2819e54a4d285b4401693 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 11 Oct 2022 12:51:34 +0000 Subject: [PATCH 156/185] Update dependencies from https://github.com/dotnet/format build 20221011.1 dotnet-format From Version 7.0.350701 -> To Version 7.0.351101 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6ff4f220211a..74c3c004bed8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -63,9 +63,9 @@ 5bdd01cf158a4b214f11025fdd45ac7e4774509f - + https://github.com/dotnet/format - 32d497c2b0fa26dc0262324112023b0fbcff37cf + 4e193b09909df1f21bb03f62ea077538d9207696 diff --git a/eng/Versions.props b/eng/Versions.props index bfbf3ac8373c..d1d0c0011f51 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -98,7 +98,7 @@ - 7.0.350701 + 7.0.351101 From 4a95e32a96a166d6f35eacae3dc24471cd6476a7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 11 Oct 2022 16:51:02 +0000 Subject: [PATCH 157/185] Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20221011.2 Microsoft.SourceBuild.Intermediate.roslyn-analyzers , Microsoft.CodeAnalysis.NetAnalyzers From Version 3.3.4-beta1.22504.1 -> To Version 3.3.4-beta1.22511.2 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6ff4f220211a..3de3b4f4e32d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -246,13 +246,13 @@ 9a1c3e1b7f0c8763d4c96e593961a61a72679a7b - + https://github.com/dotnet/roslyn-analyzers - 846a766f73caa82608db6fee9f2860004298449f + 83c80bfbd2d283405d94af5e4bb496bf7d185b01 - + https://github.com/dotnet/roslyn-analyzers - 846a766f73caa82608db6fee9f2860004298449f + 83c80bfbd2d283405d94af5e4bb496bf7d185b01 diff --git a/eng/Versions.props b/eng/Versions.props index bfbf3ac8373c..eef21ad11d36 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -102,7 +102,7 @@ - 7.0.0-preview1.22504.1 + 7.0.0-preview1.22511.2 From dbc7e876d7ef46a3f32969f6ffda63692a0e3060 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Tue, 11 Oct 2022 12:09:37 -0700 Subject: [PATCH 158/185] Update based on PR feedback so the attribute more accurately matches the behavior. --- src/Common/CompileOptions.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Common/CompileOptions.cs b/src/Common/CompileOptions.cs index 05826630636e..2df7fecc6221 100644 --- a/src/Common/CompileOptions.cs +++ b/src/Common/CompileOptions.cs @@ -3,7 +3,7 @@ using System.Reflection; #if MICROSOFT_ENABLE_TELEMETRY - [assembly: AssemblyMetadata("OfficialBuilder", "Microsoft")] + [assembly: AssemblyMetadata("TelemetryOptOutDefault", Microsoft.DotNet.Cli.CompileOptions.TelemetryOptOutDefaultString)] #endif namespace Microsoft.DotNet.Cli @@ -15,6 +15,12 @@ static class CompileOptions false; #else true; +#endif + public const string TelemetryOptOutDefaultString = +#if MICROSOFT_ENABLE_TELEMETRY + "False"; +#else + "True"; #endif } } From 61028b795113dbac5ce8c114674f0585aedd61a2 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 11 Oct 2022 21:23:14 +0000 Subject: [PATCH 159/185] Update dependencies from https://github.com/dotnet/roslyn build 20221011.1 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-3.22510.10 -> To Version 4.4.0-3.22511.1 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3de3b4f4e32d..74174abc4ee6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -68,34 +68,34 @@ 32d497c2b0fa26dc0262324112023b0fbcff37cf - + https://github.com/dotnet/roslyn - cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb + e4d6425dbd5e782ce572281e78669d5d68c55913 - + https://github.com/dotnet/roslyn - cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb + e4d6425dbd5e782ce572281e78669d5d68c55913 - + https://github.com/dotnet/roslyn - cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb + e4d6425dbd5e782ce572281e78669d5d68c55913 - + https://github.com/dotnet/roslyn - cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb + e4d6425dbd5e782ce572281e78669d5d68c55913 - + https://github.com/dotnet/roslyn - cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb + e4d6425dbd5e782ce572281e78669d5d68c55913 - + https://github.com/dotnet/roslyn - cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb + e4d6425dbd5e782ce572281e78669d5d68c55913 - + https://github.com/dotnet/roslyn - cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb + e4d6425dbd5e782ce572281e78669d5d68c55913 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index eef21ad11d36..a53f29cb9152 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -141,13 +141,13 @@ - 4.4.0-3.22510.10 - 4.4.0-3.22510.10 - 4.4.0-3.22510.10 - 4.4.0-3.22510.10 - 4.4.0-3.22510.10 - 4.4.0-3.22510.10 - 4.4.0-3.22510.10 + 4.4.0-3.22511.1 + 4.4.0-3.22511.1 + 4.4.0-3.22511.1 + 4.4.0-3.22511.1 + 4.4.0-3.22511.1 + 4.4.0-3.22511.1 + 4.4.0-3.22511.1 $(MicrosoftNetCompilersToolsetPackageVersion) From 04f3d95cdd8fc6cccd862a5ab279a63273ba133a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 11 Oct 2022 21:25:14 +0000 Subject: [PATCH 160/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20221011.1 Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0-rtm.22507.2 -> To Version 7.0.0 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 7.0.0-rtm.22506.9 -> To Version 7.0.0-rtm.22507.2 (parent: Microsoft.WindowsDesktop.App.Ref --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3de3b4f4e32d..a27068cf928b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -143,25 +143,25 @@ https://github.com/dotnet/runtime b8a4363ecd194d4e7906648a505701a9d2b7aeae - + https://github.com/dotnet/windowsdesktop - e5f1b07e2b0e290412cca52d87508ce738882eff + c69f4f408ce81df54c6bee4738414c2cb0b88933 - + https://github.com/dotnet/windowsdesktop - e5f1b07e2b0e290412cca52d87508ce738882eff + c69f4f408ce81df54c6bee4738414c2cb0b88933 - + https://github.com/dotnet/windowsdesktop - e5f1b07e2b0e290412cca52d87508ce738882eff + c69f4f408ce81df54c6bee4738414c2cb0b88933 - + https://github.com/dotnet/windowsdesktop - e5f1b07e2b0e290412cca52d87508ce738882eff + c69f4f408ce81df54c6bee4738414c2cb0b88933 - + https://github.com/dotnet/wpf - 8091341440149a2ff67ed5af6efbb43c349ee537 + 36a606bee876f89f0bb63b1422814735e0d914fb https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index eef21ad11d36..7b63f3c2d460 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -168,7 +168,7 @@ - 7.0.0-rtm.22506.9 + 7.0.0-rtm.22507.2 From f54a8d0c3363cc0f8fa199942e8562ff0bfd8e83 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 11 Oct 2022 22:47:53 +0000 Subject: [PATCH 161/185] Update dependencies from https://github.com/dotnet/aspnetcore build 20221011.7 dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.JSInterop , VS.Redist.Common.AspNetCore.SharedFramework.x64.7.0 From Version 7.0.0-rtm.22510.6 -> To Version 7.0.0-rtm.22511.7 --- eng/Version.Details.xml | 68 ++++++++++++++++++++--------------------- eng/Versions.props | 12 ++++---- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3de3b4f4e32d..092c960a8b2c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -97,13 +97,13 @@ https://github.com/dotnet/roslyn cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f https://github.com/nuget/nuget.client @@ -163,50 +163,50 @@ https://github.com/dotnet/wpf 8091341440149a2ff67ed5af6efbb43c349ee537 - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f https://github.com/dotnet/razor-compiler @@ -225,21 +225,21 @@ https://github.com/dotnet/razor-compiler a41514681a4db83c7cae7e17debf668d12efc1bb - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f - + https://github.com/dotnet/aspnetcore - 29830cbc8ce7ae7b5afaca7dd10c90d55b5191ce + 01f48cd961ecc022619493db772b757f6359457f https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index 934f7a2e6d2a..15643866d9eb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -152,12 +152,12 @@ - 7.0.0-rtm.22510.6 - 7.0.0-rtm.22510.6 - 7.0.0-rtm.22510.6 - 7.0.0-rtm.22510.6 - 7.0.0-rtm.22510.6 - 7.0.0-rtm.22510.6 + 7.0.0-rtm.22511.7 + 7.0.0-rtm.22511.7 + 7.0.0-rtm.22511.7 + 7.0.0-rtm.22511.7 + 7.0.0-rtm.22511.7 + 7.0.0-rtm.22511.7 From 43dc2fc97f5d65749beca3a7472fada6508eef9c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Oct 2022 00:31:29 +0000 Subject: [PATCH 162/185] Update dependencies from https://github.com/dotnet/format build 20221012.1 dotnet-format From Version 7.0.350701 -> To Version 7.0.351201 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 74c3c004bed8..5a97ccda6fb5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -63,9 +63,9 @@ 5bdd01cf158a4b214f11025fdd45ac7e4774509f - + https://github.com/dotnet/format - 4e193b09909df1f21bb03f62ea077538d9207696 + 818980d40cad0f434e4bb65678d90dac30f5a439 diff --git a/eng/Versions.props b/eng/Versions.props index d1d0c0011f51..b1705381dce7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -98,7 +98,7 @@ - 7.0.351101 + 7.0.351201 From 0b5b3cb33d1410c5d026fa6d6cc1103b22f0dd54 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Oct 2022 01:49:25 +0000 Subject: [PATCH 163/185] Update dependencies from https://github.com/dotnet/aspnetcore build 20221011.13 dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.JSInterop , VS.Redist.Common.AspNetCore.SharedFramework.x64.7.0 From Version 7.0.0-rtm.22510.6 -> To Version 7.0.0-rtm.22511.13 --- eng/Version.Details.xml | 68 ++++++++++++++++++++--------------------- eng/Versions.props | 12 ++++---- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 092c960a8b2c..79dd77f03714 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -97,13 +97,13 @@ https://github.com/dotnet/roslyn cff715a79d4c5b4a906aee99b6b36a0ddbbd1dfb - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 https://github.com/nuget/nuget.client @@ -163,50 +163,50 @@ https://github.com/dotnet/wpf 8091341440149a2ff67ed5af6efbb43c349ee537 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 https://github.com/dotnet/razor-compiler @@ -225,21 +225,21 @@ https://github.com/dotnet/razor-compiler a41514681a4db83c7cae7e17debf668d12efc1bb - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 - + https://github.com/dotnet/aspnetcore - 01f48cd961ecc022619493db772b757f6359457f + ed29a0c965359eab96ea6cc24e209f54aa543799 https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index 15643866d9eb..86b689553fd1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -152,12 +152,12 @@ - 7.0.0-rtm.22511.7 - 7.0.0-rtm.22511.7 - 7.0.0-rtm.22511.7 - 7.0.0-rtm.22511.7 - 7.0.0-rtm.22511.7 - 7.0.0-rtm.22511.7 + 7.0.0-rtm.22511.13 + 7.0.0-rtm.22511.13 + 7.0.0-rtm.22511.13 + 7.0.0-rtm.22511.13 + 7.0.0-rtm.22511.13 + 7.0.0-rtm.22511.13 From 0e39c78a96738372534db39f3b16a82c8d6207fa Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Oct 2022 02:15:57 +0000 Subject: [PATCH 164/185] Update dependencies from https://github.com/dotnet/runtime build 20221011.4 Microsoft.DotNet.ILCompiler , Microsoft.Extensions.DependencyModel , Microsoft.NET.HostModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.Platforms , System.CodeDom , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , VS.Redist.Common.NetCore.SharedFramework.x64.7.0 , VS.Redist.Common.NetCore.TargetingPack.x64.7.0 From Version 7.0.0-rtm.22507.1 -> To Version 7.0.0-rtm.22511.4 --- eng/Version.Details.xml | 60 ++++++++++++++++++++--------------------- eng/Versions.props | 24 ++++++++--------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 74174abc4ee6..c5b7664c8ff4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -10,41 +10,41 @@ b2fee4344be84b38feb34e4966466769c4aa1737 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 https://github.com/dotnet/msbuild @@ -118,30 +118,30 @@ 219e84c88def8276179f66282b2f7cb5f1d0d126 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 https://github.com/dotnet/linker 219e84c88def8276179f66282b2f7cb5f1d0d126 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 https://github.com/dotnet/windowsdesktop @@ -288,9 +288,9 @@ https://github.com/dotnet/arcade 720af493900b2f2bdc48e9ee12577983a5c9be36 - + https://github.com/dotnet/runtime - b8a4363ecd194d4e7906648a505701a9d2b7aeae + d25158d0dffd699340cedcfd43324c87a809a214 https://github.com/dotnet/xliff-tasks diff --git a/eng/Versions.props b/eng/Versions.props index 66c50adb3709..d14a4afd15b7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,12 +36,12 @@ 6.0.0 7.0.0-beta.22464.4 7.0.0-preview.22423.2 - 7.0.0-rtm.22507.1 + 7.0.0-rtm.22511.4 4.3.0 4.3.0 4.0.5 6.0.0 - 7.0.0-rtm.22507.1 + 7.0.0-rtm.22511.4 4.6.0 2.0.0-beta4.22504.1 1.0.0-preview5.1.22263.1 @@ -49,13 +49,13 @@ - 7.0.0-rtm.22507.1 - 7.0.0-rtm.22507.1 - 7.0.0-rtm.22507.1 + 7.0.0-rtm.22511.4 + 7.0.0-rtm.22511.4 + 7.0.0-rtm.22511.4 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) - 7.0.0-rtm.22507.1 - 7.0.0-rtm.22507.1 - 7.0.0-rtm.22507.1 + 7.0.0-rtm.22511.4 + 7.0.0-rtm.22511.4 + 7.0.0-rtm.22511.4 6.0.0-preview.7.21363.9 $(MicrosoftExtensionsDependencyModelPackageVersion) 6.0.0 @@ -91,10 +91,10 @@ - 7.0.0-rtm.22507.1 - 7.0.0-rtm.22507.1 - 7.0.0-rtm.22507.1 - 7.0.0-rtm.22507.1 + 7.0.0-rtm.22511.4 + 7.0.0-rtm.22511.4 + 7.0.0-rtm.22511.4 + 7.0.0-rtm.22511.4 From 58fe6ba625807dbf2d1a7b6ee7d318aa5e37fb79 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Oct 2022 04:14:54 +0000 Subject: [PATCH 165/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20221011.3 Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0-rtm.22507.2 -> To Version 7.0.0 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 7.0.0-rtm.22506.9 -> To Version 7.0.0-rtm.22511.4 (parent: Microsoft.WindowsDesktop.App.Ref --- NuGet.config | 1 + eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/NuGet.config b/NuGet.config index 0815f41ac8a4..35505d7b6cb9 100644 --- a/NuGet.config +++ b/NuGet.config @@ -14,6 +14,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a27068cf928b..a30eede49bf7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -145,23 +145,23 @@ https://github.com/dotnet/windowsdesktop - c69f4f408ce81df54c6bee4738414c2cb0b88933 + 8a6506751c4e473fb277dd81df3c8ace41a1dfa7 - + https://github.com/dotnet/windowsdesktop - c69f4f408ce81df54c6bee4738414c2cb0b88933 + 8a6506751c4e473fb277dd81df3c8ace41a1dfa7 https://github.com/dotnet/windowsdesktop - c69f4f408ce81df54c6bee4738414c2cb0b88933 + 8a6506751c4e473fb277dd81df3c8ace41a1dfa7 - + https://github.com/dotnet/windowsdesktop - c69f4f408ce81df54c6bee4738414c2cb0b88933 + 8a6506751c4e473fb277dd81df3c8ace41a1dfa7 - + https://github.com/dotnet/wpf - 36a606bee876f89f0bb63b1422814735e0d914fb + fd949cc0bee03dece87b7430fbba99f150632b9d https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 7b63f3c2d460..e20a6f2d0c9a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -168,7 +168,7 @@ - 7.0.0-rtm.22507.2 + 7.0.0-rtm.22511.4 From 02ed1cb67a6093027ff348d8870a9fffc47b1a02 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Oct 2022 04:17:52 +0000 Subject: [PATCH 166/185] Update dependencies from https://github.com/dotnet/roslyn build 20221011.14 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-3.22511.1 -> To Version 4.4.0-3.22511.14 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 74174abc4ee6..ff5e535094f5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -68,34 +68,34 @@ 32d497c2b0fa26dc0262324112023b0fbcff37cf - + https://github.com/dotnet/roslyn - e4d6425dbd5e782ce572281e78669d5d68c55913 + a9c49e8b8633005d2d03516693950037a9cf7cc7 - + https://github.com/dotnet/roslyn - e4d6425dbd5e782ce572281e78669d5d68c55913 + a9c49e8b8633005d2d03516693950037a9cf7cc7 - + https://github.com/dotnet/roslyn - e4d6425dbd5e782ce572281e78669d5d68c55913 + a9c49e8b8633005d2d03516693950037a9cf7cc7 - + https://github.com/dotnet/roslyn - e4d6425dbd5e782ce572281e78669d5d68c55913 + a9c49e8b8633005d2d03516693950037a9cf7cc7 - + https://github.com/dotnet/roslyn - e4d6425dbd5e782ce572281e78669d5d68c55913 + a9c49e8b8633005d2d03516693950037a9cf7cc7 - + https://github.com/dotnet/roslyn - e4d6425dbd5e782ce572281e78669d5d68c55913 + a9c49e8b8633005d2d03516693950037a9cf7cc7 - + https://github.com/dotnet/roslyn - e4d6425dbd5e782ce572281e78669d5d68c55913 + a9c49e8b8633005d2d03516693950037a9cf7cc7 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 66c50adb3709..a3fbdedc46e5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -141,13 +141,13 @@ - 4.4.0-3.22511.1 - 4.4.0-3.22511.1 - 4.4.0-3.22511.1 - 4.4.0-3.22511.1 - 4.4.0-3.22511.1 - 4.4.0-3.22511.1 - 4.4.0-3.22511.1 + 4.4.0-3.22511.14 + 4.4.0-3.22511.14 + 4.4.0-3.22511.14 + 4.4.0-3.22511.14 + 4.4.0-3.22511.14 + 4.4.0-3.22511.14 + 4.4.0-3.22511.14 $(MicrosoftNetCompilersToolsetPackageVersion) From 29b7c46efa29e48b048a2e3a785f4b190f841913 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Oct 2022 09:49:56 +0000 Subject: [PATCH 167/185] Update dependencies from https://github.com/dotnet/msbuild build 20221012.1 Microsoft.Build , Microsoft.Build.Localization From Version 17.5.0-preview-22507-04 -> To Version 17.4.0-preview-22512-01 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 70043fb7af09..4e6f25288f21 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -46,13 +46,13 @@ https://github.com/dotnet/runtime d25158d0dffd699340cedcfd43324c87a809a214 - + https://github.com/dotnet/msbuild - 9e6f1455a81e01cb7780f1e8ed5041f20cd396a3 + 0a4ea3c41cfd6c0c0b86bad45311c40632e4937e - + https://github.com/dotnet/msbuild - 9e6f1455a81e01cb7780f1e8ed5041f20cd396a3 + 0a4ea3c41cfd6c0c0b86bad45311c40632e4937e https://github.com/dotnet/fsharp diff --git a/eng/Versions.props b/eng/Versions.props index 0755ac4b3abf..1086a851cf10 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -106,7 +106,7 @@ - 17.5.0-preview-22507-04 + 17.4.0-preview-22512-01 $(MicrosoftBuildPackageVersion) - 7.0.351201 + 7.0.351202 From 6772efe6f359786e0350c0f15638d0475c95cba4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 12 Oct 2022 08:14:47 -0700 Subject: [PATCH 169/185] Update dependencies from https://github.com/dotnet/aspnetcore build 20221012.1 (#28502) dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.JSInterop , VS.Redist.Common.AspNetCore.SharedFramework.x64.7.0 From Version 7.0.0-rtm.22511.13 -> To Version 7.0.0-rtm.22512.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 68 ++++++++++++++++++++--------------------- eng/Versions.props | 12 ++++---- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 70043fb7af09..b5a740db09fc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -97,13 +97,13 @@ https://github.com/dotnet/roslyn a9c49e8b8633005d2d03516693950037a9cf7cc7 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 https://github.com/nuget/nuget.client @@ -163,50 +163,50 @@ https://github.com/dotnet/wpf fd949cc0bee03dece87b7430fbba99f150632b9d - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 https://github.com/dotnet/razor-compiler @@ -225,21 +225,21 @@ https://github.com/dotnet/razor-compiler a41514681a4db83c7cae7e17debf668d12efc1bb - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 - + https://github.com/dotnet/aspnetcore - ed29a0c965359eab96ea6cc24e209f54aa543799 + c6865355c01e1fb170b65427846d939559ab3789 https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index 0755ac4b3abf..cc6c8b557143 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -152,12 +152,12 @@ - 7.0.0-rtm.22511.13 - 7.0.0-rtm.22511.13 - 7.0.0-rtm.22511.13 - 7.0.0-rtm.22511.13 - 7.0.0-rtm.22511.13 - 7.0.0-rtm.22511.13 + 7.0.0-rtm.22512.1 + 7.0.0-rtm.22512.1 + 7.0.0-rtm.22512.1 + 7.0.0-rtm.22512.1 + 7.0.0-rtm.22512.1 + 7.0.0-rtm.22512.1 From 4c1e081c4856d5410164cc43918aa7db2c184ca3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Oct 2022 19:35:39 +0000 Subject: [PATCH 170/185] Update dependencies from https://github.com/dotnet/fsharp build 20221012.4 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 7.0.0-beta.22510.6 -> To Version 7.0.0-beta.22512.4 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 37fc8043847a..1a6918383e36 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -54,13 +54,13 @@ https://github.com/dotnet/msbuild 0a4ea3c41cfd6c0c0b86bad45311c40632e4937e - + https://github.com/dotnet/fsharp - 5bdd01cf158a4b214f11025fdd45ac7e4774509f + 525d5109e389341bb90b144c24e2ad1ceec91e7b - + https://github.com/dotnet/fsharp - 5bdd01cf158a4b214f11025fdd45ac7e4774509f + 525d5109e389341bb90b144c24e2ad1ceec91e7b diff --git a/eng/Versions.props b/eng/Versions.props index ee2ac7a33467..1e30990a1935 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -137,7 +137,7 @@ - 12.0.5-beta.22510.6 + 12.0.5-beta.22512.4 From ad8ef69b1d9e8f1b31bcf27b9ebd778400f1e029 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Oct 2022 19:49:28 +0000 Subject: [PATCH 171/185] Update dependencies from https://github.com/dotnet/roslyn build 20221012.2 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.4.0-3.22511.14 -> To Version 4.4.0-3.22512.2 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 37fc8043847a..0af168c4fe00 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -68,34 +68,34 @@ 818980d40cad0f434e4bb65678d90dac30f5a439 - + https://github.com/dotnet/roslyn - a9c49e8b8633005d2d03516693950037a9cf7cc7 + 68600aced97c928d722424b28d365d9c52de495a - + https://github.com/dotnet/roslyn - a9c49e8b8633005d2d03516693950037a9cf7cc7 + 68600aced97c928d722424b28d365d9c52de495a - + https://github.com/dotnet/roslyn - a9c49e8b8633005d2d03516693950037a9cf7cc7 + 68600aced97c928d722424b28d365d9c52de495a - + https://github.com/dotnet/roslyn - a9c49e8b8633005d2d03516693950037a9cf7cc7 + 68600aced97c928d722424b28d365d9c52de495a - + https://github.com/dotnet/roslyn - a9c49e8b8633005d2d03516693950037a9cf7cc7 + 68600aced97c928d722424b28d365d9c52de495a - + https://github.com/dotnet/roslyn - a9c49e8b8633005d2d03516693950037a9cf7cc7 + 68600aced97c928d722424b28d365d9c52de495a - + https://github.com/dotnet/roslyn - a9c49e8b8633005d2d03516693950037a9cf7cc7 + 68600aced97c928d722424b28d365d9c52de495a https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index ee2ac7a33467..5f046d04ccb3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -141,13 +141,13 @@ - 4.4.0-3.22511.14 - 4.4.0-3.22511.14 - 4.4.0-3.22511.14 - 4.4.0-3.22511.14 - 4.4.0-3.22511.14 - 4.4.0-3.22511.14 - 4.4.0-3.22511.14 + 4.4.0-3.22512.2 + 4.4.0-3.22512.2 + 4.4.0-3.22512.2 + 4.4.0-3.22512.2 + 4.4.0-3.22512.2 + 4.4.0-3.22512.2 + 4.4.0-3.22512.2 $(MicrosoftNetCompilersToolsetPackageVersion) From ac62cb18bc09b308e0cc42d7a0c8b3ad5e1428cb Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Wed, 12 Oct 2022 13:02:07 -0700 Subject: [PATCH 172/185] Stablebranding (#28485) --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index ee2ac7a33467..d38250dd613d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -16,7 +16,7 @@ - false + true release From aeaf09decf1f814d6619d4446d5856f571de30b5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Oct 2022 22:34:00 +0000 Subject: [PATCH 173/185] Update dependencies from https://github.com/dotnet/aspnetcore build 20221012.6 dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.JSInterop , VS.Redist.Common.AspNetCore.SharedFramework.x64.7.0 From Version 7.0.0-rtm.22512.1 -> To Version 7.0.0-rtm.22512.6 --- eng/Version.Details.xml | 68 ++++++++++++++++++++--------------------- eng/Versions.props | 12 ++++---- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0af168c4fe00..de7a52a8f4a1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -97,13 +97,13 @@ https://github.com/dotnet/roslyn 68600aced97c928d722424b28d365d9c52de495a - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf https://github.com/nuget/nuget.client @@ -163,50 +163,50 @@ https://github.com/dotnet/wpf fd949cc0bee03dece87b7430fbba99f150632b9d - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf https://github.com/dotnet/razor-compiler @@ -225,21 +225,21 @@ https://github.com/dotnet/razor-compiler a41514681a4db83c7cae7e17debf668d12efc1bb - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf - + https://github.com/dotnet/aspnetcore - c6865355c01e1fb170b65427846d939559ab3789 + a8c286a02d7c73a07ea142b55c90451a99ebffdf https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index 1551190d8607..e941647853eb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -152,12 +152,12 @@ - 7.0.0-rtm.22512.1 - 7.0.0-rtm.22512.1 - 7.0.0-rtm.22512.1 - 7.0.0-rtm.22512.1 - 7.0.0-rtm.22512.1 - 7.0.0-rtm.22512.1 + 7.0.0-rtm.22512.6 + 7.0.0-rtm.22512.6 + 7.0.0-rtm.22512.6 + 7.0.0-rtm.22512.6 + 7.0.0-rtm.22512.6 + 7.0.0-rtm.22512.6 From fa2d07c5dc1f161794a4657bf760dfc5a17bafe4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Oct 2022 22:35:12 +0000 Subject: [PATCH 174/185] Update dependencies from https://github.com/dotnet/runtime build 20221011.11 Microsoft.DotNet.ILCompiler , Microsoft.Extensions.DependencyModel , Microsoft.NET.HostModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.Platforms , System.CodeDom , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , VS.Redist.Common.NetCore.SharedFramework.x64.7.0 , VS.Redist.Common.NetCore.TargetingPack.x64.7.0 From Version 7.0.0-rtm.22511.4 -> To Version 7.0.0 --- NuGet.config | 1 + eng/Version.Details.xml | 60 ++++++++++++++++++++--------------------- eng/Versions.props | 24 ++++++++--------- 3 files changed, 43 insertions(+), 42 deletions(-) diff --git a/NuGet.config b/NuGet.config index 35505d7b6cb9..5411c10a2f7a 100644 --- a/NuGet.config +++ b/NuGet.config @@ -10,6 +10,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0af168c4fe00..67486f3b6aa4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -10,41 +10,41 @@ b2fee4344be84b38feb34e4966466769c4aa1737 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 https://github.com/dotnet/msbuild @@ -118,30 +118,30 @@ 219e84c88def8276179f66282b2f7cb5f1d0d126 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 https://github.com/dotnet/linker 219e84c88def8276179f66282b2f7cb5f1d0d126 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 https://github.com/dotnet/windowsdesktop @@ -288,9 +288,9 @@ https://github.com/dotnet/arcade 720af493900b2f2bdc48e9ee12577983a5c9be36 - + https://github.com/dotnet/runtime - d25158d0dffd699340cedcfd43324c87a809a214 + eb1415ca327694c1b741fbf8723f9093cc7f8a29 https://github.com/dotnet/xliff-tasks diff --git a/eng/Versions.props b/eng/Versions.props index 1551190d8607..5729f0090995 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,12 +36,12 @@ 6.0.0 7.0.0-beta.22464.4 7.0.0-preview.22423.2 - 7.0.0-rtm.22511.4 + 7.0.0 4.3.0 4.3.0 4.0.5 6.0.0 - 7.0.0-rtm.22511.4 + 7.0.0 4.6.0 2.0.0-beta4.22504.1 1.0.0-preview5.1.22263.1 @@ -49,13 +49,13 @@ - 7.0.0-rtm.22511.4 - 7.0.0-rtm.22511.4 - 7.0.0-rtm.22511.4 + 7.0.0 + 7.0.0-rtm.22511.11 + 7.0.0 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) - 7.0.0-rtm.22511.4 - 7.0.0-rtm.22511.4 - 7.0.0-rtm.22511.4 + 7.0.0 + 7.0.0 + 7.0.0-rtm.22511.11 6.0.0-preview.7.21363.9 $(MicrosoftExtensionsDependencyModelPackageVersion) 6.0.0 @@ -91,10 +91,10 @@ - 7.0.0-rtm.22511.4 - 7.0.0-rtm.22511.4 - 7.0.0-rtm.22511.4 - 7.0.0-rtm.22511.4 + 7.0.0 + 7.0.0 + 7.0.0 + 7.0.0 From 9ed22e752fcdddf599868f2aeb549ad3f76ee6c9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Oct 2022 23:18:21 +0000 Subject: [PATCH 175/185] Update dependencies from https://github.com/dotnet/format build 20221012.4 dotnet-format From Version 7.0.351201 -> To Version 7.0.351204 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f2ab746f5fcf..ac7c737a5273 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -63,9 +63,9 @@ 5bdd01cf158a4b214f11025fdd45ac7e4774509f - + https://github.com/dotnet/format - bee17d238280246c6a8e6decbd86a91fda6d00c6 + c1136d16ab588f45727fe908212b90578edc2aff diff --git a/eng/Versions.props b/eng/Versions.props index cd34bbb38e5c..955cdab1db29 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -98,7 +98,7 @@ - 7.0.351202 + 7.0.351204 From e296a04cebe5ee2e1b78006ab0bcfc2a16121e0f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 13 Oct 2022 00:50:57 +0000 Subject: [PATCH 176/185] Update dependencies from https://github.com/dotnet/runtime build 20221012.2 Microsoft.DotNet.ILCompiler , Microsoft.Extensions.DependencyModel , Microsoft.NET.HostModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.Platforms , System.CodeDom , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , VS.Redist.Common.NetCore.SharedFramework.x64.7.0 , VS.Redist.Common.NetCore.TargetingPack.x64.7.0 From Version 7.0.0-rtm.22511.4 -> To Version 7.0.0 --- NuGet.config | 2 +- eng/Version.Details.xml | 36 ++++++++++++++++++------------------ eng/Versions.props | 4 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/NuGet.config b/NuGet.config index 5411c10a2f7a..fbe1d37d4024 100644 --- a/NuGet.config +++ b/NuGet.config @@ -10,7 +10,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 67486f3b6aa4..dc28065ce74e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -12,39 +12,39 @@ https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba - + https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba - + https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba - + https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba https://github.com/dotnet/msbuild @@ -120,7 +120,7 @@ https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba @@ -129,19 +129,19 @@ https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba https://github.com/dotnet/windowsdesktop @@ -290,7 +290,7 @@ https://github.com/dotnet/runtime - eb1415ca327694c1b741fbf8723f9093cc7f8a29 + eeabb53e8583c3d3056923dcd52c615265eb38ba https://github.com/dotnet/xliff-tasks diff --git a/eng/Versions.props b/eng/Versions.props index 5729f0090995..ef035824c85f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -50,12 +50,12 @@ 7.0.0 - 7.0.0-rtm.22511.11 + 7.0.0-rtm.22512.2 7.0.0 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) 7.0.0 7.0.0 - 7.0.0-rtm.22511.11 + 7.0.0-rtm.22512.2 6.0.0-preview.7.21363.9 $(MicrosoftExtensionsDependencyModelPackageVersion) 6.0.0 From 650ea338022c9760ecca061c14c8ebb462eebf92 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 13 Oct 2022 03:28:01 +0000 Subject: [PATCH 177/185] Update dependencies from https://github.com/dotnet/aspnetcore build 20221012.14 dotnet-dev-certs , dotnet-user-jwts , dotnet-user-secrets , Microsoft.AspNetCore.Analyzers , Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Ref.Internal , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components.SdkAnalyzers , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.DeveloperCertificates.XPlat , Microsoft.AspNetCore.Mvc.Analyzers , Microsoft.AspNetCore.Mvc.Api.Analyzers , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.FileProviders.Embedded , Microsoft.JSInterop , VS.Redist.Common.AspNetCore.SharedFramework.x64.7.0 From Version 7.0.0-rtm.22512.6 -> To Version 7.0.0-rtm.22512.14 --- eng/Version.Details.xml | 68 ++++++++++++++++++++--------------------- eng/Versions.props | 12 ++++---- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 16f7a137d5f4..62275ff08355 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -97,13 +97,13 @@ https://github.com/dotnet/roslyn 68600aced97c928d722424b28d365d9c52de495a - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 https://github.com/nuget/nuget.client @@ -163,50 +163,50 @@ https://github.com/dotnet/wpf fd949cc0bee03dece87b7430fbba99f150632b9d - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 https://github.com/dotnet/razor-compiler @@ -225,21 +225,21 @@ https://github.com/dotnet/razor-compiler a41514681a4db83c7cae7e17debf668d12efc1bb - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/dotnet/aspnetcore - a8c286a02d7c73a07ea142b55c90451a99ebffdf + 122736b8fd5acf3e49e83016582702452c07f400 https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index e6166eb8ca83..1adf26c4fc6e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -152,12 +152,12 @@ - 7.0.0-rtm.22512.6 - 7.0.0-rtm.22512.6 - 7.0.0-rtm.22512.6 - 7.0.0-rtm.22512.6 - 7.0.0-rtm.22512.6 - 7.0.0-rtm.22512.6 + 7.0.0-rtm.22512.14 + 7.0.0-rtm.22512.14 + 7.0.0-rtm.22512.14 + 7.0.0-rtm.22512.14 + 7.0.0-rtm.22512.14 + 7.0.0-rtm.22512.14 From 185aba9fb4ba6064cbd3fe2000f2dc0bf29467b0 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 13 Oct 2022 05:01:40 +0000 Subject: [PATCH 178/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20221012.6 Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0 -> To Version 7.0.0 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 7.0.0-rtm.22511.4 -> To Version 7.0.0-rtm.22512.9 (parent: Microsoft.WindowsDesktop.App.Ref --- NuGet.config | 2 +- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NuGet.config b/NuGet.config index 35505d7b6cb9..c816ecd94776 100644 --- a/NuGet.config +++ b/NuGet.config @@ -14,7 +14,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 62275ff08355..a3dac650bea9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -145,23 +145,23 @@ https://github.com/dotnet/windowsdesktop - 8a6506751c4e473fb277dd81df3c8ace41a1dfa7 + aa0a3e1e0157bfccefa89ac61c35cb6105d0902b - + https://github.com/dotnet/windowsdesktop - 8a6506751c4e473fb277dd81df3c8ace41a1dfa7 + aa0a3e1e0157bfccefa89ac61c35cb6105d0902b https://github.com/dotnet/windowsdesktop - 8a6506751c4e473fb277dd81df3c8ace41a1dfa7 + aa0a3e1e0157bfccefa89ac61c35cb6105d0902b - + https://github.com/dotnet/windowsdesktop - 8a6506751c4e473fb277dd81df3c8ace41a1dfa7 + aa0a3e1e0157bfccefa89ac61c35cb6105d0902b - + https://github.com/dotnet/wpf - fd949cc0bee03dece87b7430fbba99f150632b9d + 7af30078856aeb12ce5f732082b90b49aab26b2b https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 1adf26c4fc6e..347b869be2d0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -168,7 +168,7 @@ - 7.0.0-rtm.22511.4 + 7.0.0-rtm.22512.9 From f3d4dcad1091dbc49bd0dbe636a66c6e48b13186 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 13 Oct 2022 10:24:20 +0000 Subject: [PATCH 179/185] Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20221013.1 Microsoft.SourceBuild.Intermediate.roslyn-analyzers , Microsoft.CodeAnalysis.NetAnalyzers From Version 3.3.4-beta1.22511.2 -> To Version 3.3.4-beta1.22513.1 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9e1804a9eddd..7f739e1f851d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -246,13 +246,13 @@ 9a1c3e1b7f0c8763d4c96e593961a61a72679a7b - + https://github.com/dotnet/roslyn-analyzers - 83c80bfbd2d283405d94af5e4bb496bf7d185b01 + ea9fb45000311153bfc91690f306cca2b80e6b83 - + https://github.com/dotnet/roslyn-analyzers - 83c80bfbd2d283405d94af5e4bb496bf7d185b01 + ea9fb45000311153bfc91690f306cca2b80e6b83 diff --git a/eng/Versions.props b/eng/Versions.props index 8b9df1777fc8..39ce25e23155 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -102,7 +102,7 @@ - 7.0.0-preview1.22511.2 + 7.0.0-preview1.22513.1 From 209073d1974bf3fa57223cbf5daadb64eee489e6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 13 Oct 2022 14:31:22 +0000 Subject: [PATCH 180/185] Update dependencies from https://github.com/dotnet/fsharp build 20221013.2 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 7.0.0-beta.22512.4 -> To Version 7.0.0-beta.22513.2 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9e1804a9eddd..267d550bb981 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -54,13 +54,13 @@ https://github.com/dotnet/msbuild 0a4ea3c41cfd6c0c0b86bad45311c40632e4937e - + https://github.com/dotnet/fsharp - 525d5109e389341bb90b144c24e2ad1ceec91e7b + e142005b5b992da4c04f56bdb287d685da55989c - + https://github.com/dotnet/fsharp - 525d5109e389341bb90b144c24e2ad1ceec91e7b + e142005b5b992da4c04f56bdb287d685da55989c diff --git a/eng/Versions.props b/eng/Versions.props index 8b9df1777fc8..d6f6a714c2f3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -137,7 +137,7 @@ - 12.0.5-beta.22512.4 + 12.4.0-beta.22513.2 From e738cadf4d8da834bfca77bf3b46dffe8999a521 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Thu, 13 Oct 2022 09:18:19 -0700 Subject: [PATCH 181/185] Dont downgrade ubuntu --- .vsts-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 4320cbddde40..d5de1e560b00 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -136,17 +136,17 @@ stages: - template: /eng/build.yml parameters: - agentOs: Ubuntu_20_04 + agentOs: Ubuntu_22_04 pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: - vmImage: 'ubuntu-20.04' + vmImage: 'ubuntu-22.04' ${{ if ne(variables['System.TeamProject'], 'public') }}: name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals 1es-ubuntu-2004 + demands: ImageOverride -equals 1es-ubuntu-2204 ${{ if eq(variables['System.TeamProject'], 'public') }}: - helixTargetQueue: 'ubuntu.2004.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-helix-amd64-20220502145738-4b2e4c2' + helixTargetQueue: 'ubuntu.2204.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-amd64-20220813234317-1b9461f' ${{ if ne(variables['System.TeamProject'], 'public') }}: - helixTargetQueue: Ubuntu.2004.Amd64 + helixTargetQueue: Ubuntu.2204.Amd64 strategy: matrix: Build_Release: From f7e453005020839e2ec3bacc19ff337d69a5d6fc Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 13 Oct 2022 17:57:03 +0000 Subject: [PATCH 182/185] Update dependencies from https://github.com/nuget/nuget.client build 6.4.0.117 NuGet.Build.Tasks From Version 6.4.0-preview.3.107 -> To Version 6.4.0-rc.117 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index bbf37daf84ea..b8bd24b58456 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -105,9 +105,9 @@ https://github.com/dotnet/aspnetcore 122736b8fd5acf3e49e83016582702452c07f400 - + https://github.com/nuget/nuget.client - 1a082949ae5b6da7ca2cce047396c53ae1afdde7 + 125f673fd1cdb3cc012f62aa3ce764d2460b89eb https://github.com/microsoft/vstest diff --git a/eng/Versions.props b/eng/Versions.props index eb5b68807352..686d3f1ec019 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,7 +63,7 @@ - 6.4.0-preview.3.107 + 6.4.0-rc.117 $(NuGetBuildTasksPackageVersion) 6.0.0-rc.278 $(NuGetBuildTasksPackageVersion) From 44582f51b62db9311b5e5498cdbf35ff5c20c3c1 Mon Sep 17 00:00:00 2001 From: Damon Tivel Date: Thu, 13 Oct 2022 11:14:34 -0700 Subject: [PATCH 183/185] Trusted roots: 2022-09 CTL (#28541) --- .../redist/trustedroots/codesignctl.pem | 50 +++++++++++++++++++ .../redist/trustedroots/timestampctl.pem | 50 +++++++++++++++++++ 2 files changed, 100 insertions(+) diff --git a/src/Layout/redist/trustedroots/codesignctl.pem b/src/Layout/redist/trustedroots/codesignctl.pem index efa36732f919..a973427758b9 100644 --- a/src/Layout/redist/trustedroots/codesignctl.pem +++ b/src/Layout/redist/trustedroots/codesignctl.pem @@ -8384,6 +8384,22 @@ CwqQAjBdGuxRidRk3PnlHji9Wy7j5UTkOxh61/CVQI/y68/0+dBlokHysOZ8wTYs j1453Tc= -----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICQDCCAeWgAwIBAgIMAVRI7yH9l1kN9QQKMAoGCCqGSM49BAMCMHExCzAJBgNV +BAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMgTHRk +LjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25vIFJv +b3QgQ0EgMjAxNzAeFw0xNzA4MjIxMjA3MDZaFw00MjA4MjIxMjA3MDZaMHExCzAJ +BgNVBAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMg +THRkLjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25v +IFJvb3QgQ0EgMjAxNzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJbcPYrYsHtv +xie+RJCxs1YVe45DJH0ahFnuY2iyxl6H0BVIHqiQrb1TotreOpCmYF9oMrWGQd+H +Wyx7xf58etqjYzBhMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G +A1UdDgQWBBSHERUI0arBeAyxr87GyZDvvzAEwDAfBgNVHSMEGDAWgBSHERUI0arB +eAyxr87GyZDvvzAEwDAKBggqhkjOPQQDAgNJADBGAiEAtVfd14pVCzbhhkT61Nlo +jbjcI4qKDdQvfepz7L9NbKgCIQDLpbQS+ue16M9+k/zzNY9vTlp8tLxOsvxyqltZ ++efcMQ== +-----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- MIIFtjCCA56gAwIBAgIQFcKuKk2ZmmOM07oTGXYI9TANBgkqhkiG9w0BAQsFADB1 MQswCQYDVQQGEwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJl @@ -8468,3 +8484,37 @@ Ts3Xroud2xb9BMaSvdSI5qmjqrv3ZDg7X8wM0DW+dBkDpsWqTKJhNoI+HfMrvJdd 20t4Oy31O+9gI+j17AsjNpWvmGa/U9N7uGlKKpZmacSUxvRfbqyYeIiABlyisu2i -----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFojCCA4qgAwIBAgIUf/Go+fQ66IduLcb/XkM9su4wpkMwDQYJKoZIhvcNAQEN +BQAwaTELMAkGA1UEBhMCVVMxFjAUBgNVBAoMDUVudHJ1c3QsIEluYy4xQjBABgNV +BAMMOUVudHJ1c3QgQ29kZSBTaWduaW5nIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkgLSBDU0JSMTAeFw0yMTA1MDcxMzI2MzZaFw00MDEyMzAxMzI2MzZaMGkx +CzAJBgNVBAYTAlVTMRYwFAYDVQQKDA1FbnRydXN0LCBJbmMuMUIwQAYDVQQDDDlF +bnRydXN0IENvZGUgU2lnbmluZyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +IC0gQ1NCUjEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCngY/3FEW2 +YkPy2K7TJV5IT1G/xX2fUBw10dZ+YSqUGW0nRqSmGl33VFFqgCLGqGZ1TVSDyV5o +G6v2W2Swra0gvVTvRmttAudFrnX2joq5Mi6LuHccUk15iF+lOhjJUCyXJy2/2gB9 +Y3/vMuxGh2Pbmp/DWiE2e/mb1cqgbnIs/OHxnnBNCFYVb5Cr+0i6udfBgniFZS5/ +tcnA4hS3NxFBBuKK4Kj25X62eAUBw2DtTwdBLgoTSeOQm3/dvfqsv2RR0VybtPVc +51z/O5uloBrXfQmywrf/bhy8yH3m6Sv8crMU6UpVEoScRCV1HfYq8E+lID1oJeth +l3wP5bY9867DwRG8G47M4EcwXkIAhnHjWKwGymUfe5SmS1dnDH5erXhnW1XjXuvH +2OxMbobL89z4n4eqclgSD32m+PhCOTs8LOQyTUmM4OEAwjignPqEPkHcblauxhpb +9GdoBQHNG7+uh7ydU/Yu6LZr5JnexU+HWKjSZR7IH9Vybu5ZHFc7CXKd18q3kMbN +e0WSkUIDTH0/yvKquMIOhvMQn0YupGaGaFpoGHApOBGAYGuKQ6NzbOOzazf/5p1n +AZKG3y9I0ftQYNVc/iHTAUJj/u9wtBfAj6ju08FLXxLq/f0uDodEYOOp9MIYo+P9 +zgyEIg3zp3jak/PbOM+5LzPG/wc8Xr5F0wIDAQABo0IwQDAdBgNVHQ4EFgQUgrrW +PZfOn89x6JI3r/2ztWk1V88wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AYYwDQYJKoZIhvcNAQENBQADggIBABLvOKGI4aGj1mXcR5zzvNzPrEuMPBq+K/T3 +0GcXaIZNcKjyzdAxAld9qQyKO1c5nvBu9yQiBWfRwZbBvtHw+FZnC96614ibjddr +CHb1WJHZtcNAUxqk8YXNPwBOP06TO3i50gdSZAyGaW3oVGVWF+gAU4SK89v7s84L +VWKPzUxJBjh/UsPzHNc99zPKMq3Bqa9v6xHL7qxRv7AmmnpOI7RK9mm0QmnWoI22 +jEdKOyA3t0EH7y8g2GYcaZeobDB8d0Nea74mmIMPOtbHcCoWRi0lVIZjZVdC9yNB +6VBqB0POTrXpH2jY2NYJSqjosvyQZ5LkkCbzR/rWIPuJgOJEczn3ioYzC/iqqedN +7Nxv1c8xTauOH5BA1nxcgg+uF1Jx6aznTTjtKth2eYetF6NMq7dCV78GrOXQTTDp +VU/jRcrz4GohNI3HnxyjY0iS0pYHvqVHPsIqmTinjtohfFFt3Ms9B+mpvUnUXTVf +W4wEUeqaWJC6G69oeLEWD5QpO4+bKo/JIPBxQkxcTasxjKvpfyZoaaClFg2BxNEF +DMOHZuUHY6obTv+yB0FPpSJGUKxmAIdSbDyyO5yXoUa0W97PwmpZVQeMo6TRdzVn +RgQv2Ti5Rq+6jhtyJgIvdlTvg8IvLHdwzHcQkqoDrcrM4E/pg0blszwZb3p5h7Y4 +mr1CzqRi +-----END CERTIFICATE----- + diff --git a/src/Layout/redist/trustedroots/timestampctl.pem b/src/Layout/redist/trustedroots/timestampctl.pem index 6e6aeb668d77..c04ccb8e7cb1 100644 --- a/src/Layout/redist/trustedroots/timestampctl.pem +++ b/src/Layout/redist/trustedroots/timestampctl.pem @@ -8739,6 +8739,22 @@ CwqQAjBdGuxRidRk3PnlHji9Wy7j5UTkOxh61/CVQI/y68/0+dBlokHysOZ8wTYs j1453Tc= -----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICQDCCAeWgAwIBAgIMAVRI7yH9l1kN9QQKMAoGCCqGSM49BAMCMHExCzAJBgNV +BAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMgTHRk +LjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25vIFJv +b3QgQ0EgMjAxNzAeFw0xNzA4MjIxMjA3MDZaFw00MjA4MjIxMjA3MDZaMHExCzAJ +BgNVBAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMg +THRkLjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25v +IFJvb3QgQ0EgMjAxNzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJbcPYrYsHtv +xie+RJCxs1YVe45DJH0ahFnuY2iyxl6H0BVIHqiQrb1TotreOpCmYF9oMrWGQd+H +Wyx7xf58etqjYzBhMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G +A1UdDgQWBBSHERUI0arBeAyxr87GyZDvvzAEwDAfBgNVHSMEGDAWgBSHERUI0arB +eAyxr87GyZDvvzAEwDAKBggqhkjOPQQDAgNJADBGAiEAtVfd14pVCzbhhkT61Nlo +jbjcI4qKDdQvfepz7L9NbKgCIQDLpbQS+ue16M9+k/zzNY9vTlp8tLxOsvxyqltZ ++efcMQ== +-----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- MIIFtjCCA56gAwIBAgIQFcKuKk2ZmmOM07oTGXYI9TANBgkqhkiG9w0BAQsFADB1 MQswCQYDVQQGEwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJl @@ -8857,3 +8873,37 @@ zWIEm5dte7Q3toaZwmAK/G0ZBkI3ZLwXum1LzddoRhN51ltgmc6NzfDIG97qKL7M z4leKEMaJ8dId29zULSpxVPgc8dUrdyac1E= -----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFojCCA4qgAwIBAgIUf/Go+fQ66IduLcb/XkM9su4wpkMwDQYJKoZIhvcNAQEN +BQAwaTELMAkGA1UEBhMCVVMxFjAUBgNVBAoMDUVudHJ1c3QsIEluYy4xQjBABgNV +BAMMOUVudHJ1c3QgQ29kZSBTaWduaW5nIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkgLSBDU0JSMTAeFw0yMTA1MDcxMzI2MzZaFw00MDEyMzAxMzI2MzZaMGkx +CzAJBgNVBAYTAlVTMRYwFAYDVQQKDA1FbnRydXN0LCBJbmMuMUIwQAYDVQQDDDlF +bnRydXN0IENvZGUgU2lnbmluZyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +IC0gQ1NCUjEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCngY/3FEW2 +YkPy2K7TJV5IT1G/xX2fUBw10dZ+YSqUGW0nRqSmGl33VFFqgCLGqGZ1TVSDyV5o +G6v2W2Swra0gvVTvRmttAudFrnX2joq5Mi6LuHccUk15iF+lOhjJUCyXJy2/2gB9 +Y3/vMuxGh2Pbmp/DWiE2e/mb1cqgbnIs/OHxnnBNCFYVb5Cr+0i6udfBgniFZS5/ +tcnA4hS3NxFBBuKK4Kj25X62eAUBw2DtTwdBLgoTSeOQm3/dvfqsv2RR0VybtPVc +51z/O5uloBrXfQmywrf/bhy8yH3m6Sv8crMU6UpVEoScRCV1HfYq8E+lID1oJeth +l3wP5bY9867DwRG8G47M4EcwXkIAhnHjWKwGymUfe5SmS1dnDH5erXhnW1XjXuvH +2OxMbobL89z4n4eqclgSD32m+PhCOTs8LOQyTUmM4OEAwjignPqEPkHcblauxhpb +9GdoBQHNG7+uh7ydU/Yu6LZr5JnexU+HWKjSZR7IH9Vybu5ZHFc7CXKd18q3kMbN +e0WSkUIDTH0/yvKquMIOhvMQn0YupGaGaFpoGHApOBGAYGuKQ6NzbOOzazf/5p1n +AZKG3y9I0ftQYNVc/iHTAUJj/u9wtBfAj6ju08FLXxLq/f0uDodEYOOp9MIYo+P9 +zgyEIg3zp3jak/PbOM+5LzPG/wc8Xr5F0wIDAQABo0IwQDAdBgNVHQ4EFgQUgrrW +PZfOn89x6JI3r/2ztWk1V88wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AYYwDQYJKoZIhvcNAQENBQADggIBABLvOKGI4aGj1mXcR5zzvNzPrEuMPBq+K/T3 +0GcXaIZNcKjyzdAxAld9qQyKO1c5nvBu9yQiBWfRwZbBvtHw+FZnC96614ibjddr +CHb1WJHZtcNAUxqk8YXNPwBOP06TO3i50gdSZAyGaW3oVGVWF+gAU4SK89v7s84L +VWKPzUxJBjh/UsPzHNc99zPKMq3Bqa9v6xHL7qxRv7AmmnpOI7RK9mm0QmnWoI22 +jEdKOyA3t0EH7y8g2GYcaZeobDB8d0Nea74mmIMPOtbHcCoWRi0lVIZjZVdC9yNB +6VBqB0POTrXpH2jY2NYJSqjosvyQZ5LkkCbzR/rWIPuJgOJEczn3ioYzC/iqqedN +7Nxv1c8xTauOH5BA1nxcgg+uF1Jx6aznTTjtKth2eYetF6NMq7dCV78GrOXQTTDp +VU/jRcrz4GohNI3HnxyjY0iS0pYHvqVHPsIqmTinjtohfFFt3Ms9B+mpvUnUXTVf +W4wEUeqaWJC6G69oeLEWD5QpO4+bKo/JIPBxQkxcTasxjKvpfyZoaaClFg2BxNEF +DMOHZuUHY6obTv+yB0FPpSJGUKxmAIdSbDyyO5yXoUa0W97PwmpZVQeMo6TRdzVn +RgQv2Ti5Rq+6jhtyJgIvdlTvg8IvLHdwzHcQkqoDrcrM4E/pg0blszwZb3p5h7Y4 +mr1CzqRi +-----END CERTIFICATE----- + From 272517c2c99edb641533835b3cda6887697a93cd Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 13 Oct 2022 22:44:17 +0000 Subject: [PATCH 184/185] Update dependencies from https://github.com/dotnet/windowsdesktop build 20221013.5 Microsoft.WindowsDesktop.App.Ref , Microsoft.WindowsDesktop.App.Runtime.win-x64 , VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0 , VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0 From Version 7.0.0 -> To Version 7.0.0 Dependency coherency updates Microsoft.NET.Sdk.WindowsDesktop From Version 7.0.0-rtm.22512.9 -> To Version 7.0.0-rtm.22513.7 (parent: Microsoft.WindowsDesktop.App.Ref --- NuGet.config | 1 - eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7e49ce8fe483..2321e836cdbc 100644 --- a/NuGet.config +++ b/NuGet.config @@ -15,7 +15,6 @@ - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b8bd24b58456..383f80b34a4e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -145,23 +145,23 @@ https://github.com/dotnet/windowsdesktop - aa0a3e1e0157bfccefa89ac61c35cb6105d0902b + b4cf0e49a0b5fa60426e759f98271dd4154cce33 - + https://github.com/dotnet/windowsdesktop - aa0a3e1e0157bfccefa89ac61c35cb6105d0902b + b4cf0e49a0b5fa60426e759f98271dd4154cce33 https://github.com/dotnet/windowsdesktop - aa0a3e1e0157bfccefa89ac61c35cb6105d0902b + b4cf0e49a0b5fa60426e759f98271dd4154cce33 - + https://github.com/dotnet/windowsdesktop - aa0a3e1e0157bfccefa89ac61c35cb6105d0902b + b4cf0e49a0b5fa60426e759f98271dd4154cce33 - + https://github.com/dotnet/wpf - 7af30078856aeb12ce5f732082b90b49aab26b2b + 95ca32d5556ce76d672fa11397502cc2e6f5f627 https://github.com/dotnet/aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 686d3f1ec019..5308fce7bf69 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -168,7 +168,7 @@ - 7.0.0-rtm.22512.9 + 7.0.0-rtm.22513.7 From ac75e99b19af9b3de10b761a2551bc8c32d45ccd Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 14 Oct 2022 01:24:45 +0000 Subject: [PATCH 185/185] Update dependencies from https://github.com/dotnet/runtime build 20221013.5 Microsoft.DotNet.ILCompiler , Microsoft.Extensions.DependencyModel , Microsoft.NET.HostModel , Microsoft.NETCore.App.Host.win-x64 , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHostResolver , Microsoft.NETCore.Platforms , System.CodeDom , System.Reflection.MetadataLoadContext , System.Resources.Extensions , System.Security.Cryptography.ProtectedData , System.Text.Encoding.CodePages , VS.Redist.Common.NetCore.SharedFramework.x64.7.0 , VS.Redist.Common.NetCore.TargetingPack.x64.7.0 From Version 7.0.0 -> To Version 7.0.0 --- NuGet.config | 2 +- eng/Version.Details.xml | 36 ++++++++++++++++++------------------ eng/Versions.props | 4 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7e49ce8fe483..4b25eea1f8c6 100644 --- a/NuGet.config +++ b/NuGet.config @@ -10,7 +10,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b8bd24b58456..52fb05e42f4c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -12,39 +12,39 @@ https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 - + https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 - + https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 - + https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 https://github.com/dotnet/msbuild @@ -120,7 +120,7 @@ https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 @@ -129,19 +129,19 @@ https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 https://github.com/dotnet/windowsdesktop @@ -290,7 +290,7 @@ https://github.com/dotnet/runtime - eeabb53e8583c3d3056923dcd52c615265eb38ba + 075e74ed1356f2e5bb978ac541633ab46e34bf99 https://github.com/dotnet/xliff-tasks diff --git a/eng/Versions.props b/eng/Versions.props index 686d3f1ec019..91bbcfe088dd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -50,12 +50,12 @@ 7.0.0 - 7.0.0-rtm.22512.2 + 7.0.0-rtm.22513.5 7.0.0 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) 7.0.0 7.0.0 - 7.0.0-rtm.22512.2 + 7.0.0-rtm.22513.5 6.0.0-preview.7.21363.9 $(MicrosoftExtensionsDependencyModelPackageVersion) 6.0.0