From f0c8eb8e8fcc09d20ff7348a87fe3d7955de42f4 Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Wed, 7 Feb 2018 11:48:32 -0600 Subject: [PATCH] Convert solution relative paths to OS slashes Fixes #2022, fixes #1957. Ported the code change only from https://github.com/mono/msbuild/commit/86adc961fedefef300b6273b22611410ac87270b. --- src/Build/Construction/Solution/ProjectInSolution.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Build/Construction/Solution/ProjectInSolution.cs b/src/Build/Construction/Solution/ProjectInSolution.cs index 453879eb1b9..fc2db99b2a8 100644 --- a/src/Build/Construction/Solution/ProjectInSolution.cs +++ b/src/Build/Construction/Solution/ProjectInSolution.cs @@ -8,13 +8,13 @@ using System.Security; using System.Text; using System.Xml; +using Microsoft.Build.Shared; using XMakeAttributes = Microsoft.Build.Shared.XMakeAttributes; using ProjectFileErrorUtilities = Microsoft.Build.Shared.ProjectFileErrorUtilities; using BuildEventFileInfo = Microsoft.Build.Shared.BuildEventFileInfo; using ErrorUtilities = Microsoft.Build.Shared.ErrorUtilities; using System.Collections.ObjectModel; -using System.Linq; namespace Microsoft.Build.Construction { @@ -155,7 +155,11 @@ public string ProjectName public string RelativePath { get { return _relativePath; } - internal set { _relativePath = value; } + internal set + { + _relativePath = FileUtilities.MaybeAdjustFilePath(value, + baseDirectory:this.ParentSolution.SolutionFileDirectory ?? String.Empty); + } } ///