Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 16, 2012 01:42 PM by grantdaddy
Aug 17, 2012 08:03 PM|LINK
Working in VB.NET. Is anyone else experiencing any missing intellisense for properties or methods on the new Web API classes? For example, on the HttpRequestMessage object, I make heavy use of the CreateResponse(Of T) extension method, but I am not seeing
any intellisense for it so I don't know if there are overloads I could be using. Do I need to add any config settings or something else to enable intellisense for these extension methods?
Aug 17, 2012 08:38 PM|LINK
any dynamic type at most languages cannot be supported (from IDEs) by Intellisense
Aug 18, 2012 01:41 AM|LINK
CreateResponse extension method is present in System.Web.Http.dll and the namespace where this extension is present is System.Net.Http.
Aug 20, 2012 01:26 PM|LINK
I have a reference to System.Web.Http.dll in my project that points to the assembly downloaded with MVC 4 ( C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Web.Http.dll) and Imports at the top of my code file for both System.Net.Http
and System.Web.Http. Right-clicking on the CreateResponse method in the code editor and selecting Go to Definition opens the Object Browser to the System.Web.Http assembly, but there are no entries in it for the System.Net.Http namespace and no listing for
CreateResponse at all. If I do a search in the Object Browser for CreateResponse, it returns a number of entries, all supposedly members of System.Net.Http.HttpRequestMessageExtensions. If I add an Imports statement for that, I get a code editor blue squiggly
underneath the line with the error "HttpRequestMessageExtensions is ambiguous in the namespace System.Net.Http."
Aug 20, 2012 05:38 PM|LINK
Rich, we discussed this issue with our team here and noticed that this is most probably due to multiple extension methods with the same name in our sources(We have multiple CreateResponse extension methods in System.Web.Http\HttpRequestMessageExtensions.cs).
This seems to be a problem with VB.NET in general and does not happen in C#.
I was able to repro this problem in VB.NET by creating simple non-Web API projects.
Aug 20, 2012 07:20 PM|LINK
Thanks, Kiran. Glad to know it was a symptom of other issues with my installation.
Nov 15, 2012 05:24 PM|LINK
Did you guys find a way to work around this problem of the multiple CreateResponse extensions methods? I am having the same issue Rich reported.
Nov 16, 2012 01:39 PM|LINK
We are having this exact problem.
Do you have a resolution yet?
Nov 16, 2012 01:42 PM|LINK
I just imported System.Net.Http and this corrected the problem. System.Web.Http is imported by default, which causes the conflict (and keeps Visual Studio from recognizing that you need to import System.Net.Http.) Hope this helps.