Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Rename sources to projectSearchPaths in global.json #1056

Merged
merged 1 commit into from
Jan 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/Microsoft.Framework.Runtime/GlobalSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class GlobalSettings
{
public const string GlobalFileName = "global.json";

public IList<string> SourcePaths { get; private set; }
public IList<string> ProjectSearchPaths { get; private set; }
public IDictionary<Library, string> PackageHashes { get; private set; }
public string PackagesPath { get; private set; }
public string FilePath { get; private set; }
Expand Down Expand Up @@ -53,10 +53,11 @@ public static bool TryGetGlobalSettings(string path, out GlobalSettings globalSe
throw FileFormatException.Create(ex, globalJsonPath);
}

var sources = settings["sources"];
// TODO: Remove sources
var projectSearchPaths = settings["projects"] ?? settings["sources"];
var dependencies = settings["dependencies"] as JObject;

globalSettings.SourcePaths = sources == null ? new string[] { } : sources.ToObject<string[]>();
globalSettings.ProjectSearchPaths = projectSearchPaths == null ? new string[] { } : projectSearchPaths.ToObject<string[]>();
globalSettings.PackagesPath = settings.Value<string>("packages");
globalSettings.PackageHashes = new Dictionary<Library, string>();
globalSettings.FilePath = globalJsonPath;
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Framework.Runtime/ProjectResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private IEnumerable<string> ResolveSearchPaths(string projectPath, string rootPa

if (GlobalSettings.TryGetGlobalSettings(rootPath, out global))
{
foreach (var sourcePath in global.SourcePaths)
foreach (var sourcePath in global.ProjectSearchPaths)
{
paths.Add(Path.Combine(rootPath, sourcePath));
}
Expand Down