Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Web.Helpers does not exist in namespace: WebImage

While I know this has been "answered" about 50 million times, I haven't found an answer that fixes the issue for me, so I feel like I have no choice but to ask again.

Previous suggestions: Razor pages in MVC are giving a compile error with System.Web.Helpers not being found

<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

I have added this to my web.config, but the issue remains.

Type or namespace name does not exist

I only have one project, and the targetFramework is 4.0.

I installed Microsoft.Web.Helpers 1.15 (2.0 is incompatible with MVC3.) The Microsoft.Web.Helpers.dll is in my bin folder.

The odd thing is that there's Microsoft.Web.Helpers and System.Web.Helpers. I need System.Web.Helpers in this case, because I'm using WebImage in my code.

like image 901
Jason Beck Avatar asked Jul 12 '12 21:07

Jason Beck


1 Answers

As I keep telling people, it's when I ask for help that I find the answer. In my case, somehow in the process of destroying my Solution earlier by upgrading to Microsoft ASP.NET Helper Library 2.0 and then trying to undo that action, System.Web.Helpers stopped being a referenced assembly in my project. Simple fix!

Of course, fixing that led me to the next Assembly Reference error. I think I'll be here all night.

like image 97
Jason Beck Avatar answered Oct 13 '22 09:10

Jason Beck