Skip to content

Commit 5794020

Browse files
committed
Support reloading multi tfm projects
1 parent e021a2c commit 5794020

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/SharpIDE.Application/Features/Analysis/RoslynAnalysis.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,9 @@ public async Task ReloadProject(SharpIdeProjectModel projectModel, CancellationT
234234
// The ProjectIds will not match however, so we need to match on FilePath
235235
// Since the ProjectIds don't match, we also need to remap all ProjectReferences to the existing ProjectIds
236236
// same for documents
237-
// TODO: Handle multiple TFMs - loadedProjectInfos would contain multiple projects with the same FilePath
238237
var projectInfosToUpdateWith = loadedProjectInfos.Select(loadedProjectInfo =>
239238
{
240-
var existingProject = _workspace.CurrentSolution.Projects.Single(p => p.FilePath == loadedProjectInfo.FilePath);
239+
var existingProject = _workspace.CurrentSolution.Projects.Single(p => p.FilePath == loadedProjectInfo.FilePath && p.Name == loadedProjectInfo.Name);
241240
var projectInfo = loadedProjectInfo
242241
.WithId(existingProject.Id)
243242
.WithDocuments(MapDocuments(_workspace.CurrentSolution, existingProject.Id, loadedProjectInfo.Documents))

0 commit comments

Comments
 (0)