diff --git a/.gitattributes b/.gitattributes index a7c35ea1b75a..3888fbfbf5bd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -71,3 +71,8 @@ *.verified.zsh text eol=lf working-tree-encoding=UTF-8 *.verified.nu text eol=lf working-tree-encoding=UTF-8 *.verified.fish text eol=lf working-tree-encoding=UTF-8 + +############################################################################### +# Ensure files are included in git archive +############################################################################### +/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Gitattributes/.gitattributes -export-ignore diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 5520cb455b24..68fae266e887 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -104,7 +104,7 @@ extends: publishTaskPrefix: 1ES. populateInternalRuntimeVariables: true runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) - locBranch: release/10.0.2xx + locBranch: release/10.0.3xx # WORKAROUND: BinSkim requires the folder exist prior to scanning. preSteps: - powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force diff --git a/src/Cli/dotnet/Commands/Tool/Execute/ToolExecuteCommand.cs b/src/Cli/dotnet/Commands/Tool/Execute/ToolExecuteCommand.cs index f9ffad3e94fe..f33175940357 100644 --- a/src/Cli/dotnet/Commands/Tool/Execute/ToolExecuteCommand.cs +++ b/src/Cli/dotnet/Commands/Tool/Execute/ToolExecuteCommand.cs @@ -19,7 +19,7 @@ namespace Microsoft.DotNet.Cli.Commands.Tool.Execute; -internal sealed class ToolExecuteCommand : CommandBase +internal sealed class ToolExecuteCommand : CommandBase { const int ERROR_CANCELLED = 1223; // Windows error code for "Operation canceled by user" diff --git a/test/Microsoft.DotNet.PackageInstall.Tests/EndToEndToolTests.cs b/test/Microsoft.DotNet.PackageInstall.Tests/EndToEndToolTests.cs index 3eae1ab6133e..fdbe9eb07ee2 100644 --- a/test/Microsoft.DotNet.PackageInstall.Tests/EndToEndToolTests.cs +++ b/test/Microsoft.DotNet.PackageInstall.Tests/EndToEndToolTests.cs @@ -266,8 +266,10 @@ public void PackageToolWithAnyRid() .And.Satisfy(SupportAllOfTheseRuntimes([.. expectedRids, "any"])); } - [Fact] - public void InstallAndRunToolFromAnyRid() + [Theory] + [InlineData("exec")] + [InlineData("dnx")] + public void InstallAndRunToolFromAnyRid(string command) { var toolSettings = new TestToolBuilder.TestToolSettings() { @@ -282,7 +284,12 @@ public void InstallAndRunToolFromAnyRid() var testDirectory = _testAssetsManager.CreateTestDirectory(); var homeFolder = Path.Combine(testDirectory.Path, "home"); - new DotnetToolCommand(Log, "exec", toolSettings.ToolPackageId, "--verbosity", "diagnostic", "--yes", "--source", toolPackagesPath) + string[] args = [command, toolSettings.ToolPackageId, "--verbosity", "diagnostic", "--yes", "--source", toolPackagesPath]; + var testCommand = command == "dnx" + ? new DotnetCommand(Log, args) + : new DotnetToolCommand(Log, args); + + testCommand .WithEnvironmentVariables(homeFolder) .WithWorkingDirectory(testDirectory.Path) .Execute() @@ -290,8 +297,10 @@ public void InstallAndRunToolFromAnyRid() .And.HaveStdOutContaining("Hello Tool!"); } - [Fact] - public void InstallAndRunToolFromAnyRidWhenOtherRidsArePresentButIncompatible() + [Theory] + [InlineData("exec")] + [InlineData("dnx")] + public void InstallAndRunToolFromAnyRidWhenOtherRidsArePresentButIncompatible(string command) { var toolSettings = new TestToolBuilder.TestToolSettings() { @@ -310,7 +319,12 @@ .. expectedRids.Select(rid => $"{toolSettings.ToolPackageId}.{rid}.{toolSettings var testDirectory = _testAssetsManager.CreateTestDirectory(); var homeFolder = Path.Combine(testDirectory.Path, "home"); - new DotnetToolCommand(Log, "exec", toolSettings.ToolPackageId, "--verbosity", "diagnostic", "--yes", "--source", toolPackagesPath) + string[] args = [command, toolSettings.ToolPackageId, "--verbosity", "diagnostic", "--yes", "--source", toolPackagesPath]; + var testCommand = command == "dnx" + ? new DotnetCommand(Log, args) + : new DotnetToolCommand(Log, args); + + testCommand .WithEnvironmentVariables(homeFolder) .WithWorkingDirectory(testDirectory.Path) .Execute()