How add existing project to c# solution with roslyn?
问题 I want to add an existing project to my c# solution.I used TryApplyChanges and it returns true but it doesn't save changes to real Solution. I used Microsoft.CodeAnalysis.* version 1.1.1. public void AddProject (string solutionName) { MSBuildWorkspace ws=MSBuildWorkspace.Create (); ws.OpenSolutionAsync (solutionName); ws.OpenProjectAsync ("ProjectName"); if (ws.TryApplyChanges (ws.CurrentSolution ) {// break point is here } } 回答1: There's a few problems with your code: MSBuildWorkspace doesn