asp.net – 在.NET 4.5 Azure部署中找不到编译器可执行文件csc.e
我有一个网站,并且有效:
> ASP.NET 4 我已经升级了我的整个代码库,以便与大量的新玩具保持同步.现在它是: > ASP.NET 4.5 当我在分段中访问该站点时,我得到一个黄色的死亡屏幕,说无法找到编译器可执行文件csc.exe.我的问题是为什么? 它在本地工作正常,在发布模式下也是如此.我转发了,实例肯定运行Windows Server 2012(因此.NET 4.5 ??我已经看到它很难说,因为.NET 4.5替换了.NET 4文件夹中的.NET 4程序集). 根据响应头,它肯定运行IIS 8但有趣的是它声称X-ASPNET-VERSION是4.xxxx.对于ASP.NET 4站点来说这是正常的吗? 更新: 我针对.NET 4框架并将osFamily更改为2,现在可以正常工作了.所以我现在怀疑我有一个使用.NET 3.5或2的第三方程序集(事实上我确定我这样做)但是当针对的.NET框架高于导入程序集中引用的.NET框架时,会使用更高版本的框架?? osFamily =“3”只安装了.NET 4和4.5,所以我猜这是错误的原因,但我对目标的事情不对吗?我想使用osFamily =“3”我该怎么办? 堆栈跟踪 [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 解决方法
我有类似的问题.确保您的目标是正确的编译器.
我的目标是v4.5(但是应该有v4.0,因为现在有4.5个编译器) 在web.config中检查 <system.web> <compilation debug="true" defaultLanguage="c#" optimizeCompilations="true" targetFramework="4.0"> </system.web> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- asp.net – Service Fabric中的.NET Core RC2
- asp.net-mvc – 如何从HttpContext访问ViewData? (ASP.Net
- asp.net-mvc-3 – 全球化在ASP.Net MVC 3
- 在asp.net mvc 5应用程序中缩小html的最佳方法
- 在asp.net按钮中添加图像和文本
- 哪些ASP.NET生命周期事件在HttpApplication.Error之后发生?
- asp.net-mvc-3 – Razor in-line if语句不工作?
- 开源小工具 酷狗、网易音乐缓存文件转mp3工具
- asp.net core 实现支持多语言
- asp.net – 当绑定到XmlDataSource时如何编程设置Dropdownl