jeudi 5 mai 2016

Installing Nuget package throws "An item with the same key has already been added" error

I have an MVC3 application which has a mixture of directly referenced binaries with paths such as:


and binaries installed via NuGet like this:


I am trying to get the app to build only using NuGet so we don't have to move dlls into remote repositories

Taking ActionMailer as an example, here is what I am doing

  • remove the reference to ActionMailer.Net
  • install the package via package manager console which throws the following error:

    Attempting to gather dependency information for package 'ActionMailer.0.7.4' with respect to project 'SmartS.MVC3.ED', targeting '.NETFramework,Version=v4.5' Install-Package : An item with the same key has already been added.

  • This Stack Overflow post suggested finding what the stacktrace shows:

"$error[0].exception.stacktrace" An item with the same key has already been added. Unable to find type [T4Scaffolding.ScaffolderAttribute].[0].exception.stacktrace

  • I have tried looking up the T4Scaffolding.ScaffolderAttribute error but I haven't been able to find a solution

Aucun commentaire:

Enregistrer un commentaire