Compiler executable file csc.exe cannot be found in .NET 4.5 Azure deployment Compiler executable file csc.exe cannot be found in .NET 4.5 Azure deployment azure azure

Compiler executable file csc.exe cannot be found in .NET 4.5 Azure deployment


I had similar issue. Make sure that you are targeting correct compiler.I was targeting v4.5 (but there shoul be v4.0 as there is now 4.5 compiler)

In web.config check

<system.web> <compilation debug="true" defaultLanguage="c#" optimizeCompilations="true" targetFramework="4.0"></system.web>


Yes, if you have Server 2012, you're definitely running Fx 4.5 and not 4.0, as it's an in place upgrade.

To answer your question in bold, a given ASP.NET app can only use one framework at a time. If you're running as a 4.5 site, then any 2.0/3.5 assemblies should just run as is under framework 4.5.

So my suspicion is that those older assemblies are not the root of your problem.

That being said, I can't explain the csc issue. It might help to include the exact error message that you're getting as well as some of the stack trace.


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.