Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Post Build Event Script

This is a generic post build event script that copies the runtime files of your library project to the web project. The script requires Unleash It to run.

Note! Your solution file MUST be saved to the root of the web project
Why? The script below uses the $(SolutionDir) variable which will be substituted by VS.NET during compilation. A library project has no knowledge about other projects in the same solution, so we need a way to tell the script which project should receive the output, and the placement of the solution file is the only variable we can use.

@echo off
set BvnSourceDir=$(ProjectDir)
if "%BvnSourceDir:~-1%"=="\" set BvnSourceDir=%BvnSourceDir:~0,-1%

set BvnDestDir=$(SolutionDir)
if "%BvnDestDir:~-1%"=="\" set BvnDestDir=%BvnDestDir:~0,-1%

REM echo %BvnSourceDir% 
REM echo %BvnDestDir%

REM Masks used by Unleash It. You might want to change these for your own project.
set BvnMasks="*.aspx;*.ascx;*.asmx;*.gif;*.jpg;*.html;*.js;*.xml;*.png;*.css"
set BvnExclude="_vti_*;_private;_svn;.svn;.cvs;_cvs;"

"%programfiles%\Unleash It\UnleashIt.exe" /u /o /s:"%BvnSourceDir%" /d:"%BvnDestDir%" /masks:"%BvnMasks%" /folders:"%BvnExclude%"

REM Copy if changed. /u will only write if file exists
echo Copying .dll and .pdb file (if changed)
xcopy /d /y  "$(TargetDir)$(TargetName).*" "%BvnDestDir%\bin\"

Most of the modules use this script to make it easy to download the code and have it installed into an EPiServer project easily. If a module do not have a dedicated download, just checkout the code using Tortoise SVN. Load up your EPiServer project in Visual Studio, add the module's library project file (Add Existing Project in VS) and compile it. The script does the rest.

If you do not want to check out the files for a module from the repository, you can browse the source and click the .zip link at the bottom of any directory to download the contents as a .zip file.

Do not include the module runtime files in your EPiServer project. It is not necessary as the code is already compiled into its own assembly.