Question

I am having some troubles installing the Roslyn Preview.

I am using VS 2013 Premium.

I've download the package from the site and installed the vsix and everything goes well no errors.

But even after restarting VS it still does not recognize the new language features.

Tried that 3 times. Even restarting the machine but nothing works.

Does anyone knows how to correct that?

Thanks

==== Added for clarification as requested ====

The code does not compile. It complains on the code as the preview didn't exists. In the following simple sample:

if (int.TryParse(value, out int result)) { ... }

It complains with the "int" and does not declare the result variable.

In other words it is still using the old syntax.

Just for additional information I also have Resharper v8 installed. I don't know if it is relevant (should not be actually).

Was it helpful?

Solution

I've manage to solve the conundrum.

Restarting Visual Studio is not enough. You have to create a new project. Even if you want to use the Preview in an existing project you have to create a new project and just discard it.

After that reopen the previous existing one and the compilation will proceed with the new standards.

One note about Resharper: Since Resharper does not yet recognize the new syntax it will color the "errors" in red and put the squiggly line but now the code is compiling and the build does not generate any errors.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top