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...
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.
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.. ;)
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*
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?
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
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.. ;)
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
is working on a reply...