TeamCity plugin for Visual Studio

When working with TeamCity and Visual Studio, we can do a lot of things right from within our IDE. We can trigger a remote run, fetch dotCover code coverage information from the server, view changes and builds from a tool window, navigate to unit tests and a lot more. In this post, we’ll be looking at some of these features. But first things first: let’s install this nifty tool!

Installing the plugin

Every TeamCity installation ships with several tools for IDE integration (with our IntelliJ IDEA based tools as well as with Visual Studio). We can find the plugin on every TeamCity server under the My Settings & Tools page. We can download the plugin right there!

Finding the TeamCity plugin for Visual Studio

After downloading and installing the plugin, we can find a new menu item in our Visual Studio.

TeamCity plugin for Visual Studio menu entry

From this menu, we can connect to our TeamCity server using the Login… menu item. After entering the URL to our TeamCity server and providing the correct credentials, we can start exploring.

Login to TeamCity

Remote run from Visual Studio

When developing a project in Visual Studio, we can initiate a personal build using the TeamCity plugin for Visual Studio. We call this a “remote run” because the build that is triggered runs on a TeamCity build agent, not on the developer’s machine. The interesting thing here is that this remote build uses the current version control repository sources plus the changed files in the developer’s IDE. All steps from the build configuration are executed for this personal build as well.

After changing some files locally, we can use the TeamCity | Remote Run (Local Changes) menu to trigger a remote build. In the dialog that opens, we can select the changes we made locally that should be included in this personal build. We can select all changes or cherry-pick just the changes we want to verify on the build server.

Local changes for personal build - remote run

Note that we’re using Subversion as the source control system here. Remote Run is available for TFS, Subversion and Perforce. When using Git or Mercurial, the workflow is slightly different. Check the documentation on branch remote run for more information.

When we click the Configure personal build… icon in the toolbar, we have to make some other decisions. First of all, we must select the build configuration we want to use for the personal build. Next, we can provide a comment for this personal build. This comment will be shown in the TeamCity web UI afterwards to describe the personal build.

One interesting option is the Pre-tested Commit checkbox and its related commit if setting. Using this, submitted code changes first go through testing. If all tests pass, TeamCity will automatically commit the changes to version control and integrate it in the next build. When tests fail, the code is not committed and the developer who made the change is notified about this. Here’s a chart of the pre-tested commit workflow.

Personal build configuration and pre-tested commit

We can even customize our build: put it at the top of the queue or add additional build parameters.

After clicking the Run button, TeamCity will run the selected build configuration for the included changes. We can see the results in the TeamCity web UI, consult the build log, check unit test results and so on.

TeamCity web UI personal build

My Changes

Since this post is about the TeamCity plugin for Visual Studio, we can also verify the status of builds triggered because of our changes by using the TeamCity | My Changes menu.

Overview of My Changes

Build log

From the toolbar, we can consult the build log for every personal build listed in the My Changes window. Clicking the Show Build Log icon (or right-clicking the build and selecting the appropriate context menu) will instruct the TeamCity plugin for Visual Studio to download the build log directly from TeamCity.

Build log from TeamCity downloaded in Visual Studio

Open Failed Tests

Did your changes cause a unit test to fail? No worries: we can use the Open Failed Tests context menu from the My Changes window in order to see what is going on. From the window that opens we can re-run the failing tests locally using the ReSharper test runner.

Unit tests

Code Coverage

When you have dotCover installed on your machine, the TeamCity plugin for Visual Studio enables us to view code coverage results. Using the TeamCity | Coverage menu item we can select a code coverage snapshot to open.

TeamCity dotCover code coverage

After selecting and opening a snapshot, we get dotCover’s test runner showing code coverage. We can even double-click a class from the snapshot shown and explore code coverage at the statement level.

dotCover snapshot from TeamCity

Investigate a build

Whenever a build fails, we can volunteer to fix the build by starting an investigation. From the TeamCity | My Investigations menu, we can manage our investigations and take action on open investigations by either fixing it or giving up (when working in developer teams in Belgium, that last option typically results in having to bring pastries for the team).

Investigate a build

Open in IDE

The TeamCity web UI features an Open in IDE button on many places. For example, when inspecting changes that were included in a build, we can open the file that was built in our IDE by clicking the IDE icon.

Open in IDE from TeamCity web UI

We can open tests in the IDE as well, again using the Open in IDE function. When working with tests, this will trigger Visual Studio to open the ReSharper test runner and display the selected test.

Open test in IDE

Give the TeamCity plugin for Visual Studio a go and let us know what you think!

Comments below can no longer be edited.

31 Responses to TeamCity plugin for Visual Studio

  1. Avatar

    Michael Teper says:

    March 14, 2013

    It would be great if the VS plugin was available via the VS gallery, and automatically notify of updates, like NuGet.


  2. Avatar

    Joe White says:

    March 17, 2013

    Question about your first screenshot under “Remote run from Visual Studio”, where you’re selecting which changes you want to include in the build. I notice that window is showing a bunch of things that don’t belong in version control, like the bin and obj directories and the .suo file.

    Normally things like bin and obj and *.suo would be listed in svn:ignore. Is this just a hastily-put-together sample where you hadn’t got around to adding svn:ignore yet, or is this showing that the plug-in doesn’t actually honor svn:ignore and shows ignored files even though they don’t belong in the build?

  3. Avatar

    Maarten.Balliauw says:

    March 18, 2013

    Hi Joe,

    Indeed I haven’t specified any of the ignore rules in this sample, the plugin does honor svn:ignore like you would expect. I will be updating the screenshots accordingly.

    Best regards

  4. Avatar

    Daniel says:

    July 2, 2013

    I’d love to use this feature but there doesnt appear to be support or mercurial source control. Is there a plugin for this I can get a hold of?


  5. Avatar

    jk says:

    August 10, 2013

    After installing the Visual Studio addin from the TeamCity “My Setting & Tools” page, all the menu entries are grayed out except for “Help”. I can’t log into the server or do anything else because of this. Is there some version conflict with this TFS 2012 or with Resharper perhaps?

    Here is the info for the TeamCity Addin:
    TeamCity Addin 8.0
    Version: 8.0.2 (build 27482)

    Visual Studio 11.0.60610.1.

    And I also have Resharper installed (which works):

    JetBrains ReSharper 7.1.1 C# Edition
    Build 7.1.1000.900 on 2012-12-13T21:22:48

    License server at is used
    Plugins: none
    Visual Studio 11.0.60610.1.

    • Avatar

      Kevin says:

      February 27, 2014

      I had this too. It turned out that I just needed to load a solution. Once I’d done that, all the options were available as per the instructions above 🙂

      • Avatar

        Fran says:

        June 3, 2014

        I have the same issue, except I have it in VS2010 even with a solution loaded. You can see the green icon on the bottom-right that I’m logged in and I can also see my local changes window pulling the changes but all options are grayed out in the VS menu as well as on the green icon and the menu in the local changes window. Very strange. It’s like it is not recognising that a solution is loaded.

  6. Avatar

    Morgan Larosa says:

    September 11, 2013

    Are there any plans to better integrate the mercurial/git remote-run functionality with the Local Changes feature? I’d love to be able to use it for a ‘pre-tested push’ for unpublished commits in my local repo.

  7. Avatar

    Pavel Sher says:

    September 11, 2013

    Have you tried branch remote run trigger:

  8. Avatar

    Syed Salman Qadri says:

    September 19, 2014

    Can you guys please also add git support in the plugin?

  9. Avatar

    markus john says:

    November 19, 2014


    it seems like the VSPlugin doesn’t show changes on my .csproj files in the local changes Window. In addition to that, those files are not even used to perform a remote run or a pre-tested commit. So if I just rename a class and make a pre-tested commit, the build fails.
    I can hardly imagine that this is a generel problem cause I couldn’t find anything about it and I would make the tool kind of less powerfull.
    Could it be a problem with my configuration? Any idea?

  10. Avatar

    Max says:

    February 17, 2015

    Can you guys please add git support in the plugin?

    The branch remote trigger is quite convoluted.


  11. Avatar

    Dmitry Dubyk says:

    March 15, 2016

    There is a creepy bug in this plugin that make it useless for big projects. It does not support integration to IDE test runs if any failed test has full name length more than 255 symbols. I can’t find bug tracker for this plugin so i will leave it here as a comment.

  12. Avatar

    Harshtia says:

    March 17, 2016

    I am using Perforce as VCS. The visual studio plugin shows all the files which are checked out , even though they are not modified, in the local changes window. If I run personal build using unchanged files, the build fails. Is this a bug to show all the checked out files under local changes?

  13. Avatar

    gonzobrains says:

    March 22, 2016

    I am trying to us the TeamCity Addin 8.1 and am getting “unsatisifed requirement: Microsoft Visual Studio”. I am using Visual Studio 2015. Is this version not supported?

  14. Avatar

    huxq says:

    January 5, 2017

    I am uses vs2015 and install VisualSVN & ReSharper(include teamcity addins) addins ,
    in visualsvn‘s “pending changes” panel ,can see the chenges file list. but use ReSharper->TeamCity->Remote Run(Local Changes) can’t see the files changes list. why? the error info: No modified files found. no version controls are enabled in Teamcity options Failed to collect changes. and click in to “see details” . it show :Failed to collect pending changes in Subversion.

    Error: Opened solution contains no Subversion versioned resources

    my requirment: use teamcity plug on vs2015 to integration teamcity.
    Tks very much.

    • Avatar

      Maarten Balliauw says:

      January 5, 2017

      Can you check if Subversion is configured correctly from ReSharper | Options, then TeamCity | Source Control | Subversion?

      • Avatar

        huxq says:

        January 5, 2017

        Options|TeamCity|Source Control| I checked Enable Subversion.
        in “use subversion client” group box , i checked “detected using “path” environment variable”
        in “login setting” groupbox, i checked “use subversion local copy auth…”
        in “Search changes in” groupbox, i checked “automatically detected ..”

        • Avatar

          Maarten Balliauw says:

          January 5, 2017

          Can you click the “Redetect now” action in the options and see if it can find directories? If not, can you try to manualy specify directories?

          • Avatar

            huxq says:

            January 5, 2017

            i checked manualy …., and add the path of my local project path. the show an error:
            Failed to locate Subversion repository. Subversion is unable to resolve UUID for:

            F:\work\C#SocketFramework\TestProject – svn: The path ‘F:\work\C#SocketFramework\TestProject’ appears to be part of a Subversion 1.7 or greater

            working copy. Please upgrade your Subversion client to use this

            working copy.

          • Avatar

            huxq says:

            January 5, 2017

            my subversion client version is 1.9.1
            my svn directory structure like this:

            so Fill in the path is:F:\work\C#SocketFramework\TestProject

            and then the error info:
            i checked manualy …., and add the path of my local project path. the show an error:
            Failed to locate Subversion repository. Subversion is unable to resolve UUID for:

            F:\work\C#SocketFramework\TestProject – svn: The path ‘F:\work\C#SocketFramework\TestProject’ appears to be part of a Subversion 1.7 or greater

            working copy. Please upgrade your Subversion client to use this

            working copy.

          • Avatar

            huxq says:

            January 5, 2017

            i select the working copy root directory :
            and the error info is :
            The directory F:\work\C#SocketFramework\TestProject\trunk is not under Subversion control.

            • Avatar

              Evgeniy Koshkin (TeamCiyu dev) says:

              January 5, 2017

              Hello, huxq
              Please make sure that version of Subversion client registered in PATH is not an old one.
              use cmd svn –version command for that.

              • Avatar

                huxq says:

                January 6, 2017

                the subversion client version is : TortoiseSVN 1.9.1
                i uses the GUI -> about can see the version number.

  15. Avatar

    Anyul Rivas says:

    May 29, 2017

    I’m having issues configuring the teamcity’s url , it gives me a timeout connection error

  16. Avatar

    Bo Sorensen says:

    March 16, 2018

    When logging in i get an error about connection failure and the text:

    Parameter name: stm

    Any ideas ?

    • Avatar

      Dmitry Tretyakov says:

      March 16, 2018

      @Bo, thanks for reporting. Could you please file an issue in the TeamCity tracker and specify version of TeamCity server, TeamCity VS Add-in and VS? Could you please also attach to the issue “ActivityLog.xml” file from the directory “%APPDATA%\Microsoft\VisualStudio\” for investigation?

Discover more