We rolled out the first drop of an internal web application today.  Quick trip to TeamCity, fire the Release build and wait for the ZIP to be spat out at the end. Bing!  Less than a minute later we have a fully tested deployable version of the site all zipped up.

We uploaded it to the server, hit the index and... nothing but a Yellow Screen of Death, ""The view 'Index' or its master could not be found.".  Uhoh.

A quick look in the ZIP confirmed that the Views folder held only a lonely looking web.config file.  Not exactly what was supposed to happend.  A quick spin of the build script locally reconfirmed that the content of the View folder was indeed being treated like an ugly step-child.

After a little head scratch, I decided to check out the web projects .csproj file, and found my first clue:

<None Include="Views\CertificateOfPostage\Export.spark" />
<None Include="Views\CertificateOfPostage\Index.spark" />
<None Include="Views\CertificateOfPostage\_CertificateItems.spark" />
<None Include="Views\Home\Index.spark" />
<None Include="Views\Shared\Application.spark" />
<None Include="Views\Shared\_ajaxhelper.spark" />
<None Include="Views\Shared\_datepicker.spark" />
<None Include="Views\Shared\_footer.spark" />
<None Include="Views\Shared\_global.spark" />
<None Include="Views\Shared\_navigation.spark" />
<None Include="Views\Shared\_tooltip.spark" />
<None Include="Views\Shared\_validation.spark" />

"The game is afoot. Not a word! Into your clothes and come!"

A quick peek at the properties of the Spark files confirmed that the Build Action is set to "None".  Duh!

We use MSBuild to actually build the assemblies, so this looked like the most likely cause.  A quick switch to "Content" and a double later we have a releasable build, View files included!  :o)