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

[Ide] Proper workaround for multi project templates bug #9261

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ public async Task<ProcessedTemplateResult> 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<IFileChange2> ().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));
}
Expand Down