Compiling the source

Topics: Developer Forum
Nov 25, 2008 at 9:43 AM
I'm trying to get the source running.
Currently I'm going for the "source docs is right" approach (after failing with the website docs), using howto_build.txt. 
----------------------------------------------
Main solution (core + edit + templates):
- Download the code, obviously
- Set Templates/N2.Templates.UI as "StartUp Project"
- Compile and run (Ctrl+F5)
- If you get errors about database connection or see an install screen:
- Either, download an sql express database and put in your wwwroot/app_data
- Or, create a database manually and reference it from web.config

Examples:
- Run Prepare_Dependencies-vs2008.bat to copy core and edit to the examples
------------------------------------------------
I've checked out the trunk from google code. (rev 486, nov 23).
I've installed the latest Aspnet MVC beta.
I've set Templates as startup project.
I've done the CTRL-F5.
I've got a "Could not load file or assembly 'NHibernate.Caches.SysCache2' or one of its dependencies." error.
I've cleaned the solution, rebuilt it.
Still got the "Could not load file or assembly 'NHibernate.Caches.SysCache2' or one of its dependencies." error.
I've ran Prepare_Dependencies-vs2008.bat.
Built the templates project.
Still got the "Could not load file or assembly 'NHibernate.Caches.SysCache2' or one of its dependencies." error.

Am I missing something obvious?
Coordinator
Nov 25, 2008 at 6:07 PM
Thank you for pointing out missing and outdated documentation. You need to copy /trunk/lib/Nhibernate.syscache2.dll to the bin folder of the site. You don't need ASP.NET MVC to run templates.
Nov 25, 2008 at 8:11 PM
I have errors too, when compiling the source.
What's the problem? I can't understand.
 "E:\N2.CMS\N2_Full_Source\msbuild.proj" (Build target) (1) ->
 "E:\N2.CMS\N2_Full_Source\src\N2.Everything-vs2008.sln" (default target)
  (2) ->
 "E:\N2.CMS\N2_Full_Source\src\wwwroot\N2.Templates.csproj" (default targ
 et) (10) ->
 (CoreCompile target) ->
   Templates\UI\Layouts\Top+SubMenu.Master.cs(21,21): error CS0103: The n
 ame 'p' does not exist in the current context
   Templates\UI\Layouts\Top+SubMenu.Master.cs(21,32): error CS0103: The n
 ame 'p' does not exist in the current context
   Templates\UI\Layouts\Top+SubMenu.Master.cs(22,21): error CS0103: The n
 ame 'dti' does not exist in the current context
   Templates\UI\Layouts\Top+SubMenu.Master.cs(22,34): error CS0103: The n
 ame 'dti' does not exist in the current context
   Templates\UI\Layouts\Top+SubMenu.Master.cs(23,21): error CS0103: The n
 ame 'dh' does not exist in the current context
   Templates\UI\Layouts\Top+SubMenu.Master.cs(23,33): error CS0103: The n
 ame 'dh' does not exist in the current context
   Templates\UI\Layouts\Top+SubMenu.Master.cs(25,21): error CS0103: The n
 ame 'zsl' does not exist in the current context
   Templates\UI\Layouts\Top+SubMenu.Master.cs(27,21): error CS0103: The n
 ame 'zsl' does not exist in the current context
   Templates\UI\Layouts\Top+SubMenu.Master.cs(28,21): error CS0103: The n
 ame 'dft' does not exist in the current context
Coordinator
Nov 25, 2008 at 9:55 PM
Serzhio, is trunk\src\wwwroot\Templates\UI\Layouts\Top+SubMenu.Master.designer.cs available to be compiled?
Nov 26, 2008 at 11:36 AM
Edited Nov 26, 2008 at 11:36 AM
Thank you Libardo!
I completely cleaned the SVN folders and updated to the latest commit. Then I ran the prepare script, opened N2.Everything-vs2008.sln and compiled.
Templates runs flawlessly now.
Nov 26, 2008 at 1:39 PM
Edited Nov 26, 2008 at 1:40 PM
This file is available, but it's empty...
Coordinator
Nov 26, 2008 at 5:19 PM
You should try getting it again. It's there.