Roslyn
Mono compatible copy of Roslyn Source Code
The build requires master
Mono
673e8fa8eedc27d8f92792b7247b2fc121490b30
or newer.
C# compiler
There are a few steps required to build Roslyn on Mono:
Install PCL
Download the
PCL Reference Assemblies Windows Installer or PCL Reference Assemblies zip file
and copy the directory v4.5/Profile/Profile7
into your Mono
installation as a subdirectory of
$PREFIX/lib/mono/xbuild-frameworks/.NETPortable/v4.5/Profile/
.
Restore packages
`mono src/.nuget/NuGet.exe restore src/Roslyn.sln`
Manual changes needed
After succesfull package restore
packages/Microsoft.Net.ToolsetCompilers.1.0.0-rc1-20150122-03/build/Microsoft.Net.ToolsetCompilers.props
has to be replaced with
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DisableRoslyn>true</DisableRoslyn>
<CscToolPath Condition=" '$(OS)' == 'Windows_NT'">$(MSBuildThisFileDirectory)..\tools</CscToolPath>
<CscToolExe Condition=" '$(OS)' == 'Windows_NT'">csc2.exe</CscToolExe>
<VbcToolPath>$(MSBuildThisFileDirectory)..\tools</VbcToolPath>
<VbcToolExe>vbc2.exe</VbcToolExe>
</PropertyGroup>
</Project>
Build FakeSign tool
FakeSign tool is needed during build and needs to be build as first step
xbuild src/Tools/Source/FakeSign/FakeSign.csproj
Build C# compiler
The compiler can be built using following xbuild command line
xbuild src/Compilers/CSharp/csc/csc.csproj
The Roslyn compiler is called csc.exe
and once built it can be found in
the top level Binaries/Debug
directory.
Build C# workspace (optional)
xbuild src/Workspaces/CSharp/Portable/CSharpWorkspace.csproj
Welcome to the .NET Compiler Platform ("Roslyn")
The .NET Compiler Platform ("Roslyn") provides open-source C# and Visual Basic compilers with rich code analysis APIs. It enables building code analysis tools with the same APIs that are used by Visual Studio.
Try new language and IDE features
Just want to provide feedback on new language features and IDE features?
-
Try out Visual Studio 2015 Preview, which has the latest features built-in.
Want to keep your box clean? You can use prebuilt Azure VM images with VS 2015 Preview already installed.
-
You can also try April's End User Preview, which installs on top of Visual Studio 2013. (Note: The VS 2013 preview is quite out of date, and is no longer being updated.)
Build tools that understand C# and Visual Basic
Get started building diagnostics, code fixes, refactorings, and other code-aware tools!
To get started on Visual Studio 2015 Preview:
- Set up a box with Visual Studio 2015 Preview. Either install Visual Studio 2015 Preview, or grab a prebuilt Azure VM image.
- Install the Visual Studio 2015 Preview SDK. You'll need to do this even if you're using the Azure VM image.
- Install the SDK Templates VSIX package to get the Visual Studio project templates.
- Install the Syntax Visualizer VSIX package to get a Syntax Visualizer tool window to help explore the syntax trees you'll be analyzing.
To get started on Visual Studio 2015 CTP 5:
- Set up a box with Visual Studio 2015 CTP 5. Either install Visual Studio 2015 CTP 5, or grab a prebuilt Azure VM image.
- Install the Visual Studio 2015 CTP 5 SDK. You'll need to do this even if you're using the Azure VM image.
- Install the SDK Templates VSIX package to get the Visual Studio project templates.
- Install the Syntax Visualizer VSIX package to get a Syntax Visualizer tool window to help explore the syntax trees you'll be analyzing.
Or, you can grab the latest NuGet Roslyn compiler package. From the NuGet package manager console:
Install-Package Microsoft.CodeAnalysis -Pre
Source code
- Clone the sources:
git clone https://github.com/dotnet/roslyn.git
- Enhanced source view, powered by Roslyn
- Building, testing and debugging the sources
Get started
- Roslyn Overview
- Samples and Walkthroughs
- Syntax Visualizer Tool
- Roadmap
- Language Feature Status
- Language Design Notes
- FAQ
Contribute!
Some of the best ways to contribute are to try things out, file bugs, and join in design conversations.
Looking for something to work on? The list of up for grabs issues is a great place to start.
.NET Foundation
This project is part of the .NET Foundation along with other projects like the class libraries for .NET Core.