Setup .NET Project with Roslyn
Yesterday Microsoft released first Community Technology Preview of the Roslyn Project. With the release of Roslyn Project, First time Microsoft is opening up the C# and Visual Basic compilers through Rich Roslyn API. More detail about Core API and others feature of October CTP released can be found here.
In this post we will see how to setup .NET project with Roslyn.
Prerequisite
Visual Studio 2010 SP1 SDK (Download it here)
Microsoft “Roslyn” CTP (Download it here)
Setup Project with Roslyn
Create new project (Web / Console / Windows)
From Project menu click on Add Reference, it will open Add Reference dialog box.
You need to add reference to Roslyn.Compilers and Roslyn.Services.CSharp or Roslyn.Compilers.VisualBasic depending upon your project language C# or Visual Basic.
You can find these assemble under .NET tab of Add Reference dialog. Add reference to appropriate assembly as listed above.
In case if you do not find above assembly under .NET tab then navigate to Browse tab and look in C:\Program Files\Reference Assemblies\Microsoft\Roslyn\v1.0 directory. By default all Roslyn assembly are placed at that location.
That’s it, you have done!!! You can now leverage the rich Roslyn API to build application or extensions based on Roslyn.