# Teamscale Integration for Visual Studio

Before installing the Teamscale Integration for Visual Studio, make sure its system requirements are met.

# Installing the Plug-in

Depending on your needs, there are several options to install the Teamscale Integration for Visual Studio.

For most users, installing the latest version of the plug-in from the Visual Studio Marketplace (opens new window) is recommended.

  1. Select Extensions > Manage Extensions.
  2. Search for Teamscale Integration.
  3. Select Download.
  4. Restart the IDE to conclude the installation.

# Installing While Offline

In case you cannot reach the Visual Studio Marketplace during the installation, e.g., due to a security policy, you can perform an offline installation.

  1. Download the plug-in from the Visual Studio Marketplace.
  2. Double-click the Teamscale.vsix file.
  3. In the VSIX installer dialog, click Install.
  4. Restart Visual Studio.

# Connecting to Teamscale

In Visual Studio, you need to configure your Teamscale server, so that the plug-in knows where to fetch findings.

  1. Click Tools > Teamscale Options.

  2. Click Add.

  3. In the dialog, enter a Name for your server (this name is later referenced from project mappings), the server URL, and your Username and Access Key.

    Visual Studio Server Settings

  4. Click Save. The dialog should close, if validation of the connection was successful.

# Configuring the Project Mapping

Next, you have to specify a project mapping, so that the plug-in knows which Teamscale project belongs to which code on the hard drive.

  1. Click Tools > Teamscale Options...

  2. On the left hand side select Teamscale > Project Mapping.

  3. Click Add.

  4. In the dialog, select the Server and Teamscale Project. If branch analysis is enabled for the project, select the relevant branch in the combo box (defaults to the default branch configured in Teamscale). Choose the local folder you want to map to the project and, optionally, specify a sub-path of the project on the server (can remain blank in most cases).

    Visual Studio Project Settings

  5. Click Save.

# Inspecting Findings

After the previous steps have been completed successfully you should now be able to explore findings in your code.

  1. Findings in the opened document should be marked with a red bar on the left margin.
  2. Hovering with the mouse over the margin will show a tooltip containing the description of the finding.
  3. To show all findings of a file, either right click in the current editor or the Solution Explorer and select Teamscale > Show Findings.
  4. In the findings list, one can double click to jump to the finding in the code, open it in the browser, or blacklist the finding as shown in the screenshot below.

Visual Studio Findings View

# Troubleshooting

Problems with the Visual Studio integration can be troubleshooted by enabling logging (opens new window).

  1. Start Visual Studio with the /log command-line switch: devenv.exe /log vslog.xml
  2. Reproduce the error
  3. Errors will be logged in vslog.xml

If you did not specify a log file, the default one located at %APPDATA%\Microsoft\VisualStudio\<Version>\ActivityLog.xml will be used.