Skip to content

Commit 102f0e3

Browse files
committed
Fix path of project references in test projects
By removing filenames from paths, the relative path to the reference will be created correctly.
1 parent c77f0c7 commit 102f0e3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Moryx.Cli.Commands/Components/ProjectFileManipulation.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using Castle.MicroKernel.Registration;
2-
using Microsoft.AspNetCore.Routing.Constraints;
3-
using Moryx.Container;
4-
using System.Xml;
1+
using System.Xml;
52
using System.Xml.Linq;
63

74
namespace Moryx.Cli.Commands.Components
@@ -14,7 +11,8 @@ internal class ProjectFileManipulation
1411
public static void AddProjectReference(string targetProjectFileName, string referenceProjectFileName)
1512
{
1613

17-
var referencePath = Path.GetRelativePath(targetProjectFileName, referenceProjectFileName);
14+
var referencePath = Path.GetRelativePath(Path.GetDirectoryName(targetProjectFileName), Path.GetDirectoryName(referenceProjectFileName));
15+
referencePath = Path.Combine(referencePath, Path.GetFileName(referenceProjectFileName));
1816

1917
var projectFile = LoadXml(targetProjectFileName);
2018

0 commit comments

Comments
 (0)