installing nuget package “same key has already been added.”

后端 未结 12 1375
太阳男子
太阳男子 2020-12-10 00:38

i am trying to install Microsoft.Bcl.Build 1.0.14

nuget returns

Installing \'Microsoft.Bcl.Build 1.0.14\'. Successfully installed \'Microsoft.Bcl.Bu         


        
12条回答
  •  执笔经年
    2020-12-10 01:28

    Check your packages.config Inside there, check for the packages you are trying to install. Maybe some reference are already there and this avoid that you can install the new ones.

    If you find there the references, delete the reference from the packages.config and try to install again the package.

    It happened to me sometimes that inside packages.config are some old reference that still left there even after removing the package from the Nuget Package Manager.

    If not, you can delete the entire packages.config, then if you have the option to let Nuget download the packages, when you build your solution, the packages will be downloaded again.

    I hope this helps

提交回复
热议问题