Can Not Find System. Web. Http

I have to add a system.web.http assembly reference because I added the HttpConfiguration class to my unit test class library project.

When I browse the Add reference dialog I can not find the system.web.http assembly.

The class library project has the .Net 4.5.1 framework targeted.

2

3 Answers

in order to get the system.web.http you will need to install a nuget package in the nuget command line: Install-Package Microsoft.AspNet.WebApi.Core

7

I've had multiple errors regarding missing references such as "system.web.http" or "system.web.razor" in my project. Even though I do have all the references installed through nuget.

What worked for me was to install a standalone version of AspNetMVC4, even though Visual Studio 2014 installed that as well. Apparently it was missing some references in Windows. I've installed this from the Microsoft website, and all went well afterwards.

Hope this helps someone. It drove me crazy for like 2 days, nothing regarding nuget worked for me, I've deleted and reinstalled the references a couple times, did everything I've found in multiple posts on stackoverflow, nothing worked.

Url for mvc4 standalone setup from microsoft:

1

For every one haveing this problem. Remember that you might have a downgraded version of based on your framework. Try look on your packagde folder what version you have. Then upade that version. Dont use Update-Package it will update all version with no respect to the framework your running at all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest