I'm trying to add AutoMapper as a dependency to a project using NuGet on Visual Studio Premium 2012, but it fails.
It says:
Operation failed
'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'.
I'm able to add other dependencies.
I'm using the last version of the package manager for VS 2012:
NuGet Package Manager 2.8.60318.667
Any ideas what should I check?
I ended up needing to update NuGet.exe that was included in the solution to be able to build NuGet packages by running:
nuget.exe update -self
I had the same issue on VS2013. I had to update to VS2013 Update 5 and get the latest nuget distro for VS2013 at https://dist.nuget.org/visualstudio-2013-vsix/v2.12.0/NuGet.Tools.vsix
once that was done i was able to use the Automapper 5.0.2 package
An other workaround if you're stuck with VS2012 and the old Nuget version:
Tools
-Options
-Nuget Package Manager
)AutoMapper.5.x.x.nupkg
with your favorite Zip ToolAutoMapper.nuspec
- I simply deleted all dependencies except.NETFramework4.5
Tools
-Options
-Nuget Package Manager
)Of course, the next version of Automapper probably needs to be adapted, too, in order to install it.
Go to Visual Studio > Tools > Extension and Updates
Find Updates in left accordion menu, Go to Visual Studio Gallery.
You will find a update for Nuget.
Update the nuget package and try installing or builing the project.
Thanks, GT