Copied to clipboard

Flag this post as spam?

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


  • Niels Lynggaard 192 posts 550 karma points
    Feb 02, 2013 @ 00:08
    Niels Lynggaard
    0

    Visual Studio Setup..

    Hi Guys.

    I've read everywhere I could, but I am simply having way to many problems getting this setup correctly.

    I've created an installation of Umbraco 6.0 on a fresh server, and all is well on the server.

    Then I went and created a blank visual studio solution (VS2012).

    I copied the files from the server into a local folder and added it to VS as an exsisting website (add->exsisting website).I created a local db of a backup of the server DB, so that I can have a complete local copy running.

    I then created another project a web forms project to that I will use for developing my customcontrols. I've begun work on a control and it that project builds fine.

    BUT! If I try hitting f5 to build/debug, the website project fails to build. I get different kind of errors, but it seems its in /umbraco/scripting/templates my website is having trouble building the .cshtml files. The errors are everything from missing ; to namespace problems, and I refuse to believe that the 6.0.0 is born like that. It must be something I'm missing.. 

    WHAT is it that I'm missing? Should the webproject be of another type before I paste the files into the project instead of just "and exsisting website"?

    I want this to work, so I can debug and have a proper structure in source control...

    WHATWHATWHAT?! *frustration*

  • Niels Lynggaard 192 posts 550 karma points
    Feb 02, 2013 @ 00:42
    Niels Lynggaard
    0

    It turns out that if I exclude 4 of these .cshtml files, than it looks like I can actually build and run the site.. 

    Any other comments on my setup?

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Feb 03, 2013 @ 02:03
    Bo Damgaard Mortensen
    0

    Hi Niels,

    I understand the frustration :-) Thing is, you shouldn't need to build the website at all. For debugging code (i.e. your ascx.cs and cshtml files), simply run the site on your localhost (http://myumbracosite.local), then go to Visual Studio, set a breakpoint in your .cshtml, hit Ctrl + Alt + P, selected the wp3 (I think it is) process and hit "attach". This should lead you into debugging the code where you set your breakpoint when you refresh your site.

    Hope this helps :-)

    All the best,

    Bo

  • Niels Lynggaard 192 posts 550 karma points
    Feb 03, 2013 @ 02:07
    Niels Lynggaard
    0

    Thanx, Bo.. :)

    I did manage to get it building, though, but good tips on attaching to w3p-process..

    I've not yet made the transition to usinc cshtml  and MVC, partialviews and whatnot yet.. Just plane ole' xslt for the most of it, spiced up with a little ascx here and there when I get stuck doing things the xslt-way or some more heavy lifting is needed.. ;) 

     

  • Matthias 87 posts 173 karma points
    Feb 03, 2013 @ 15:41
    Matthias
    100

    Hi Niels,

    this somewhat older but nevertheless useful post from Sebastiaan might get you started:
    http://cultiv.nl/blog/2009/6/1/easily-debug-your-custom-umbraco-user-controls-in-visual-studio/

    Matthias

Please Sign in or register to post replies

Write your reply to:

Draft