I was creating a sample project for creating surfacecontroller using the documentation using VS2012. I was using the contact page in the umbraco and then created model and view in the project and then created the surfacecontroller for this. while compiling the project after this , I was getting an error message in the line
using Umbraco.Web.MVC
The error says that Umbraco reference is missing. But when I checked the bin folder all the umbraco dlls are available there. What could be the issue here and how can I resolve it.
Please note that I had installed umbraco7 in VS 2012 using nuget.
Adding to the above reply, the error occurred only after adding the surfacecontroller to the project. I had build it soon after adding the model class file.
I was able to fix this issue myself. Adding the solution for any one who visit this post.
Initially, I was using .net framework 4.0 for umbraco 7.2.6 version and issue was gone when this was changed to .net 4.5 .
Error while creating surfacecontrollers
Hello,
I was creating a sample project for creating surfacecontroller using the documentation using VS2012. I was using the contact page in the umbraco and then created model and view in the project and then created the surfacecontroller for this. while compiling the project after this , I was getting an error message in the line using Umbraco.Web.MVC The error says that Umbraco reference is missing. But when I checked the bin folder all the umbraco dlls are available there. What could be the issue here and how can I resolve it. Please note that I had installed umbraco7 in VS 2012 using nuget.
Thanks, Rajesh
You ran the project after you installed umbraco with nuget, before you added the surfacecontroller?
Yes, I ran the project from VS2012 and then created a starter site with a home page and contact page. Both of them were working fine as a page from the browser. I had started on creating the surfacecontroller (followed the steps mentioned in the documentation http://umbraco.tv/videos/umbraco-v7/developer/fundamentals/surface-controllers/creating-the-model/
Thanks, Pau
Regards, Rajesh
Adding to the above reply, the error occurred only after adding the surfacecontroller to the project. I had build it soon after adding the model class file.
I would suggest 2 things.
Go inside the web.config file and add some text, save then delete it again and save it again, this restarts the application and could help.
Also a thing could be visual studio itself not picking up the reference, so try and close down VS / restart your pc and see if that helps
I was able to fix this issue myself. Adding the solution for any one who visit this post. Initially, I was using .net framework 4.0 for umbraco 7.2.6 version and issue was gone when this was changed to .net 4.5 .
is working on a reply...