The name 'Parameter' does not exist in the current context
I'm opening up my .cshtml files in visual studio and I get the following error:
The name 'Parameter' does not exist in the current context
I get these because I have
@Parameter.pageIndex
I can still save my files and run them in umbraco, but it's annoying to have all these errors. Does anyone know how I can make it so Visual Studio doesn't see these errors?
Hello. I am using VS2010 and Umbraco 4.7. I can use @Parameter with web matrix, and it works, but in Visual Studio opening the .cshtml file the error 'El nombre @Parameter no existe en el contexto actual' always appears.
@using umbraco.MacroEngines does not solve the problem.
I have installed now VS2010 SP1 and the error message still appears. I'll try to cast Parameter .. but I'm new to Razor.. and don't know yet how to do it. Thanks.
The name 'Parameter' does not exist in the current context
I'm opening up my .cshtml files in visual studio and I get the following error:
The name 'Parameter' does not exist in the current context
I get these because I have
I can still save my files and run them in umbraco, but it's annoying to have all these errors. Does anyone know how I can make it so Visual Studio doesn't see these errors?
I'm not sure why you're getting this error, I don't see it. Is this in VS2010? Do you have both MVC2 and MVC3 installed??
VS2010 SP1 with both MVC2 and MVC3 installed.
I'm opening the umbraco site as a "website" in visual studio. Maybe that has something to do with it?
I do the same.. I do have Resharper installed though, that might make the difference.. Does putting this using statement at the top help?
Hello. I am using VS2010 and Umbraco 4.7. I can use @Parameter with web matrix, and it works, but in Visual Studio opening the .cshtml file the error 'El nombre @Parameter no existe en el contexto actual' always appears.
@using umbraco.MacroEngines does not solve the problem.
Any ideas? Thanks
This doesn't appear for me. Are you sure you have VS2010 service pack 1 installed?]
I don't get this error at all, but if you really need to fix this, you can always cast Paramater to dynamic, that should work.
I have installed now VS2010 SP1 and the error message still appears. I'll try to cast Parameter .. but I'm new to Razor.. and don't know yet how to do it. Thanks.
Try
Barry, that's it! No more errors! Thanks for answering a 3 month old question!
Thanks. Error has gone!
So in order to have intelisense in VS and no errors I will always include these two sentences at the top of all cshtml files
is working on a reply...