gpt4 book ai didi

asp.net - 找不到 Windows Server 2008 R2 : Compiler executable file csc. exe

转载 作者:行者123 更新时间:2023-12-03 23:46:40 24 4
gpt4 key购买 nike

我的应用程序正在运行:

  • ASP.NET
  • MVC 3
  • 框架 4.0

  • 当我在我的计算机 (localhost:...) 上运行应用程序时,它运行成功。
    现在,这是我第一次在 windows server 2008 R-2 上运行应用程序。
    错误是:“找不到编译器可执行文件csc.exe”
    可能是什么问题呢?

    (.net4 安装正确,csc.exe 文件存在于:“C:\Windows\Microsoft.NET\Framework\v4.0\”)。

    最佳答案

    请发送完整的堆栈跟踪,就像下面这样 :

    "[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 "

    如果您使用的是 HibernatingRhinos,您应该尝试一个新的 dll 构建:
    http://hibernatingrhinos.com/builds就像在这篇文章中讨论的那样:
    https://groups.google.com/forum/#!topic/nhprof/XY4e3tm-ONc
    它解决了我的问题。

    关于asp.net - 找不到 Windows Server 2008 R2 : Compiler executable file csc. exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16939839/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com