Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
Fix unit tests when working with NUnit 2.*
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Oct 10, 2016
1 parent 74b0377 commit 0eaab44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/GitLink.Tests/ProjectHelperFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ namespace GitLink.Tests
[TestFixture]
public class ProjectHelperFacts
{
private static readonly string SolutionFile = Path.Combine(
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
@"TestSolution\TestSolution.sln");
// Full path with executing assembly required for NUnit 3+
private const string SolutionFile = @"TestSolution\TestSolution.sln";
// private static readonly string SolutionFile = Path.Combine(
// Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
// @"TestSolution\TestSolution.sln");


[Test]
public void GettingProjectsFromSolution()
Expand Down
2 changes: 1 addition & 1 deletion src/GitLink/Helpers/ProjectHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static class ProjectHelper

static ProjectHelper()
{
SolutionParserType = TypeCache.GetType("Microsoft.Build.Construction.SolutionParser, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
SolutionParserType = TypeCache.GetType("Microsoft.Build.Construction.SolutionParser, Microsoft.Build");

var solutionProjectTypeType = TypeCache.GetType("Microsoft.Build.Construction.SolutionProjectType");
if (solutionProjectTypeType != null)
Expand Down

0 comments on commit 0eaab44

Please sign in to comment.