Unable to find version '2.0.20326.1' of package Microsoft.Net.Http

Topics: General
Mar 29, 2012 at 10:50 PM

Trying to build Asp.net WebStack based on instructions at http://aspnetwebstack.codeplex.com/documentation.

When trying to run the package restore from the command line I get:

Error 20 Unable to find version '2.0.20326.1' of package 'Microsoft.Net.Http'. Microsoft.Web.Http

and again if trying to build the various project.

Any ideas on what's missing? 


Is there another Nuget feed that needs to be added for this to work? The doc talks about the OuterCurve Nuget feed - it's not clear to me if that's a different feed from the standard Nuget feed or what (don't think so or if it is it's not easily found or referenced in the doc).

Any help appreciated,

+++ Rick ---

Mar 29, 2012 at 11:51 PM

We use 2 feeds in our package restore: the official Nuget feed (refered to in the instructions as the Outercurve Nuget feed) and a special myget feed available at http://www.myget.org/F/f05dce941ae4485090b04586209c8b08/ that has extra stuff that's not ready to be on the official feed.

Microsoft.Net.Http version 2.0.20326.1 is on that myget feed. Not sure how best to help. You could try pulling that package from there manually and just copy it into the packags\ folder.

Mar 30, 2012 at 12:21 AM

Hi Marcin,

I added the feed to my NuGet feeds and now I can build. Thank you.

I don't see the reference to this feed anywhere in that documentation topic - did I just miss it or is it not there? You might want to add that or make it more promininent if it's not there, since the project will not build without it.

I know it's probably not meant to be permanent, but for now it's required and adding the secondary feed seems to fix that.

Now off to explore the code :-)

Thanks,

+++ Rick ---

Mar 30, 2012 at 12:26 AM
rstrahl wrote:

I don't see the reference to this feed anywhere in that documentation topic - did I just miss it or is it not there? You might want to add that or make it more promininent if it's not there, since the project will not build without it.

The feed is part of our build.cmd process (you can see it referenced here: http://aspnetwebstack.codeplex.com/SourceControl/changeset/view/a488f9c3d159#tools%2fWebStack.NuGet.targets). Not sure why you were running into problems but we've tested this setup and it seems to work for everyone else. Let us know if you can think of anything else that would help in the investigation.

Happy browsing.

Mar 30, 2012 at 12:58 AM
Edited Mar 30, 2012 at 1:01 AM

Ok, so I cleared everything out and pulled the whole thing down again and this time it worked correctly. I suppose there's something to following instructions EXACTLY, huh? :-)

I think the problem might have been when I did my original pull and compile VS was complaining about packages missing and suggested enabling package restore which I did. This probably messed with your custom build targets. This time I didn't do this and just did the build restorepackages which did work just fine.

Just FYI, even when running the build from the command line AFTER VS package restore was enabled failed originally until I added the feed explicitly.

It's all working now without the explicit feed reference in VS.

Thanks for the quick response Marcin.

+++ Rick ---

Mar 30, 2012 at 1:32 AM
rstrahl wrote:

Just FYI, even when running the build from the command line AFTER VS package restore was enabled failed originally until I added the feed explicitly.

Using the VS UI was probably overwriting our package restore targets. If anyone else is running into this, make sure you do the package restore and build from command line first.

Aug 28, 2012 at 5:29 PM

Microsoft.Net.Http 2.0.20326.1 is no longer available in either nuget repository, but it's still referenced in the packages.config files. 

In the official nuget repo only versions 2.0.20710.0 and 2.0.20505.0 are available. 

Aug 28, 2012 at 6:03 PM

Could you specify which packages.config?

Aug 28, 2012 at 6:17 PM

Sorry I meant 2.0.20622.0 was being incorrectly referenced...

This is from a fresh clone. I couldn't get the solution to build and I was getting errors about 'Microsoft.Net.Http'

I looked in both nuget sources and version 2.0.20622.0 is not available. 

aspnetwebstack\src\System.Web.Http\packages.config  aspnetwebstack\test\System.Web.Http.Test\packages.config aspnetwebstack\src\System.Net.Http.Formatting\packages.config  aspnetwebstack\test\Microsoft.TestCommon\packages.config aspnetwebstack\test\System.Net.Http.Formatting.Test\packages.config  aspnetwebstack\src\System.Web.Http.SelfHost\packages.config aspnetwebstack\src\System.Web.Http.WebHost\packages.config  aspnetwebstack\src\Microsoft.Web.Http.Data\packages.config aspnetwebstack\src\Microsoft.Web.Http.Data.EntityFramework\packages.config  aspnetwebstack\test\Microsoft.Web.Http.Data.Test\packages.config aspnetwebstack\test\Microsoft.Web.Http.Data.Helpers.Test\packages.config  aspnetwebstack\test\System.Web.Http.Integration.Test\packages.config aspnetwebstack\test\System.Web.Http.WebHost.Test\packages.config  aspnetwebstack\src\Microsoft.Web.Http.Data.Helpers\packages.config aspnetwebstack\test\System.Web.Http.SelfHost.Test\packages.config  

 

Aug 28, 2012 at 6:25 PM

You're right. I'll fix that. Most of the devs probably have that old version in the local Nuget cache, which is why we haven't noticed the problem

Aug 28, 2012 at 6:38 PM

Fixed. Please pull latest and try again.

Aug 28, 2012 at 7:24 PM

Looks good. Thanks. 

Oct 4, 2012 at 4:35 PM
Edited Oct 4, 2012 at 4:35 PM

I'm getting package restore errors when I try to build the MVC V4 RTM from tags/v2-rtm-vs2012.

 

Build RestorePackages

Restoring NuGet Packages...
C:\Users\jtu100\Dev\Open Source\aspnetwebstack\tools\WebStack.NuGet.targets(74,9): error : Unable to find version '2.0.20622.0' of package 'Microsoft.Net.Http'.�[C:\Users\jtu100\Dev\OpenSource\aspnetwebstack\test\Microsoft.Web.Http.Data.Test\Microsoft.Web.Http.Data.Test.csproj]

C:\Users\jtu100\Dev\Open Source\aspnetwebstack\tools\WebStack.NuGet.targets(74,9): error MSB3073: The command ""C:\Users\jtu100\Dev\Open Source\aspnetwebstack\Tools\NuGet.exe" install "C:\Users\jtu100\Dev\Open Source\aspnetwebstack\test\Microsoft.Web.Http.Data.Test\packages.config" -source "https://nuget.org/api/v2/;https://www.myget.org/F/f05dce941ae4485090b04586209c8b08/" -o "C:\Users\jtu100\Dev\Open Source\aspnetwebstack\packages" > NUL" exited with code 1. [C:\Users\jtu100\Dev\Open Source\aspnetwebstack\test\Microsoft.Web.Http.Data.Test\Microsoft.Web.Http.Data.Test.csproj]
Oct 11, 2012 at 6:42 AM

  I was receiving the same error as "jtu100" for same source. I could not locate/find the required version of "Microsoft.Net.Http" Nuget package, so i update the \test\Microsoft.Web.Http.Data.Test\packages.config file to use the available version i.e. 2.0.20710.0. And the solution compiled successfully.

Nov 19, 2012 at 1:14 PM

I can't build the v2-rtm either, no such library Microsoft.Net.Http that the build wants, and it's trying to pull it from the correct place as per the error message. And I don't want to clone anything but the release branch because that's what I need to deploy against and hence test/debug against.

Why aren't the MVC 4 .pdb files available like the MVC 3 ones were. I'd just like to debug some of the MVC code without having to become an MVC build expert. Would it be possible to post the System.Web.Mvc.pdb file for the official MVC 4 release to make this a lot easier?

Coordinator
Nov 26, 2012 at 9:41 PM

To enable debugging through the code you will need to make some additional changes in Visual Studio:

  1. Under Debugging | Options settings make the following changes in General section:
    1. Uncheck Enable Just My Code.
    2. Check Enable source server support.
    3. Uncheck Require source files to exactly match the original version.
  2. Under Debugging | Options settings add http://srv.symbolsource.org/pdb/MyGet to the list of symbol locations in Symbols section.

For more detail see instructions from symbolsource.org.

Hope this helps.

Nov 26, 2012 at 9:49 PM

Presumably you are referring to stepping into the MVC DLL. Unfortunately, that's all been tried and just no luck in finding the System.Web.Mvc.pdb anywhere. Are you sure the system.web.mvc.pdb is actually out on SymbolSource?

Coordinator
Nov 27, 2012 at 6:59 PM

We are investigating and will get back to you.

Daniel Roth

Nov 27, 2012 at 7:12 PM

Thank you very much! 

Dec 5, 2012 at 9:34 PM

I am able to reproduce this error:

1. git clone ...

2. git checkout v2-rtm-vs2012

3. build.cmd RestorePackages

Output:

X:\aspnetwebstack\tools\WebStack.NuGet.targets(74,9): error : Unable to find version '2.0.20622.0' of package 'Microsoft.Net.Http'. [X:\aspnetwebstack\test\Microsoft.Web.Http.Data.Test\Microsoft.Web.Http.Data.Test.csproj]
X:\aspnetwebstack\tools\WebStack.NuGet.targets(74,9): error MSB3073: The command ""X:\aspnetwebstack\Tools\NuGet.exe" install "X:\aspnetwebstack\test\Microsoft.Web.Http.Data.Test\packages.config" -source "https://nuget.org/api/v2/;https://www.myget.org/F/f05dce941ae4485090b04586209c8b08/" -o "X:\aspnetwebstack\packages" > NUL" exited with
code 1. [X:\aspnetwebstack\test\Microsoft.Web.Http.Data.Test\Microsoft.Web.Http.Data.Test.csproj]

I'll investigate further and see if a there's a solution.

Dec 5, 2012 at 11:10 PM

I've added the missing package to the MyGet feed used by the build. build.cmd RestorePackages should work now (I was able to get it working). Can you confirm it works for you now?

Thanks,

David