I am trying to create a nuget package for my library that has dependency on Unity. For that I placed below line in my nuspec file.
<dependencies>
<dependency id="Unity" version="[3.5.0.0]" include="all" />
</dependencies>
and then executed below command
nuget pack MyClient.MyProject.ApplicationData.csproj -Prop Configuration=Release
When I use resulting package, at run-time I get error saying, "Could not load file or assembly 'Microsoft.Practices.Unity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
This question seems to be pointing to similar issue, referring it I copied nuget.config file as suggested in its referred link but that didn't helped. Content of nuget.config file are as below:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="packages" />
</config>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
My project hierarchy is like this
MyClient
--MyProject
----MyProj.csproj
----MyProj.nupkg
--Packages
----Unity.3.5.1404.0
--NuGet.Config
I got latest version of nuget with me and this is the first time I am creating a nuget package, could someone please suggest what I might be missing here. Any pointers?
Thanks,
Ravi