First of all congrats on getting this released. Must have been a lot of work, and panicked work over the weekend I guess.
Now for the problem. I have the VS2008 Pro RTM trial installed on Vista Ultimate. The only add-on installed is Resharper.
I created a new MVC Web Application (also tried it with an MVC Web Application and Test) and added a reference to the MVCToolkit dll. I opened the Index.aspx file, and typed <%= Html. and the dropdown only had ActionLink, Encode, and ViewContext options.
I tried adding a reference to the MVCToolkit project, and rebuilding the solution, but it didn't make a difference.
I have also tried using HtmlHelper instead of Html, and still didn't make a difference.
I'm assuming it's something I've done wrong, but can't figure out what it is. Anyone have any ideas?
Interesting... my web.config file doesn't have a system.web/namespaces node. I do have system.web/pages/namespaces and it has add entries for System.Web.Mvc and System.Linq
That's correct Rob. It looks as if VS isn't seeing the extension methods for some reason. When I look in the Object Browser, I see them all there (for instance, in the TextBoxExtensions class, I'm seeing all 21 methods there).
I just remembered today that I do have something else installed, the Entity Framework Beta 3, and the Entity Framework Tools (downloaded and installed Dec 6th), might that be connected?
Problem solved, I restarted the system with no result.
Uninstalled all VS addins (turns out I also had Resharper 3.0.3 installed, and think that is likely the culprit since I was using it's intellisense, and it doesn't support the new features yet)
Re-installed the ASP.Net futures, and now I'm good to go.
So thanks guys for your help, but this one was my fault (haven't had a chance to do development in 2K8 since I installed the RTM)
Nigel
Marked as answer by NigelLinnett on Dec 12, 2007 12:30 AM
NigelLinnett
Member
2 Points
7 Posts
Problem with MVCToolkit
Dec 10, 2007 10:37 PM|LINK
First of all congrats on getting this released. Must have been a lot of work, and panicked work over the weekend I guess.
Now for the problem. I have the VS2008 Pro RTM trial installed on Vista Ultimate. The only add-on installed is Resharper.
I created a new MVC Web Application (also tried it with an MVC Web Application and Test) and added a reference to the MVCToolkit dll. I opened the Index.aspx file, and typed <%= Html. and the dropdown only had ActionLink, Encode, and ViewContext options.
I tried adding a reference to the MVCToolkit project, and rebuilding the solution, but it didn't make a difference.
I have also tried using HtmlHelper instead of Html, and still didn't make a difference.
I'm assuming it's something I've done wrong, but can't figure out what it is. Anyone have any ideas?
CVertex
Member
147 Points
128 Posts
Re: Problem with MVCToolkit
Dec 11, 2007 12:32 AM|LINK
ctrl + shift + b (rebuild) will give you some intellisense :)
NigelLinnett
Member
2 Points
7 Posts
Re: Problem with MVCToolkit
Dec 11, 2007 12:49 AM|LINK
Thanks for the suggestion, but rebuilding doesn't help.
CVertex
Member
147 Points
128 Posts
Re: Problem with MVCToolkit
Dec 11, 2007 05:23 AM|LINK
I had the same problem as you till I rebuilt.
can you see the toolkit HtmlHelper in the code behind after "using System.Web.Mvc"?
tried restarting VS?
NigelLinnett
Member
2 Points
7 Posts
Re: Problem with MVCToolkit
Dec 11, 2007 11:31 AM|LINK
In the code behind I do see the HtmlHelper class. I tried creating a new method, and manually creating an instance of HtmlHelper
HtmlHelper hh = new HtmlHelper(ViewContext);
But the hh object, still isn't picking up any of the extensions (and a restart didn't help, will try a full system restart tonight).
robconery
Participant
852 Points
195 Posts
Re: Problem with MVCToolkit
Dec 11, 2007 05:47 PM|LINK
Can you check your web.config and make sure that the namespace "System.Web.Mvc" is added under system.web/namespaces?
NigelLinnett
Member
2 Points
7 Posts
Re: Problem with MVCToolkit
Dec 11, 2007 09:51 PM|LINK
Interesting... my web.config file doesn't have a system.web/namespaces node. I do have system.web/pages/namespaces and it has add entries for System.Web.Mvc and System.Linq
Should I move namespaces up a level?
robconery
Participant
852 Points
195 Posts
Re: Problem with MVCToolkit
Dec 11, 2007 10:24 PM|LINK
Oops - that's what i meant :). So you have this in your App and when even after you build it doesn't show?
NigelLinnett
Member
2 Points
7 Posts
Re: Problem with MVCToolkit
Dec 11, 2007 10:46 PM|LINK
That's correct Rob. It looks as if VS isn't seeing the extension methods for some reason. When I look in the Object Browser, I see them all there (for instance, in the TextBoxExtensions class, I'm seeing all 21 methods there).
I just remembered today that I do have something else installed, the Entity Framework Beta 3, and the Entity Framework Tools (downloaded and installed Dec 6th), might that be connected?
NigelLinnett
Member
2 Points
7 Posts
Re: Problem with MVCToolkit
Dec 12, 2007 12:30 AM|LINK
Problem solved, I restarted the system with no result.
Uninstalled all VS addins (turns out I also had Resharper 3.0.3 installed, and think that is likely the culprit since I was using it's intellisense, and it doesn't support the new features yet)
Re-installed the ASP.Net futures, and now I'm good to go.
So thanks guys for your help, but this one was my fault (haven't had a chance to do development in 2K8 since I installed the RTM)
Nigel