Copied to clipboard

Flag this post as spam?

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


  • TempleClause 32 posts 248 karma points
    Jun 25, 2017 @ 22:19
    TempleClause
    0

    Debugging Umbraco using VS

    Hi,

    I need to debug some code I wrote but when I launch the debug mode in VS, I get an error message.

    The view found at '~/Views/Page.cshtml' was not created.
    

    Any ideas how I can fix this? I already tried to clear the cache but without any success.

    Thanks

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Jun 26, 2017 @ 07:38
    Michael Latouche
    0

    Hi TempleClause,

    Can you give some details about how you start the debug? Is it by hitting F5 on VS, or attaching it to w3p process, or ... ?

    If you launch via F5, make sure that "~/Views/Page.cshtml" is not the active item, because otherwise it is used as "start page", which indeed does not exists per se in MVC logic.

    Hope this helps.

    Cheers,

    Michael.

  • Frans de Jong 550 posts 1862 karma points MVP 4x c-trib
    Jun 26, 2017 @ 07:45
    Frans de Jong
    0

    If your url in the browser looks like Localhost:51598/Views/Page.cshtml then delete everything after the first slash and hit enter. or specify a different start page like Michael said.

  • TempleClause 32 posts 248 karma points
    Jun 26, 2017 @ 20:29
    TempleClause
    2

    Thanks guys. It was not my start page. The problem was a different one. I had to change the following web.config line:

        <add key="Umbraco.ModelsBuilder.ModelsMode" value="Dll"/>
    

    Before it was set to "PureLive". Also I needed to generate the models in the backend by going to Developer -> Models Builder -> Generate Models.

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Jun 27, 2017 @ 08:08
    Michael Latouche
    0

    Glad you sorted it out :-)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies