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?!?
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.
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
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
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.
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
What are the pros/cons of adding it to a web application vs running opening it as a website?
is working on a reply...