Codiga extension for Visual Studio for the fastest code analysis and code snippets management.
To get started with VSIX development I recommend watching this video.
- Installation of Visual Studio 2022
- Installed Visual Studio Extension development workload (via VS Installer)
- Extensibility Essentials 2022 extension installed
This section describes how you can build and debug the extension with the experimental instance of Visual Studio.
- Open
Extension.sln
with Visual Studio - Hit
Ctrl + F5
to bring up the experimental instance
The experimental instance will have the extension automatically installed and updated.
Always check that you don't have a installation of the extension from the marketplace in your experimental instance. If the id changed it can happen that you have two versions of the same extension which will result in conflicts.
If you encounter an error dialog saying A project with Output Type of Class Library cannot be started directly., make sure to set the Extension project as the startup project in the Solution settings. Here's an article to help you with that: https://ourcodeworld.com/articles/read/194/a-project-with-an-output-type-of-class-library-cannot-be-started-directly
If you are looking to change the default settings values, you will probably need to reset the VS experimental instance to see it taking effect. You can find details about it here:
Alternatively, you can just delete the mentioned directory.
To see how the extension is working create or open a .cs
-File and type .
anywhere to bring up the shortcut completion window. The extension should also appear under Extensions -> Manage Extensions -> Installed.
To run the unit tests with the Visual Studio Test Explorer just right click the Test.csproj and hit Run Tests.
This section describes how you can build and test the extension with your local Visual Studio installation. Building Visual Studio extension with the dotnet
command is not supported yet.
- Installation of Visual Studio (Visual Studio 2022 is recommended)
- MSBuild version >=
17.3.1
(ships with Visual Studio) - NUnit.Console installed
MSBuild can be found in this folder for a standard installation:
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin
You might want to add this folder to your PATH.
To build the extension navigate to the project root and execute
msbuild .\Extension.sln
To run the unit tests execute
nunit3-console .\src\Tests\Tests.csproj
Navigate to the project root and double click
bin\Debug\Extension.vsix
.
This will install the extension to your local Visual Studio installation.