- Clone Omnisharp Roslyn and build that
git clone https://github.com/cake-build/omnisharp-roslyn
cd omnisharp-roslyn
git checkout feature/cake
.\build.ps1 -Target Quick
- Clone Omnisharp VS Code and build that
git clone https://github.com/cake-build/omnisharp-vscode
cd omnisharp-vscode
git checkout feature/cake
npm i; npm run compile
- Prepare test project for usage. Create
.vscode/settings.jsonwith following content. I.e. we want Omnisharp VS Code to launch our custom build of Omnisharp Roslyn.
{
"omnisharp.path": "path\\to\\omnisharp-roslyn\\artifacts\\publish\\OmniSharp.Stdio\\win7-x64\\OmniSharp.exe",
"omnisharp.loggingLevel": "trace"
}- Create
tools\packages.configand add following content.
<packages>
<package id="Cake" version="0.22.2" />
<package id="Cake.Bakery" version="0.1.0-unstable0113" />
</packages>
- nuget restore from source https://www.myget.org/F/cake/api/v3/index.json
- Create your
build.cake - Open up the
omnisharp-vscodeproject in VS Code. PressF5to launch. In the newly opened window, open up your test project. - Open your
build.cake. - You should see some output from
Omnisharp.
Example project found here: https://github.com/mholo65/cake-omnisharp-bakery-example
Pro-tip:
If you like to avoid having to do step 7., you can create a VSIX package from the VSCode extension and simply install that to VS Code. To generate a VSIX package simply append node_modules\.bin\gulp package:online to step 2..
Steps for Mac OS X
.vscode/settings.jsonwith following content. I.e. we want Omnisharp VS Code to launch our custom build of Omnisharp Roslyn.{ "omnisharp.loggingLevel": "trace", "omnisharp.useMono": true, "omnisharp.path": "/path/to/omnisharp-roslyn/artifacts/publish/OmniSharp.Stdio/mono/OmniSharp.exe" }tools\packages.configand add following content.build.cakeomnisharp-vscodeproject in VS Code. PressF5to launch. In the newly opened window, open up your test project.build.cake.Omnisharp.Example project found here:
https://github.com/mholo65/cake-omnisharp-bakery-example
Pro-tip:
If you like to avoid having to do step
8., you can create a VSIX package from the VSCode extension and simply install that to VS Code. To generate a VSIX package simply appendnode_modules\.bin\gulp package:onlineto step2..