3

Up until last week our build script would compile our application (a very old .net 2.0 site running MCMS) and dump it onto our test server. After running it yesterday, the site was suddenly getting all sorts of errors, most of which seemed to be being caused by the methods in the global.ashx.cs file not being called (e.g. building caches and such).

Cue 5 hours of hair pulling before I found the answer.

There were two files: app_code.compiled and app_global.asax.compiled which up until last week had been being deployed with the release. Now, they aren't. I put them back in from a previous build and now the site functions as expected.

Nobody here claims to have altered the configuration... Can anybody tell me why these vital files are suddenly not being published when we run a build!?

EDIT

When I publish locally it creates the files. I then check in and build using TFS and the two files do not appear in the drop location.

Another Edit

http://forums.asp.net/t/1723066.aspx/1 <-- this is what's happening, no answer there though. I'm tearing my hair out here guys, can anyone help?

Mikey Hogarth
  • 4,672
  • 7
  • 28
  • 44
  • How do you publish your site? Using msdeploy? Which version? Which version of Visual Studio do you use? – Peter Oct 25 '12 at 18:31
  • It's using Visual Studio 2005 and deployment is done through TFS - it was all set up when I got here and has always just worked. – Mikey Hogarth Oct 26 '12 at 08:57
  • @MikeyHogarth So, was the TFS server updated in any way? Also, if possible, can you post the 2 different, one working, one not, build outputs somewhere? I understand it might have confidential info, but doing a diff on the two to see what is missing/changed might help you get into the right direction. – AdamV Nov 08 '12 at 22:36

2 Answers2

4

It seems like pre-compilation of ASP.NET web sites was changed in TFS/VS 2010, because http://msdn.microsoft.com/en-us/library/399f057w%28v=vs.85%29.aspx only exists for VS 2005 and .NET 3.0.

Maybe this answer helps in solving the problem: VS 2010 pre-compile web sites with build process?

Community
  • 1
  • 1
Peter
  • 3,916
  • 1
  • 22
  • 43
1

Double check that, in the solution, the two files' Build Action is marked as something other than "None".

Zhais
  • 1,493
  • 12
  • 18