Development environment advices

Some advices on how to set up your development environment for Orchard Core development.

Software to install

Below you can find pieces of software that you should install for the best Orchard Core developer experience. Also check out the official documentation.

Visual Studio tips

  • Use code snippets; try out the ones in this package too that specifically aid Orchard Core development.
  • Use keyboard shortcuts. The most useful ones are:
    • F5: start with debugging
    • Ctrl+F5: start without debugging
    • F6: build
    • F10: run to the next line, when debugging
    • F11: step into the code on the current line (e.g. if the current line is a method call this will forward you to the body of the method), when debugging
    • Ctrl+F10: run to the cursor, when debugging
    • Ctrl+.: opens the Smart Tag
    • Ctrl+Shift+Enter: adds a new line below the current line
    • F9: places a breakpoint on the current line
    • Ctrl+K, Ctrl+D: format document
    • Ctrl+K, Ctrl+C: comment selection
    • Ctrl+K, Ctrl+U: uncomment selection
    • Ctrl+,: opens the Navigate To windows (i.e. search for types or members)
    • Ctrl+D, Ctrl+E or Ctrl+Alt+E: opens the Exceptions configuration page. Tick Common Language Runtime Exceptions - Thrown to see all exceptions, even if they're caught.
    • Ctrl+Q to access the Quick Launch bar
    • Shift+Del: delete line
    • You may want to set up Ctrl+W for closing the current file for the File.Close command and Ctrl+Shift+T for Edit.UndoClose (only available if PowerCommands is installed).
  • You may want to always run VS as an administrator. This will simplify debugging web apps running in IIS since you can only attach a debugger to the IIS worker process if VS is run as an administrator.
  • To speed things up by not running a virus scan all the time on your development environment exclude the following processes from Windows Security: devenv.exe, dotnet.exe, MSBuild.exe.
  • When you start the app with the debugger attached (i.e. with F5) then by default a new browser window will open, and if you move that under an existing window as a tab the debugger will detach. To mitigate this you need to uncheck Tools → Options → Projects and Solutions → Web Projects → "Stop debugger when browser window is closed, close browser when debugging stops".

This page is part of the Orchard Dojo Library!

This page and many others here are part of the open-source, portable package of Orchard Core goodies: the Orchard Dojo Library for Orchard Core. The Library is freely accessible by anyone; just go to its repository to download its full content (you can even download the textual content of the Library as a big concatenated document in HTML), file issues or fork it! You can even edit it online on Bitbucket, just click on the Edit link in the upper right corner!

Note that the Library also has an Orchard 1.x version, check it out here!