Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 2ead3f2

Browse files
authored
Merge pull request #9235 from mono/pr-work-around-multi-project-templates
[Ide] Work around bug in Xamarin.Forms multi project templates
2 parents 8ae94c6 + 3d6a673 commit 2ead3f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/MicrosoftTemplateEngineProjectTemplatingProvider.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ public async Task<ProcessedTemplateResult> ProcessTemplate (SolutionTemplate tem
105105
//TODO: Once templates support "D396686C-DE0E-4DE6-906D-291CD29FC5DE" use that to load projects
106106
foreach (var path in result.ResultInfo.PrimaryOutputs) {
107107
var fullPath = Path.Combine (config.ProjectLocation, GetPath (path));
108+
if (!File.Exists (fullPath)) {
109+
// Work around a bug in the templating engine with multi project templates
110+
// See https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1016597
111+
fullPath = fullPath.Replace ("NewApp", config.ProjectName);
112+
}
113+
108114
if (Services.ProjectService.IsSolutionItemFile (fullPath))
109115
workspaceItems.Add (await MonoDevelop.Projects.Services.ProjectService.ReadSolutionItem (new Core.ProgressMonitor (), fullPath));
110116
}

0 commit comments

Comments
 (0)