Skip to content

Latest commit

 

History

History
79 lines (50 loc) · 3.8 KB

CONTRIBUTING.md

File metadata and controls

79 lines (50 loc) · 3.8 KB

Contribution guide

Setup development environment

Download and install Visual Studio 2022 from official website.

Install the Visual Studio SDK as part of a Visual Studio installation. For details, please, see this page.

Visual Studio components could be modified using "Modify" button.

Visual Studio Installer Modify components

Please, check the "Visual Studio extension development" checkbox to install extensions SDK.

Visual Studio Installer Visual Studio extension development

Execute snyk-visual-studio-plugin

Double click on snyk-visual-studio-plugin.sln snyk-visual-studio-plugin.sln

Solution organization

Snyk Visual Studio extension consists of several main projects:

  • Snyk.VisualStudio.Extension - vsix configuration project for 2015-2019 Visual Studio versions.
  • Snyk.VisualStudio.Extension.2022 - vsix configuration project for 20222 Visual Studio version.
  • Snyk.VisualStudio.Extension.Shared - project with all source code Snyk.VisualStudio.Extension and Snyk.VisualStudio.Extension.2022 reference to this project.

Snyk Visual Studio extension solution organization

Debug Snyk extension under different Visual Studio versions.

To run Snyk extension under 2017-2019 Visual Studio versions you need to set Snyk.VisualStudio.Extension as startup project.

Set Startup Project

And select needed Visual Studio version.

Choose Visual Studio version for Debug

Release process

Manual

You can build a release using Visual Studio.

Snyk Visual Studio extension solution organization

In this case you need to setup environemnt variables for Snyk.Common/appsettings.json file or modify it manually

{
"SegmentAnalyticsWriteKey": "",
"SnykCodeApiEndpointUrl": "",
"SentryDsn": "",
"Environment": ""
}
  • SnykCodeApiEndpointUrl - could be empty.
  • Environment - could be production or development

GitHub actions

You can build a release using GitHub. For this, please, use this action.

Known issues

  1. Visual Studio extension use XAML for UI development, but Visual Studio Settings use WinForms for UI.
  2. WinForms designer not work in Shared projects (this is known Visual Studio limitation). If you need to modify WinForms controls (Settings controls) you could do it manually or move this files to other project, modify and move it back. WinForms Designer not supported for Shared projects
  3. To support lowest version of Visual Studio (right now it's 2015) we use lowest versions of some important libraries. For example, Community.VisualStudio.Toolkit.14.

Useful Links: