From 0d9d03c7c1bd40f11241afeda9c69e6f6f631f3f Mon Sep 17 00:00:00 2001 From: Z Chen <13544267+zijchen@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:25:32 -0800 Subject: [PATCH] Test fix (#533) * Update Microsoft.Build.Sql.csproj * Update ScriptDom to 161.9123.0 * Add target to remove included files via :r from build * Update System.IO.Packaging to 8.0.1 * Fix test VerifyCodeAnalyzerFromPackageReference * Update DacFx to 162.5.57 * Fix merge conflict * Clean up extra space --- test/Microsoft.Build.Sql.Tests/CodeAnalysisTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Microsoft.Build.Sql.Tests/CodeAnalysisTests.cs b/test/Microsoft.Build.Sql.Tests/CodeAnalysisTests.cs index 0d74ae6..2a5ffe9 100644 --- a/test/Microsoft.Build.Sql.Tests/CodeAnalysisTests.cs +++ b/test/Microsoft.Build.Sql.Tests/CodeAnalysisTests.cs @@ -47,19 +47,19 @@ public void VerifyCodeAnalyzerFromPackageReference() // Set up and create the analyzer package string tempFolder = TestUtils.CreateTempDirectory(); TestUtils.CopyDirectoryRecursive(Path.Combine(CommonTestDataDirectory, "CodeAnalyzerSample"), tempFolder); - RunGenericDotnetCommand($"pack {Path.Combine(tempFolder, "CodeAnalyzerSample.csproj")} -o {tempFolder}", out _, out _); + RunGenericDotnetCommand($"pack {Path.Combine(tempFolder, "CodeAnalyzerSample.csproj")} -o {tempFolder} -p:Version=1.1.1-test", out _, out _); // Copy analyzer package to local Nuget source - string analyzerPackagePath = Path.Combine(tempFolder, "CodeAnalyzerSample.1.0.0.nupkg"); + string analyzerPackagePath = Path.Combine(tempFolder, "CodeAnalyzerSample.1.1.1-test.nupkg"); FileAssert.Exists(analyzerPackagePath); - File.Copy(analyzerPackagePath, Path.Combine(WorkingDirectory, "pkg", "CodeAnalyzerSample.1.0.0.nupkg")); + File.Copy(analyzerPackagePath, Path.Combine(WorkingDirectory, "pkg", "CodeAnalyzerSample.1.1.1-test.nupkg")); // Add the analyzer package as a PackageReference to the test sqlproj ProjectUtils.AddItemGroup(this.GetProjectFilePath(), "PackageReference", new string[] { "CodeAnalyzerSample" }, item => { - item.AddMetadata("Version", "1.0.0"); + item.AddMetadata("Version", "1.1.1-test"); }); // Set up code analysis properties