Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rajesh 13 posts 33 karma points
    Jun 25, 2015 @ 07:27
    Rajesh
    0

    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

  • Pau 14 posts 75 karma points
    Jun 25, 2015 @ 11:38
    Pau
    0

    You ran the project after you installed umbraco with nuget, before you added the surfacecontroller?

  • Rajesh 13 posts 33 karma points
    Jun 25, 2015 @ 13:31
    Rajesh
    0

    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

  • Rajesh 13 posts 33 karma points
    Jun 25, 2015 @ 13:33
    Rajesh
    0

    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.

  • Casper Andersen 126 posts 508 karma points
    Jun 26, 2015 @ 08:34
    Casper Andersen
    0

    I would suggest 2 things.

    1. 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.

    2. 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

  • Rajesh 13 posts 33 karma points
    Jun 26, 2015 @ 12:47
    Rajesh
    0

    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 .

Please Sign in or register to post replies

Write your reply to:

Draft