5

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

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

Any ideas?

2 Answers 2

6

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

Sign up to request clarification or add additional context in comments.

Comments

0

Looks like an issue with that version of the CTP. Others are having the same issue, such as http://youtrack.jetbrains.com/issue/DOTP-4774 or http://youtrack.jetbrains.com/issue/DOTP-4836 .

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.