Last active
October 13, 2015 13:22
-
-
Save Painted-Fox/f8a0986227e4fe03197e to your computer and use it in GitHub Desktop.
A GAC solution for fixing: Could not load file or assembly System.Net.Http
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This requires admin privilges. | |
# | |
# Could not load file or assembly 'System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. | |
# | |
# Download and install: ASP.NET MVC 4 for Visual Studio 2010 SP1 and Visual Web Developer 2010 SP1 | |
# Link: http://www.microsoft.com/en-us/download/details.aspx?id=30683 | |
# Change into the directory where gacutil for .NET 4.5 is located. | |
cd C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools | |
# Install the reference via gacutil. | |
gacutil.exe /i "C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Net.Http.dll" |
Hi @UnderPL. Sorry I didn't see your comment earlier.
It's been a while since I made this script, so my memory on this is a little fuzzy, but the system.net.http.dll
that I used is the one installed via the installer mentioned in the comments. You could potentially try others, but I'm not sure which will be correct for your situation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I got the same problem (with visual studio 2013 and nmm) but the error message shows System.Net.Http 4.0.0.0 and not 2.0.0.0. Ive tried with this one (asp.net mvc) and Ive noticed I got multiples system.net.http.dll in various directories. any idea which one I should try?
thanks