asp.net – 在.NET 4.5 Azure部署中找不到编译器可执行文件csc.exe
|
我有一个网站,并且有效: > 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-mvc – 实体框架4不保存我的多对多行
- asp.net-web-api2 – SwashBuckle / Swagger – OAuth资源所
- asp.net – 如何单元测试使用HostingEnvironment.MapPath的
- asp.net – 带有MVC 4.0的DotNetOpenAuth
- asp.net-mvc – 使用Visual Studio 2013 Preview调试ASP.NE
- asp.net-mvc – ASP.NET MVC4路由问题
- asp.net-mvc – 双引号之间的Razor代码
- asp.net – 多个用户控件和JavaScript
- asp.net-mvc-3 – 如何在ASP.NET MVC中创建递归结构
- asp.net-mvc – IIS 7.0不显示自定义错误页面
- asp.net-web-api – 如何使用OWIN自动主机的web
- asp.net – 在做TDD时如何最好地创建一个测试数据
- asp.net – IIS URL重写 – 具有多个域
- ASP.NET MVC ASP.NET WebForms,为什么?
- asp.net-mvc – ASP.NET MVC与XSL
- asp.net-mvc-2 – ASP.NET-MVC 2 DataAnnotation
- asp.net-mvc-3 – 在Razor/MVC3中显示数据库映像
- 更新映像而不会闪烁ASP.NET C#
- ASP.net RequiredFieldValidator不阻止回发
- asp.net – 在MVC和WebForms之间共享一个主 – 处
