Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffkl committed Dec 7, 2022
1 parent 79c52df commit 0c8b74e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//
// Licensed under the MIT license.

using Microsoft.Build.Construction;
using Microsoft.Build.Evaluation;
using Microsoft.Build.Exceptions;
using Shouldly;
Expand All @@ -10,7 +11,7 @@

namespace Microsoft.Build.Utilities.ProjectCreation.UnitTests
{
public class ProjectTests : MSBuildTestBase
public class ProjectTests : TestBase
{
[Fact]
public void ProjectInstanceGetsCorrectObject()
Expand Down Expand Up @@ -77,10 +78,13 @@ public void ProjectWithGlobalPropertiesFromProjectCollection()
[Fact]
public void TryGetProjectBuildOutput()
{
ProjectRootElement import = ProjectCreator.Create()
.Save(GetTempProjectPath());

ProjectCreator.Create()
.Property("ImportDirectoryBuildTargets", "false")
.Import(@"$(MSBuildBinPath)\Microsoft.Common.targets")
.Import(@"$(MSBuildBinPath)\Microsoft.Common.targets")
.Import(import.FullPath)
.Import(import.FullPath)
.TryGetProject(out Project _, out BuildOutput buildOutput);

buildOutput.WarningEvents.ShouldHaveSingleItem(buildOutput.GetConsoleLog()).Code.ShouldBe("MSB4011", buildOutput.GetConsoleLog());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public string TargetFramework
#elif NET6_0
"net6.0";
#else
"net472";
"netstandard2.0";
#endif
}

Expand Down

0 comments on commit 0c8b74e

Please sign in to comment.