ASP.NET BuildResultCompiledAssembly error

Unable to cast object of type ‘System.Web.Compilation.BuildResultCompiledAssembly’ to type ‘System.Web.Compilation.BuildResultCompiledGlobalAsaxType’.

This has been reported as a bug.

But there is no solution. The problem, for me at least, is the following in AssemblyInfo.cs:

[assembly: AssemblyCulture("en-US")]

You can’t have a value here in a main assembly. By adding “en-US” to this attribute, I’m telling the .NET framework that this is a satellite assembly. In an ASP.NET application, that’s not good. (see also)

The Fix

Change it back to:

[assembly: AssemblyCulture("")]

Related Articles