Complete configurations based on project file if present.

This commit is contained in:
dasMulli 2018-08-03 03:05:55 +02:00
parent 7ae822277d
commit f77ee9a4d7
No known key found for this signature in database
GPG key ID: 18CD0491A7182D5F
4 changed files with 20 additions and 3 deletions

View file

@ -25,6 +25,7 @@ namespace Microsoft.DotNet.Tools
private ProjectCollection _projects;
private List<NuGetFramework> _cachedTfms = null;
private IEnumerable<string> cachedRuntimeIdentifiers;
private IEnumerable<string> cachedConfigurations;
private MsbuildProject(ProjectCollection projects, ProjectRootElement project)
{
@ -168,6 +169,12 @@ namespace Microsoft.DotNet.Tools
return _cachedTfms;
}
public IEnumerable<string> GetConfigurations()
{
return cachedConfigurations ??
(cachedConfigurations = GetEvaluatedProject().GetConfigurations());
}
public bool CanWorkOnFramework(NuGetFramework framework)
{
foreach (var tfm in GetTargetFrameworks())