Skip to content

Commit 8f41a0d

Browse files
authored
Merge pull request #339 from AArnott/MoreMSBuildLocatorFixes
More MSBuild locator fixes
2 parents dcb9ac9 + d18e561 commit 8f41a0d

File tree

4 files changed

+9
-20
lines changed

4 files changed

+9
-20
lines changed

src/NerdBank.GitVersioning.Tests/App.config

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/NerdBank.GitVersioning.Tests/AssemblyInfoTest.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,8 @@
66
using Nerdbank.GitVersioning.Tasks;
77
using Xunit;
88

9-
public class AssemblyInfoTest
9+
public class AssemblyInfoTest : IClassFixture<MSBuildFixture>
1010
{
11-
public AssemblyInfoTest()
12-
{
13-
MSBuildExtensions.LoadMSBuild();
14-
}
15-
1611
[Fact]
1712
public void FSharpGenerator()
1813
{

src/NerdBank.GitVersioning.Tests/BuildIntegrationTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
using Xunit.Abstractions;
2424
using Version = System.Version;
2525

26-
public class BuildIntegrationTests : RepoTestBase
26+
public class BuildIntegrationTests : RepoTestBase, IClassFixture<MSBuildFixture>
2727
{
2828
private const string GitVersioningTargetsFileName = "NerdBank.GitVersioning.targets";
2929
private const string UnitTestCloudBuildPrefix = "UnitTest: ";
@@ -48,8 +48,6 @@ public class BuildIntegrationTests : RepoTestBase
4848
public BuildIntegrationTests(ITestOutputHelper logger)
4949
: base(logger)
5050
{
51-
MSBuildExtensions.LoadMSBuild();
52-
5351
int seed = (int)DateTime.Now.Ticks;
5452
this.random = new Random(seed);
5553
this.Logger.WriteLine("Random seed: {0}", seed);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
public class MSBuildFixture
2+
{
3+
public MSBuildFixture()
4+
{
5+
MSBuildExtensions.LoadMSBuild();
6+
}
7+
}

0 commit comments

Comments
 (0)