MSBuildProjectDescriptions has dedicated property for the csproj path
This commit is contained in:
parent
ec5f88e994
commit
9cc3d088f0
2 changed files with 14 additions and 13 deletions
|
@ -9,15 +9,17 @@ namespace Microsoft.DotNet.ProjectModel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an MSBuild project.
|
/// 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.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class MSBuildProjectDescription : TargetLibraryWithAssets
|
public class MSBuildProjectDescription : TargetLibraryWithAssets
|
||||||
{
|
{
|
||||||
public MSBuildProjectDescription(
|
public MSBuildProjectDescription(
|
||||||
string path,
|
string path,
|
||||||
|
string msbuildProjectPath,
|
||||||
LockFileProjectLibrary projectLibrary,
|
LockFileProjectLibrary projectLibrary,
|
||||||
LockFileTargetLibrary lockFileLibrary,
|
LockFileTargetLibrary lockFileLibrary,
|
||||||
Project projectFile,
|
|
||||||
IEnumerable<LibraryRange> dependencies,
|
IEnumerable<LibraryRange> dependencies,
|
||||||
bool compatible,
|
bool compatible,
|
||||||
bool resolved)
|
bool resolved)
|
||||||
|
@ -31,12 +33,11 @@ namespace Microsoft.DotNet.ProjectModel
|
||||||
compatible: compatible,
|
compatible: compatible,
|
||||||
framework: null)
|
framework: null)
|
||||||
{
|
{
|
||||||
ProjectFile = projectFile;
|
|
||||||
ProjectLibrary = projectLibrary;
|
ProjectLibrary = projectLibrary;
|
||||||
|
MsbuildProjectPath = msbuildProjectPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LockFileProjectLibrary ProjectLibrary { get; }
|
public LockFileProjectLibrary ProjectLibrary { get; }
|
||||||
|
public string MsbuildProjectPath { get; set; }
|
||||||
public Project ProjectFile { get; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,10 +36,10 @@ namespace Microsoft.DotNet.ProjectModel.Resolution
|
||||||
var projectFile = projectLibrary.Path == null ? null : _projectResolver(projectLibrary.Path);
|
var projectFile = projectLibrary.Path == null ? null : _projectResolver(projectLibrary.Path);
|
||||||
|
|
||||||
var msbuildPackageDescription = new MSBuildProjectDescription(
|
var msbuildPackageDescription = new MSBuildProjectDescription(
|
||||||
|
projectLibrary.Path,
|
||||||
msbuildProjectPath,
|
msbuildProjectPath,
|
||||||
projectLibrary,
|
projectLibrary,
|
||||||
targetLibrary,
|
targetLibrary,
|
||||||
projectFile,
|
|
||||||
dependencies,
|
dependencies,
|
||||||
compatible,
|
compatible,
|
||||||
resolved: compatible && exists);
|
resolved: compatible && exists);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue