Roslyn - Cannot find SyntaxNode.ReplaceNode ()

Following this guide http://msdn.microsoft.com/en-us/vstudio/hh543922.aspx , I am trying to use the ReplaceNode method, which should be in the SyntaxNode class.

The fact is that I have this error: "Roslyn.Compiler.CSharp.SyntaxNode does not contain a definition for" ReplaceNode "

Any ideas?

+5
source share
2 answers

ReplaceNodeis actually an extension method (so that it can return the type passed in). Make sure you have using Roslyn.Compilers;andusing Roslyn.Compilers.CSharp;

+6
source

All Articles