I’m having problems getting AutofactContrib.DynamicProxy2 installed.
When trying to get the AutofactContrib.DynamicProxy2 NuGet package, I get the following error:
PM> install-package AutofacContrib.DynamicProxy2
Attempting to resolve dependency ‘Autofac (≥ 2.4.5.724)’.
Attempting to resolve dependency ‘Castle.Core (≥ 2.5.2)’.
Attempting to resolve dependency ‘Castle.DynamicProxy (≥ 2.2.0)’.
Attempting to resolve dependency ‘Castle.Core (= 1.2.0)’.
Install-Package : Updating ‘Castle.Core 2.5.2’ to ‘Castle.Core 1.2.0’ failed. Unable to find a version of ‘AutofacContrib.DynamicProxy2’ that is compatible with ‘Castle.Core 1.2.0’. At line:1 char:16
+ install-package <<<< AutofacContrib.DynamicProxy2
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
As far as I understand, in Castle V.3 there’s no longer a DynamicProxy.dll but it’s contained in Castle.Core.dll.
I guess that I have to install a previous version of Castle.Core.dll, but for some reason the package has a dependency on 'Castle.Core (≥ 2.5.2)', so even if I manually install Castle.Core V. 1.2, I still get this error.
Anyone has a solution for this?
Try with
-ignoredependencies, It works withtargetFramework="net40".You can install Dependencies separately
Result: