- 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.json
with 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.config
and 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-vscode
project in VS Code. PressF5
to 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.json
with following content. I.e. we want Omnisharp VS Code to launch our custom build of Omnisharp Roslyn.tools\packages.config
and add following content.build.cake
omnisharp-vscode
project in VS Code. PressF5
to 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:online
to step2.
.