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

Allow for Special Characters in Project Names when Building During Watch #1439

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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