Reuse lock file when creating a runtime context
This commit is contained in:
parent
6bd374a4ec
commit
fb2326bb50
1 changed files with 5 additions and 1 deletions
|
@ -151,7 +151,11 @@ namespace Microsoft.DotNet.ProjectModel
|
||||||
.Where(t => t.TargetFramework.Equals(TargetFramework))
|
.Where(t => t.TargetFramework.Equals(TargetFramework))
|
||||||
.Any(t => !string.IsNullOrEmpty(t.RuntimeIdentifier));
|
.Any(t => !string.IsNullOrEmpty(t.RuntimeIdentifier));
|
||||||
|
|
||||||
var context = Create(ProjectFile.ProjectFilePath, TargetFramework, standalone ? runtimeIdentifiers : Enumerable.Empty<string>());
|
var context = CreateBuilder(ProjectFile.ProjectFilePath, TargetFramework)
|
||||||
|
.WithRuntimeIdentifiers(standalone ? runtimeIdentifiers : Enumerable.Empty<string>())
|
||||||
|
.WithLockFile(LockFile)
|
||||||
|
.Build();
|
||||||
|
|
||||||
if (standalone && context.RuntimeIdentifier == null)
|
if (standalone && context.RuntimeIdentifier == null)
|
||||||
{
|
{
|
||||||
// We are standalone, but don't support this runtime
|
// We are standalone, but don't support this runtime
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue