|
|
Rank: Newbie
Joined: 10/16/2008 Posts: 11 Location: Melbourne, Australia
|
Hey all,
after biting the bullet and setting up umbraco to run on my dev machine, AND excluding multiple files from the project so that it will build, I am actually at a point to efficiently develop in visual studio for umbraco.
My current dev setup is as follows.
Visual Studio Solution contains two projects. One, my custom code to use within umbraco controls (controls themselves will be .ascx files in the usercontrols directory). The second project is the compiled, non source version of umbraco...
When I attach to my w3wp.exe process, and set a break point in my user control, I get the hollow maroon circle kindly informing me that 'This breakpoint will not currently be hit. No symbols have been loaded"...or something to that effect.
How do I load the symbols for the visual studio project?
NOTE: I also have turned off the Build option for the umbraco website (so only my custom project builds. as visual studio takes almost a minute to compile, which is way to long).
I have tried turning this on, yet i still get the symbols not loaded error.
any help would be fantastic.
Cheers
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 815 Location: Århus, Denmark
|
When developing usercontrols for umbraco, the best practice for at debug setup is pretty simple. 1. Install umbraco as you normally would. Do not include it in visual studio in any way, just run it as a standard website. 2. Create create your visual studion solution where you create you usercontrols. 3. Build you usercontrols and copy both the .dll and the .pdb files from your solutions /bin/Debug folder to the /bin folder of your umbraco installation. Also copy the .ascx files to the /usercontrols folder. 4. In visual studio, attach the the correct process (aspnet_wp.exe on win xp). As you say, this may start out with a hollow circle until you request a page on your localhost website. When requesting at page containing your usercontrol, you will hit you breakpoint. Hope this helps.
|
|
Rank: Newbie
Joined: 10/16/2008 Posts: 11 Location: Melbourne, Australia
|
Hi, And thanks for your reply.
I pretty much have done that, with one slight exception. The Umbraco folder is added only so that I can add my user controls directly to the user controls directly.
How, if I remove the Umbraco folder, can I create a user control through visual studio...or does this have to be done manually, as I cannot add a user control to a class library project (Which is my custom project.)...
It should be noted that my usercontrols are having there namespaces to be as if they were part of my custom project...
I'm guessing my solution should only contain my project with my custom code, but what project type do i make that?
Sorry if this seems a little confusing...
Cheers
|
|
 Rank: Aficionado
Joined: 4/3/2008 Posts: 103 Location: The Netherlands
|
I'm using the web application project for this. Then you have the benefit of the single DLL that is compiled in the bin folder and you can use Web User Controls. To put the dll and usercontrols automaticly in the Umbraco folders I'm always using Post build events. To access these right click on the project file in Visual studio, select properties, select the Build Events tab. With XCopy you can automaticly copy the files to the Umbraco folders. Example (replace [Your project] with your own projectname): XCOPY "$(ProjectDir)bin\Debug\[your project].dll" "F:\sites\umbracoV4\bin\" /y XCOPY "$(ProjectDir)*.ascx" "F:\sites\umbracoV4\usercontrols\" /y /S Hope this help, Richard
ASP.NET and Umbraco development - Soeteman Software
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 815 Location: Århus, Denmark
|
Richard: That is the exact method that I also use.
|
|
Rank: Newbie
Joined: 10/16/2008 Posts: 11 Location: Melbourne, Australia
|
And now me too! :-)
Thanks guys, I was a little confused there. I forgot the difference between Web Site and Web Application for a second there.
Method works like a charm.
Cheers :-)
|
|
|
Guest |