diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/MicrosoftTemplateEngineProjectTemplatingProvider.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/MicrosoftTemplateEngineProjectTemplatingProvider.cs index 3a27ca6b429..d8c46c7f42b 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/MicrosoftTemplateEngineProjectTemplatingProvider.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/MicrosoftTemplateEngineProjectTemplatingProvider.cs @@ -108,9 +108,11 @@ public async Task ProcessTemplate (SolutionTemplate tem if (!File.Exists (fullPath)) { // Work around a bug in the templating engine with multi project templates // See https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1016597 - fullPath = fullPath.Replace ("NewApp", config.ProjectName); + var resolvedPath = result.CreationEffects.FileChanges.OfType ().FirstOrDefault (f => f.SourceRelativePath == GetPath (path)); + if (resolvedPath != null) { + fullPath = Path.Combine (config.ProjectLocation, resolvedPath.TargetRelativePath); + } } - if (Services.ProjectService.IsSolutionItemFile (fullPath)) workspaceItems.Add (await MonoDevelop.Projects.Services.ProjectService.ReadSolutionItem (new Core.ProgressMonitor (), fullPath)); }