Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing App_global.asax.compiled on target machine

I have several MVC4 applications, that when published via a Web Deploy, they don't always write the two files bin\App_global.asax.compiled and bin\App_global.asax.dll. If I publish multiple times it eventually will publish this file.

Without the files the route tables aren't built, and I get a 403.14 error when trying to access any controller functions.

I have this problem in both VS2012 Ultimate Update 4 and VS2013 Ultimate Update 1.

If I run the Publish preview it will generally tell me that it is going to delete both of these files, and if I refresh the preview it will change from delete for those two files to Update.

like image 820
John Avatar asked Mar 20 '14 17:03

John


1 Answers

I faced this problem of missing App_global.asax.compiled and App_global.asax.dll when precompiling an MVC project.

First I thought it had something to do with TeamCity, because it would only fail when building under TeamCity, and not locally (from Visual Studio) or from the Command Prompt on the build server using msbuild.exe.

Turned out to be disk compression turned on for the disk where TeamCity was writing to. Found the pointer to the solution in the comment by Erik Ropez at http://ydie22.blogspot.ch/2008/11/aspnetcompiler-and-missing-compiled.html . Posting here as reference... So, if "Compress this drive to save disk space" is ticked, under Properties for the HardDrive/Directory, try turning it off.

like image 171
Obed Avatar answered Oct 29 '22 20:10

Obed