Browse Source

Provide the unique proejct name to the -target flag when doing an msbuild <solution> -target:{unique project name} (#1439)

main
Austin Shoemaker 4 years ago
committed by GitHub
parent
commit
166601db52
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Microsoft.Tye.Core/MsBuild/ProjectInSolution.cs
  2. 6
      src/Microsoft.Tye.Hosting/BuildWatcher.cs

2
src/Microsoft.Tye.Core/MsBuild/ProjectInSolution.cs

@ -375,7 +375,7 @@ namespace Microsoft.Build.Construction
/// <summary>
/// Find the unique name for this project, e.g. SolutionFolder\SubSolutionFolder\Project_Name
/// </summary>
internal string GetUniqueProjectName()
public string GetUniqueProjectName()
{
if (_uniqueProjectName == null)
{

6
src/Microsoft.Tye.Hosting/BuildWatcher.cs

@ -110,13 +110,13 @@ namespace Microsoft.Tye.Hosting
}
}
private static string GetProjectName(SolutionFile solution, string projectFile)
private static string GetUniqueProjectName(SolutionFile solution, string projectFile)
{
foreach (var project in solution.ProjectsInOrder)
{
if (project.AbsolutePath == projectFile)
{
return project.ProjectName;
return project.GetUniqueProjectName();
}
}
@ -205,7 +205,7 @@ namespace Microsoft.Tye.Hosting
if (solutionBatch.Any())
{
var targets = String.Join(",", solutionBatch.Keys.Select(key => GetProjectName(solution!, key)));
var targets = String.Join(",", solutionBatch.Keys.Select(key => GetUniqueProjectName(solution!, key)));
tasks.Add(
WithRequestCompletion(

Loading…
Cancel
Save