4

I created some models from my various solutions but I'm wondering how I can update them to take advantage of changes in the code in those solutions. Or does this happen automatically? I could delete and recreate the models but that seems like overkill...

ekolis
  • 6,270
  • 12
  • 50
  • 101

2 Answers2

4

You don't have to delete the model, just retrain it. As of this writing the way you'd refresh your model is by:

  1. Open the solution you want to refresh the model for.
  2. Open the "IntelliCode Model Management" window in Visual Studio.
  3. After the current solution model is shown click on the "Retrain" button

Retrain button image

Let me know if you have any questions.

David from the IntelliCode team.

  • Oh that's cool, wonder how I missed that Since you're on the IntelliCode team... !t would be neat if this could be configured to take place automatically every so often... – ekolis Aug 16 '19 at 16:14
  • @ekolis, I read where you can retrain your code with a post-build process but I haven't found anything in the docs about doing this. – SteveB Dec 23 '19 at 20:46
1

You can now update you models from your Azure DevOps pipeline:

https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.VSIntelliCodeTeamModelTraining

https://learn.microsoft.com/eb-gb/visualstudio/intellicode/custom-models

When your code is updated and merged into your repository you kick off the CI pipeline. Add the IntelliCode Team training task to your pipeline. Models are attached to your repository. Everybody with access to the repository can get the updated models in visual studio. Enable the preview feature Team Models in Visual Studio settings: Tools > Options > IntelliCode.

Kols
  • 3,641
  • 2
  • 34
  • 42
Peter
  • 27,590
  • 8
  • 64
  • 84