简体   繁体   中英

Automapper Nuget Package failed

I tried to install http://automapper.org/ but this resulted in an error.

Install-Package : 'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'. At line:1 char:1 + Install-Package AutoMapper + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

Any ideas?

检查您的nuget包管理器版本是否是最新的,如果您正在尝试安装的nuget包支持您正在使用的.net框架的版本

I was facing the same issue in VS2010 with NuGet package manager 2.8.60318.667 version. so, I have installed the older version of the Automapper 4.0.4 and its work for me.

try to install Install-Package Automapper -Version 4.0.4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM