How to Unind from SonarQube project in Visual Studio 2015?

1,610 views
Skip to first unread message

sethd...@gmail.com

unread,
Mar 5, 2018, 12:10:36 AM3/5/18
to SonarLint
Hello,

I installed the SonarLint extension for Visual Studio 2015 and it was working as expected.  Then I decided to connect to the company SonarQube server and Bind to our project.  Later, I decided that I don't want to bind to our project because the same rules in SonarLint are being used in our SonarQube project (and it adds some NuGet packages).  Therefore, I wanted to eliminate the overhead of binding to the project and just use SonarLint like before (unbound to a project).  I disconnected from SonarQube but SonarLint still expects to be bound to the SonarQube project.  As a result, SonarLint doesn't work anymore.  I uninstalled SonarLint and reinstalled and I still have the same problem.  SonarLint keeps wanting to bind to the SonarQube project.  I just want SonarLint to work like it did before I bound to a SonarQube project.  I can't figure out how to Unbind from the SonarQube project within Visual Studio 2015.  How do you Unbind from a SonarQube project within Visual Studio 2015?

Thanks,
Seth

duncan.po...@sonarsource.com

unread,
Mar 5, 2018, 4:43:25 AM3/5/18
to SonarLint
Hello Seth,

Unbinding a project is a manual process, unfortunately. You will need to do the following:

* delete the SonarQube folder that is under the folder that contains the solution file (this is where the configuration data is stored, which is why the SonarLint thinks the project is still connected)
* remove the NuGet packages
* remove the [ProjectName].ruleset file from each project.


New connected mode
We're aware that it isn't ideal that the binding process changes so many files, so we are about to release a new version of SonarLint which doesn't make any changes to the projects, add NuGet packages, or write any special files to the disk. See https://groups.google.com/forum/#!topic/sonarlint/dAUzPbA01oQ.

Bound mode has a number of advantages over unbound mode, even if you haven't customised the set of rules being run on the SonarQube server: issues suppressed on the SonarQube server will not be reported in the IDE, and if you are using Developer edition of SonarQube then you will get notifications in the IDE e.g. when the Quality Gate of the open project changes. More features will be added to bound mode in the future.

Note however that the new version of SonarLint can only be installed on Visual Studio 2015 Update 3 or higher as the analysers now use a newer version of Roslyn.

Regards,
Duncan

sethd...@gmail.com

unread,
Mar 5, 2018, 11:20:27 AM3/5/18
to SonarLint
Thank you Duncan for the quick reply and helpful information.  Does the new version provide an Unbind option in Team Explorer in Visual Studio 2015?

Duncan Pocklington

unread,
Mar 5, 2018, 12:48:58 PM3/5/18
to sethd...@gmail.com, SonarLint
The new version does provide an Unbind option, but only for solutions that are using the new connected mode.

We intend to provide an automated migration from the old connected mode to the new connected mode which will do most of the cleanup.

Regards,
Duncan


--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/5e816c3c-ad4b-4b98-8076-3e1a39bf28a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Duncan Pocklington | SonarSource

Developer

https://sonarsource.com

Reply all
Reply to author
Forward
0 new messages