Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9132989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:24:28+00:00 2026-06-17T08:24:28+00:00

I have a site which was and works: ASP.NET 4 MVC 3 Entity Framework

  • 0

I have a site which was and works:

  • ASP.NET 4
  • MVC 3
  • Entity Framework 4.3
  • Running in an Azure web role (i noticed it was osFamily=”1″ which is weird as I expected it to be 2 – but anyway…)
  • Azure SDK 1.7

I have upgraded my entire codebase to be up to date with the plethora of new toys. So now it is:

  • ASP.NET 4.5
  • MVC 4 (Razor 2)
  • Entity Framework 5
  • Azure config set to osFamily=”3″
  • Azure SDK 1.8 (with Storage Client Library painstakingly upgraded to 2 not 1.7)

When I access the site in staging I get a yellow screen of death saying Compiler executable file csc.exe cannot be found. My question is Why?

It works fine locally, in Release mode too. I remoted in and the instances are definitely running Windows Server 2012 (therefore .NET 4.5?? I’ve seen it’s hard to tell since .NET 4.5 replaces .NET 4 assemblies in the .NET 4 folders).

According to the response headers it is definitely running IIS 8 but interesting it claims X-ASPNET-VERSION is 4.xxxx. Is this normal for a ASP.NET 4 site?

UPDATE:

I targeted the .NET 4 framework and changed the osFamily to 2 and it now works. So I now suspect that I have a 3rd party assembly that uses .NET 3.5 or 2 (infact I’m certain I do) but surely when targeting a .NET framework higher than ones referenced in imported assemblies the higher version of the framework is used??

osFamily=”3″ only has .NET 4 and 4.5 installed so I guess this is the reason for the error but am I not right about the targeting thing? I want to use osFamily=”3″ what can I do here?

Stack trace

[InvalidOperationException: Compiler executable file csc.exe cannot be found.]
   System.CodeDom.Compiler.RedistVersionInfo.GetCompilerPath(IDictionary`2 provOptions, String compilerExecutable) +8675071
   Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames) +739
   Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources) +3293761
   Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources) +64
   HibernatingRhinos.Profiler.Appender.Util.GenerateAssembly.Compile(String fileName, String[] sources, IEnumerable`1 assembliesToReference) +1252
   HibernatingRhinos.Profiler.Appender.Util.GenerateAssembly.CompileAssembly(IEnumerable`1 sourcesResources, IEnumerable`1 assembliesToReference, String assemblyName) +118
   HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.SetupDatabaseDefaultConnectionFactoryIfNeeded() +929
   HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.SetupEntityFrameworkIntegration() +80
   HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.Initialize(EntityFrameworkAppenderConfiguration configuration) +47
   HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.Initialize() +73
   Web4.MvcApplication.Application_Start() +17

[HttpException (0x80004005): Compiler executable file csc.exe cannot be found.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12864673
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

[HttpException (0x80004005): Compiler executable file csc.exe cannot be found.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12881540
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12722601
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:24:29+00:00Added an answer on June 17, 2026 at 8:24 am

    Okay David Ebbo pointed me in the right direction and I started scrutinising Entity Framework Profiler. There is a thread here about it.

    Something about it creating an assembly at run time and it would seem osfamily=”3″ (Server 2012) wont allow that (it worked on osfamily=”2″ (Server 2008 R2)). Not going to debug anymore than that since I don’t want the profiler on my live environment anyway. Removing EF Profiler made it work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an ASP.NET MVC 3 web site which isn't working after it's deployed
i have part of Asp.NET 1.1 project. I work with remote site, which works
I have an ASP.NET MVC web application running in IIS as a subweb; let's
I've created a ASP.Net MVC 4 web site that has several custom routes which
I have a asp.net mvc web site where I make use of the Dependency
I have a an ASP .Net MVC website which works fine when testing locally.
I have an ASP.net MVC site, which I want to use a couple of
I have an ASP.NET MVC 3 web application, which I would like to publish
I have a form on an ASP.NET MVC site which I've recently changed from
I have an ASP.NET MVC project that works fine on my local machine (no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.