Running aspent_compiler after deployment fails

Hi,

I’d like to pre-compile my site after deployment to production to front-load the time taken on first view of any page. To do this I have the following PowerShell command after the installation:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /

this command works if run on the host machine by hand but returns the following when run through Octopus:

Microsoft (R) ASP.NET Compilation Tool version 4.0.30319.18408
Utility to precompile an ASP.NET application
Copyright (C) Microsoft Corporation. All rights reserved.
error ASPRUNTIME: Cannot execute a program. The command being executed was C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /noconfig /fullpaths @C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\510d67f4\80ee742f\xtfsicck.cmdline.
==============================================
PowerShell exit code: 1
==============================================
PowerShell script returned a non-zero exit code: 1

Hi Stuart,

Sorry for the delay in getting back to you.
After doing a bit of the search of the Google, people were getting this error based on firewall blockers.
So I have a suspicion here, when you run it via command its obviously running locally, through Octopus its connecting via the tentacle port.
A way to test without actually running a full deployment is via the Octopus GUI, under tasks up the top under the navigation on the right is “Script Console”, this will at least allow you to test it running or not without the full deployment having to run.

Hopefully its not just a stab in the dark and leads somewhere.
Let me know if this helps at all.

Vanessa
Source of Googled Knowledge: http://social.msdn.microsoft.com/Forums/vstudio/en-US/185e6c73-61e5-47f2-9d14-21f8f3f0c7dd/cscexe-error-with-xmlserializer-command?forum=vbgeneral

I think the root cause is the account which the octopus tentacle runs as doesn’t have permissions to write to the Temporary ASP.NET Files directory. Adding that right should resolve that issue.