diff --git a/src/Microsoft.DotNet.ProjectModel/MSBuildProjectDescription.cs b/src/Microsoft.DotNet.ProjectModel/MSBuildProjectDescription.cs
index f36e57f00..05252a7dd 100644
--- a/src/Microsoft.DotNet.ProjectModel/MSBuildProjectDescription.cs
+++ b/src/Microsoft.DotNet.ProjectModel/MSBuildProjectDescription.cs
@@ -9,17 +9,19 @@ namespace Microsoft.DotNet.ProjectModel
{
///
/// Represents an MSBuild project.
- /// It has been invisibly built by MSBuild, so it behaves like a package: can provide all assets up front
+ /// It has been built by MSBuild, so it behaves like a package: can provide all assets up front
+ ///
+ /// The Path represents the path to the project.json, if there is one near the csproj file.
///
public class MSBuildProjectDescription : TargetLibraryWithAssets
{
public MSBuildProjectDescription(
- string path,
- LockFileProjectLibrary projectLibrary,
- LockFileTargetLibrary lockFileLibrary,
- Project projectFile,
- IEnumerable dependencies,
- bool compatible,
+ string path,
+ string msbuildProjectPath,
+ LockFileProjectLibrary projectLibrary,
+ LockFileTargetLibrary lockFileLibrary,
+ IEnumerable dependencies,
+ bool compatible,
bool resolved)
: base(
new LibraryIdentity(projectLibrary.Name, projectLibrary.Version, LibraryType.MSBuildProject),
@@ -31,12 +33,11 @@ namespace Microsoft.DotNet.ProjectModel
compatible: compatible,
framework: null)
{
- ProjectFile = projectFile;
ProjectLibrary = projectLibrary;
+ MsbuildProjectPath = msbuildProjectPath;
}
public LockFileProjectLibrary ProjectLibrary { get; }
-
- public Project ProjectFile { get; }
+ public string MsbuildProjectPath { get; set; }
}
}
diff --git a/src/Microsoft.DotNet.ProjectModel/Resolution/MSBuildDependencyProvider.cs b/src/Microsoft.DotNet.ProjectModel/Resolution/MSBuildDependencyProvider.cs
index e67e1c313..f117c39bb 100644
--- a/src/Microsoft.DotNet.ProjectModel/Resolution/MSBuildDependencyProvider.cs
+++ b/src/Microsoft.DotNet.ProjectModel/Resolution/MSBuildDependencyProvider.cs
@@ -36,12 +36,12 @@ namespace Microsoft.DotNet.ProjectModel.Resolution
var projectFile = projectLibrary.Path == null ? null : _projectResolver(projectLibrary.Path);
var msbuildPackageDescription = new MSBuildProjectDescription(
+ projectLibrary.Path,
msbuildProjectPath,
projectLibrary,
targetLibrary,
- projectFile,
- dependencies,
- compatible,
+ dependencies,
+ compatible,
resolved: compatible && exists);
return msbuildPackageDescription;