Copied to clipboard

Flag this post as spam?

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


  • Craig O'Mahony 364 posts 918 karma points
    Feb 19, 2013 @ 13:00
    Craig O'Mahony
    0

    Running Umbraco through Visual Studio

    Hi Gents,

    Whenever I run (or publish) an Umbraco build using Visual Studio 2010 I'm getting a compliation error stating that /Masterpages/umbracoPage.Master does not exist.

    Ignoring the error the site will still run as normal but does anyone know a cure?!?

    Thanks,

    Craig

  • Joao Pinto 24 posts 64 karma points
    Feb 19, 2013 @ 13:28
    Joao Pinto
    0

    Hello,

    never tried running umbraco on Visual Studio 2010, but on Visual Studio Express 2012 it works perfectly.

    Maybe you could try to upgrade VS?

    Also make sure that your project is in a folder where you have full write permissions, I normally put my projects on C:\Development, I avoid using folders like Documents / Desktop, etc.. which normally have some kind of restricted access.

  • Martin Griffiths 826 posts 1269 karma points c-trib
    Feb 19, 2013 @ 14:13
    Martin Griffiths
    2

    Hi Craig

    If you want to use Umbraco in Visual Studio, always open it as a web site, do not add it to a web application. The two project types are very different.

    What you need to bear in mind is Umbraco is already compiled. ie all of it's DLLs (libraries) are ready to go. So when you run, it doesnt require any kind of compilation beforehand unless you've downloaded the entire sourcecode (and the source provides a solution file for this anyway).

    Assuming we're talking running the compiled application; First, in the project property pages in VS2010 go into "build" and set the F5 start action to "no build" and ensure that "build website as part of a solution" is unchecked. Now when you hit the play button (or F5) Umbraco will run without compiling.

    You can easily set break points on any code you wish to debug. XSLT (to a point), C#, Razor, User controls can all be debugged. 

    To debug you must select, "attach to process" from the "debug" menu. Which executable you attach to will depend on which web-server you're running locally. IISExpress, Cassini or the full blown IIS7.5 (windows 7). Personally I prefer using IIS7.5 for Windows 7 as it closely matches the Windows server product. Although IISExpress is the same (without all the GUI stuff). Remember to set your break points before you attach.

    Finally I would recommend you download the Umbraco VS template project. It's nothing that you couldnt easily setup yourself, but it does streamline development a little. We use it for keeping our development files separate from the Umbraco build, which can then be checked into a source control product easily. To debug an Umbraco project, set up build events that push all of your files into wherever you're running umbraco and you can attach as normal. You can download the project template here... http://our.umbraco.org/projects/developer-tools/visual-studio-2010-project-template

    I hope this helps

    Martin

     

     

  • Ernesto Chavez 3 posts 23 karma points
    May 25, 2013 @ 03:56
    Ernesto Chavez
    0

    What are the pros/cons of adding it to a web application vs running opening it as a website?

Please Sign in or register to post replies

Write your reply to:

Draft