views:

210

answers:

1

I am using aspnet___compiler.exe to compile my asp.net 3.5SP1 websites, then aspnet_merge.exe to merge the assemblies into a single one.

The assembly is then uploaded to the production server. This usually works pretty well but sometimes when testing on the staging server I get the following message:

Parser Error Message: Could not load file or assembly 'App_global.asax, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

When looking at the assembly with Reflector and comparing it with a working version of the same assembly I see that the type ASP.global_asax is indeed missing.

When changing something on the site and compiling it again, I get a working version that includes 'ASP.global_asax'.

This is kind of annoying, I am wondering whether this is a bug in the compiler in some special circumstances?

Anybody else encountered this and found out how to fix it?