Csla 4.5.601 is missing a NuGet dependency for framework 4.0

Csla 4.5.601 is missing a NuGet dependency for framework 4.0

Old forum URL: forums.lhotka.net/forums/t/12741.aspx


tiago posted on Sunday, September 07, 2014

Hi Rocky,

Updating to Csla .NET 4.5.601 some .NET 4.0 projects under VS2010, I got plenty of errors and I could understand why. I migrated one of these projects to VS2012 and got the following error:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: The primary reference "Csla" could not be resolved because it has an indirect dependency on the framework assembly "System.Net.Http, Version=2.2.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0,Profile=Client". To resolve this problem, either remove the reference "Csla" or retarget your application to a framework version which contains "System.Net.Http, Version=2.2.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".

The important part is this one:

The primary reference "Csla" could not be resolved because it has an indirect dependency on the framework assembly "System.Net.Http, Version=2.2.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework.

It turns out that a dependency is missing on the NuGet package,for .NET 4.0. Adding the NuGet package Microsoft.Net.Http to each project solved the iissue.

tiago replied on Monday, September 08, 2014

Found the missing dependency and solved it. The original post was corrected. In what concerns .NET 4, there is a dependency missing on the NuGet package. Can our NuGet guru solve it?

mbblum replied on Thursday, September 11, 2014

The issue occurred for me also when trying to update a 4.0 solution. Didn't have the time to track it down, so still on a previous release.

tiago replied on Saturday, September 13, 2014

Hi,

It's easy to fix though.

1) Open your solution on Visual Studio

2) Go to Manage NuGet packages for Solution

3) On the left side, click Online

4) Search for Microsoft.Net.Http

5) Install the package on all the projects where Csla is installed

6) Now you can upgrade to Csla 4.5.601

 

 

tiago replied on Tuesday, September 23, 2014

Issue is solved on release 4.5.700

Copyright (c) Marimer LLC