Skip to content

Commit

Permalink
Merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
zijchen committed Aug 5, 2024
1 parent 34001a2 commit a6ff7b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/Microsoft.Build.Sql.Tests/CodeAnalysisTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public class CodeAnalysisTests : DotnetTestBase
[Test]
public void VerifyCodeAnalyzerFromProjectReference()
{
string tempFolder = Path.Combine(Path.GetTempPath(), TestContext.CurrentContext.Test.Name);
// Copy the analyzer project to a temp folder
string tempFolder = TestUtils.CreateTempDirectory();
TestUtils.CopyDirectoryRecursive(Path.Combine(this.CommonTestDataDirectory, "CodeAnalyzerSample"), tempFolder);

// Add the analyzer csproj as a ProjectReference to the test sqlproj
Expand Down Expand Up @@ -44,7 +45,7 @@ public void VerifyCodeAnalyzerFromProjectReference()
public void VerifyCodeAnalyzerFromPackageReference()
{
// Set up and create the analyzer package
string tempFolder = Path.Combine(Path.GetTempPath(), TestContext.CurrentContext.Test.Name);
string tempFolder = TestUtils.CreateTempDirectory();
TestUtils.CopyDirectoryRecursive(Path.Combine(CommonTestDataDirectory, "CodeAnalyzerSample"), tempFolder);
RunGenericDotnetCommand($"pack {Path.Combine(tempFolder, "CodeAnalyzerSample.csproj")} -o {tempFolder}", out _, out _);

Expand Down

0 comments on commit a6ff7b4

Please sign in to comment.