From 5556ed2e3d933ea2e2b2369e2d5c093099f75db9 Mon Sep 17 00:00:00 2001 From: Tomasz Heimowski Date: Tue, 30 Sep 2014 19:39:43 +0200 Subject: [PATCH] dont create relative path --- src/Paket/SolutionFile.fs | 8 +++----- .../convert-paket-sln-folder-158/original/solution.sln | 5 +++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Paket/SolutionFile.fs b/src/Paket/SolutionFile.fs index ce0387c871..0c6f94b926 100644 --- a/src/Paket/SolutionFile.fs +++ b/src/Paket/SolutionFile.fs @@ -13,7 +13,7 @@ type SolutionFile(fileName: string) = let removeNugetSlnFolderIfEmpty() = match content |> Seq.tryFindIndex (fun line -> - line.StartsWith(sprintf """Project({%s})""" slnFolderProjectGuid) && line.Contains(".nuget")) with + line.StartsWith(sprintf "Project(\"{%s}\")" slnFolderProjectGuid) && line.Contains(".nuget")) with | Some(index) -> if content.[index+1].Contains("ProjectSection(SolutionItems)") && content.[index+2].Contains("EndProjectSection") && @@ -33,13 +33,11 @@ type SolutionFile(fileName: string) = member __.AddPaketFolder(dependenciesFile, lockFile) = match content |> Seq.tryFindIndex (fun line -> line.StartsWith("MinimumVisualStudioVersion")) with | Some index -> - let depFile = createRelativePath dependenciesFile fileName - let lockFile = lockFile |> Option.map (fun l -> createRelativePath l fileName) let lines = ResizeArray<_>() - lines.Add(sprintf "Project(\"{%s}\") = \".paket\", \".paket\", \"{%s}\"" slnFolderProjectGuid <| Guid.NewGuid().ToString("D")) + lines.Add(sprintf "Project(\"{%s}\") = \".paket\", \".paket\", \"{%s}\"" slnFolderProjectGuid <| Guid.NewGuid().ToString("D").ToUpper()) lines.Add " ProjectSection(SolutionItems) = preProject" - lines.Add(sprintf " %s = %s" depFile depFile) + lines.Add(sprintf " %s = %s" dependenciesFile dependenciesFile) if lockFile |> Option.isSome then lines.Add(sprintf" %s = %s" lockFile.Value lockFile.Value) lines.Add " EndProjectSection" diff --git a/system-tests/convert-paket-sln-folder-158/original/solution.sln b/system-tests/convert-paket-sln-folder-158/original/solution.sln index 17217165d1..53878017d6 100644 --- a/system-tests/convert-paket-sln-folder-158/original/solution.sln +++ b/system-tests/convert-paket-sln-folder-158/original/solution.sln @@ -3,6 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.30501.0 MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{A46447A8-8FAF-442D-ADCC-DEB2EBB2067A}" + ProjectSection(SolutionItems) = preProject + .nuget\packages.config = .nuget\packages.config + EndProjectSection +EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE