Skip to content

Build from Source

Gabe Stocco edited this page Apr 18, 2024 · 10 revisions

This page describes the build processes for DevSkim version 0.8 or later.

DevSkim CLI

Requirements

How to Build

Via IDE

  1. Download or clone a local copy of the DevSkim repository

    git clone https://github.com/microsoft/DevSkim.git

  2. Navigate to the DevSkim-DotNet folder

    cd DevSkim\DevSkim-DotNet

  3. Open Microsoft.DevSkim.sln in your IDE

  4. Set Microsoft.DevSkim.CLI as your startup project

  5. Run / build / debug as desired

Via Command Line

  1. Download or clone a local copy of the DevSkim repository

    git clone https://github.com/microsoft/DevSkim.git

  2. Navigate to the Microsoft.DevSkim.CLI folder

    cd DevSkim\DevSkim-DotNet\Microsoft.DevSkim.CLI

  3. Build the CLI using dotnet

    dotnet build

  4. Run the devskim DLL using dotnet

    dotnet bin\debug\net7.0\devskim.dll

Visual Studio Extension

Requirements

How to Build

Via IDE

  1. Download or clone a local copy of the DevSkim repository

    git clone https://github.com/microsoft/DevSkim.git

  2. Navigate to the DevSkim-DotNet folder

    cd DevSkim\DevSkim-DotNet

  3. Open Microsoft.DevSkim.sln in your IDE

  4. Set Microsoft.DevSkim.VisualStudio as your startup project

  5. Run / build / debug as desired

Via Command Line

  1. Run the Visual Studio Developer Command Prompt

  2. Download or clone a local copy of the DevSkim repository

    git clone https://github.com/microsoft/DevSkim.git

  3. Navigate to the Microsoft.DevSkim.VisualStudio folder

    cd DevSkim\DevSkim-DotNet\Microsoft.DevSkim.VisualStudio

  4. Build the extension using msbuild

    msbuild Microsoft.DevSkim.VisualStudio.csproj -restore

  5. Extension package is located at:

    Microsoft.DevSkim.VisualStudio\bin\Debug\Microsoft.DevSkim.VisualStudio.vsix

Installation

  • Run (or double-click) the VSIX package for guided installation

Visual Studio Code Extension

Requirements

How to Build

Via VS Code

  1. Download or clone a local copy of the DevSkim repository

    git clone https://github.com/microsoft/DevSkim.git

  2. Open the DevSkim folder in VS Code

  3. Select Run and Debug (Ctrl + Shift + D)

  4. Select Clean + Launch VSC Client

  5. Start Debugging (F5)

Via Command Line

  1. Download or clone a local copy of the DevSkim repository

    git clone https://github.com/microsoft/DevSkim.git

  2. Navigate to the DevSkim-VsCode-Plugin folder

    cd DevSkim\DevSkim-VsCode-Plugin

  3. Use npm to install dependencies

    npm install

  4. Run the extension packaging script to produce a VSIX package

    npm run pack-ext

  5. Extension package is located at:

    DevSkim-VsCode-Plugin\vscode-devskim-0.8.55.vsix

Installation

  • Install via VS Code extension manager

    -or-

  • Install via command line using the code utility provided by VS Code

    code --install-extension vscode-devskim-0.8.55.vsix

References