Does that help How can I change name of (IProject) in Roslyn? I found only the extension method UpdateAssemblyName(), but it do something else (of course). , Roslyn doesn't currently offer a way to rename a project, sorry.
Not finding all of the symbols I need,How to find more symbols using the Roslyn API
seems to work fine So FindSymbolAtPosition should work just fine -- it's after all the same API we use for things like go to definition or any other core language feature. What I would guess here is your compilation or semantic model isn't complete, and so when we try to bind Schema or Name we for some reason. The recommendation API might be able to figure out the type of the parent and know it has members, but for some reason those members aren't properly binding. What I would recommend you try is in your semantic model or compilation, call GetDiagnostics and verify there aren't any unexpected errors there. You might be missing a reference that's causing everything to go sideways, and clearing that will make this work fine.
Reliably compare type symbols (ITypeSymbol) with Roslyn
will help you One possibility is to call SymbolFinder.FindSimilarSymbols which will give you a symbol in your new solution that matches by name and a few other properties. From there you could Equals in your newer Compilation.
How to include keywords and aliases in Roslyn recommended symbols?
should help you out It seems that Recommender.GetRecommendedSymbolsAtPositionAsync provides only symbols completion. That mean, Methods, Types etc (ISymbol implementations). If you want keywords or snippets completion, you can use Microsoft.CodeAnalysis.Completion.CompletionService
var code = @"using System;
fo // I want to get 'for' completion for this
var completionIndex = code.LastIndexOf("fo") + 2;
// Assume you have a method that create a workspace for you
var workspace = CreateWorkspace("newSln", "newProj", code);
var doc = workspace.CurrentSolution.Projects.First().Documents.First();
var service = CompletionService.GetService(doc);
var completionItems = service.GetCompletionsAsync(doc, completionIndex).Result.Items;
foreach (var result in completionItems)