Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>Visual Studio IntelliCode Team Model Training

Visual Studio IntelliCode Team Model Training

Microsoft

microsoft.com
|
5,031 installs
| (5) | Preview
Train Visual Studio IntelliCode Team Models from Azure Pipelines.

Automate code completions tailored to your codebase with IntelliCode Team completions

Visual Studio IntelliCode saves you time by putting what you’re most likely to use at the top of your completion list. IntelliCode recommendations are based on thousands of open source projects on GitHub each with over 100 stars. When combined with the context of your code, the completion list is tailored to promote common practices. To get IntelliCode's starred completion suggestions for your own types, or other types not commonly found in open source, use IntelliCode Team completions.

With this GitHub Action, you can keep your Team completion suggestions up-to-date with your repository’s latest commit by automating the Team completions model training.

Requirements

  • The build agent (MSBUILD, CMAKE) has the minimum required Visual Studio version installed: For C# repositories: Visual Studio 2017 or higher For C++ repositories: Visual Studio 2019 Update 4 or higher.

Usage

Install this task to your Azure DevOps organization.

Once installed, the pipeline is usually declared in .pipelines/intellicode.yml.

  • Here's what a C# pipeline looks like:
trigger:
- main

# Install Nuget
steps:
- task: NuGetToolInstaller@0
  displayName: 'Use NuGet 5.2.0'
  inputs:
    versionSpec: 5.2.0

# Install DotNet
- task: UseDotNet@2
  displayName: 'Use .NET Core SDK'
  inputs:
    packageType: 'sdk'
    version: '3.1.100'

# Nuget Restore.
- task: NuGetCommand@2
  displayName: 'NuGet restore YourSolutionPath.sln'
  inputs:
    restoreSolution: YourSolutionPath.sln
    feedsToUse: config
    nugetConfigPath: NuGet.config

# Build the code.
- task: VSBuild@1
  displayName: 'Build solution YourSolutionPath.sln'
  inputs:
    solution: YourSolutionPath.sln
    configuration: '$(BuildConfiguration)'

# Train the model.
- task: IntelliCodeTeamModels@1
  displayName: 'Visual Studio IntelliCode Team Models training'
  inputs:
    branch: 'main'

NOTE: Training a C# model usually takes around the same time it takes to build the project. It depends entirely on the length of the codebase.

Inputs

Name Type Description
branch string (optional) Use if you wish to filter only certain branches from being trained without having to create a different task. We recommend training only on main so the model is more easily shared trhoughout the repository.
platform string (optional) Only for C++ repositories. Sets the platform for the C++ build (ARM, Any CPU, etc).
config string (optional) Only for C++ repositories. Sets the configuration for the C++ build (Debug, Release).
intelliCodeServiceEndpoint auth (optional) Use if you wish to link the trained model to an specific account.

Troubleshooting and Feedback

Having trouble running this ADO Task? If you are having issues with running the IntelliCode Team Models Task or would like to provide feedback, let the IntelliCode team know on the IntelliCode GitHub issues community forum . If you reproduce the problem before submitting your issue, please attach images and/or gifs to the issue to facilitate our investigations. Be sure to tag your issue with the tag feedback or issue.

Not seeing any IntelliCode completions in Visual Studio? If you are not able to see any IntelliCode completions, you may have extensions installed that are overriding the IntelliSense UI. This can prevent the IntelliCode "starred" suggestions from appearing at the top of the list. You can verify if extensions are causing this behavior by turning them off and then trying IntelliSense again. Or, if the extension supports it, turn off its auto-completion features.

To report an IntelliCode` for Visual Studio bug, use the Help > Send Feedback > Report a Problem menu. If you reproduce the problem before submitting the report, logs are automatically included in the report.

Do you have suggestions on how we can make our product better?

For feature requests or suggestions click the Send feedback about > This product button at the bottom of this page to log a new issue. Mention that it's a feature request.

See also

  • IntelliCode overview
  • Custom models based on your code
  • Privacy Policy.
  • License Terms.

Supported build configurations

  • Your code is built with MSBUILD
  • Your code is built with CMAKE for native C++ code
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft