How do I uninstall NUnit.Console so that other projects

156 views
Skip to first unread message

Shawn Fox

unread,
Oct 14, 2017, 3:48:52 PM10/14/17
to NUnit-Discuss
I installed the NUnit3 console runner with extensions via Nuget.  Since I've realized that was a mistake.  I don't need all of the extensions but I cannot uninstall them due to dependencies.

Take a look at attachment, and the following XML from packages.config.  Somehow Nunit.Console is installed according to the packages.config file but Visual Studio isn't showing me a way to uninstall it.  What am I misunderstanding?

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="NUnit.Console" version="3.7.0" />
  <package id="NUnit.ConsoleRunner" version="3.7.0" />
  <package id="NUnit.Extension.NUnitProjectLoader" version="3.5.0" />
  <package id="NUnit.Extension.NUnitV2Driver" version="3.6.0" />
  <package id="NUnit.Extension.NUnitV2ResultWriter" version="3.5.0" />
  <package id="NUnit.Extension.TeamCityEventListener" version="1.0.2" />
  <package id="NUnit.Extension.VSProjectLoader" version="3.5.0" />
</packages>

I don't see Nunit.Console.3.7.0 as something that I can uninstall yet I get this error message.

"Unable to uninstall 'NUnit.Extension.NUnitProjectLoader 3.5.0' because 'NUnit.Console 3.7.0' depend(s) on it."

and

"Unable to uninstall 'NUnit.ConsoleRunner 3.7.0' because 'NUnit.Console 3.7.0' depend(s) on it."

Shawn
packages.png

Chris Maddock

unread,
Oct 14, 2017, 3:57:08 PM10/14/17
to NUnit-Discuss
You should be able to uninstall the top-level package. That's "NUnit.Console" - you can normally work that out from the error messages you're seeing - just try uninstalling packages with dependencies, until you get to the top of the tree, and one that uninstalls.

Once you've done that, you can either uninstall the others separately if it's not automatic, and then pick the ones you need.

Chris

Shawn Fox

unread,
Oct 16, 2017, 12:59:46 AM10/16/17
to NUnit-Discuss
Unfortunately, that was not available to uninstall.  That's the problem.  The thing that I am supposedly dependent on doesn't exist to uninstall.  I actually posted the question several days ago but I guess it took a while for the moderator to post it.  Somehow I resolved it but I don't remember how now.  I might have manually deleted packages so that I could start over and install what I wanted.

Shawn

Rob Prouse

unread,
Oct 16, 2017, 8:17:55 AM10/16/17
to nunit-...@googlegroups.com
The various NUnit.Console packages and dependencies are just build packages, so you should just be able to edit packages.config.

1. Close your solution
2. Edit packages.config in Notepad++ or another editor
3. Delete the packages you don't need. In your case, all of them.
4. Reopen the solution

It should look like this,

<?xml version="1.0" encoding="utf-8"?>
<packages>
</packages>

Note, this only works with build packages, not referenced packages like NUnit itself. For those, you would need to edit the CSPROJ file too.

--
You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nunit-discus...@googlegroups.com.
To post to this group, send email to nunit-...@googlegroups.com.
Visit this group at https://groups.google.com/group/nunit-discuss.
For more options, visit https://groups.google.com/d/optout.
--

Rob Prouse

Reply all
Reply to author
Forward
0 new messages