Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Commit

Permalink
Provide the unique proejct name to the -target flag when doing an msb…
Browse files Browse the repository at this point in the history
…uild <solution> -target:{unique project name} (#1439)
  • Loading branch information
a-shoemaker committed Dec 12, 2022
1 parent 49f93c5 commit 166601d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Microsoft.Tye.Core/MsBuild/ProjectInSolution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ internal bool CanBeMSBuildProjectFile(out string errorMessage)
/// <summary>
/// Find the unique name for this project, e.g. SolutionFolder\SubSolutionFolder\Project_Name
/// </summary>
internal string GetUniqueProjectName()
public string GetUniqueProjectName()
{
if (_uniqueProjectName == null)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.Tye.Hosting/BuildWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ private async Task ResetAsync()
}
}

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();
}
}

Expand Down Expand Up @@ -205,7 +205,7 @@ async Task WithRequestCompletion(IEnumerable<BuildRequest> requests, Func<Task<i

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(
Expand Down

0 comments on commit 166601d

Please sign in to comment.