Walkthroughs - PeterMortensen/roslyn GitHub Wiki
Before attempting any of these walkthroughs, please ensure the proper version of Visual Studio is installed as described on the Building Testing and Debugging and there is a copy of the git repo on your local machine.
Install and build Roslyn
- Checkout the branch that matches the downloaded preview E.g: Git checkout releases/Dev14CTP5
- Start VS, Load the Roslyn Solution
- Set the Tools\OpenSourceDebug project to the default project
- Use the menu to build the solution
Build and Debug Roslyn with Visual Studio
- Press F5 to start debugging
- The solution will build and start a new instance of Visual Studio
- In the new instance of VS create a new C# or VB project
- In the VS with the Roslyn solution open, add a breakpoint to the file: Workspaces\workspace\workspace.cs at line 142
- Add an interface to the project created earlier and see the breakpoint hit.
Build Project with OSS compilers within Visual Studio
- Press F5 to start a new instance of VS
- Create a new C# or VB project
- Use Tools/Options/Projects and Solutions/Build and Run to set the 'Build Project Verbosity' to 'Normal' so that we can ensure the correct compiler was used
- Build the solution you built above.
- Look in the build 0utput window and observe the compiler used is similar to:
%USERPROFILE%\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0ROSLYN\EXTENSIONS\MSOPENTECH\OPENSOURCEDEBUG\1.0\csc.exe
Build with OSS Roslyn compilers using MSBUILD
- In a Visual Studio Command Shell, type the following command:
- MSBUILD ConsoleApplication01.csproj /t:Rebuild /p:RoslynHive=VisualStudio\14.0Roslyn
- In the build output from this command observe a compiler command line similar to:
%USERPROFILE%\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0ROSLYN\EXTENSIONS\MSOPENTECH\OPENSOURCEDEBUG\1.0\csc.exe