Update lock file format

project libraries can have a msbuildProject element
This commit is contained in:
Mihai Codoban 2016-03-22 21:00:07 -07:00
parent fb2326bb50
commit 552ac6282f
2 changed files with 13 additions and 4 deletions

View file

@ -12,5 +12,7 @@ namespace Microsoft.DotNet.ProjectModel.Graph
public NuGetVersion Version { get; set; }
public string Path { get; set; }
public string MSBuildProject { get; set; }
}
}

View file

@ -105,12 +105,19 @@ namespace Microsoft.DotNet.ProjectModel.Graph
}
else if (type == "project")
{
lockFile.ProjectLibraries.Add(new LockFileProjectLibrary
var projectLibrary = new LockFileProjectLibrary
{
Name = name,
Version = version,
Path = ReadString(value.Value("path"))
});
Version = version
};
var pathValue = value.Value("path");
projectLibrary.Path = pathValue == null ? null : ReadString(pathValue);
var buildTimeDependencyValue = value.Value("msbuildProject");
projectLibrary.MSBuildProject = buildTimeDependencyValue == null ? null : ReadString(buildTimeDependencyValue);
lockFile.ProjectLibraries.Add(projectLibrary);
}
}
}