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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
4 deletions
-
src/Microsoft.Tye.Core/MsBuild/ProjectInSolution.cs
-
src/Microsoft.Tye.Hosting/BuildWatcher.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) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -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( |
|
|
|
|