代码之家  ›  专栏  ›  技术社区  ›  fritzone

共享服务器上的fsharp站点,需要在bin文件夹中包含哪些dll?

  •  0
  • fritzone  · 技术社区  · 16 年前

    我需要在bin文件夹中包含哪些dll? 还是我需要在服务器上自己安装f_?

    N. B: 断然的

    • 所有fsharp dll现在都在站点bin中
    • 使用Visual Studio中的“发布”选项部署网站
      • 这个 允许预编译站点可更新 必须是 未检查的

    我的网站出错:

    系统找不到指定的文件

    描述 :执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中的来源的更多信息。

    异常详细信息 :system.componentModel.win32异常:系统找不到指定的文件

    源误差 :

    在执行当前Web请求期间生成了未处理的异常。有关异常的起源和位置的信息可以使用下面的异常堆栈跟踪来标识。

    堆栈跟踪 :

    [Win32Exception (0x80004005): The system cannot find the file specified]
       System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) +2097
       System.Diagnostics.Process.Start() +140
       Microsoft.FSharp.Compiler.CodeDom.Internal.Compiler.compileFiles(String args, CompilerResults res) +120
       Microsoft.FSharp.Compiler.CodeDom.Internal.Compiler.compileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames, CompilerResults results, FastFunc`2 sortf) +278
       System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters options, String[] fileNames) +23
       System.Web.Compilation.AssemblyBuilder.Compile() +843
       System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +164
       System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +267
       System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +582
       System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +93
       System.Web.UI.BaseTemplateParser.GetReferencedType(VirtualPath virtualPath, Boolean allowNoCompile) +325
       System.Web.UI.PageParser.EnsureMasterPageFileFromConfigApplied() +89
       System.Web.UI.PageParser.HandlePostParse() +16
       System.Web.UI.TemplateParser.Parse() +155
       System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() +105
       System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) +54
       System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() +182
       System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +29
       System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +267
       System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +582
       System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +93
       System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +111
       System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +54
       System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
       System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
       System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139
       System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +161
    

    版本信息:Microsoft.NET Framework版本:2.0.50727.1433;ASP.NET版本:2.0.50727.1433

    3 回复  |  直到 13 年前
        1
  •  1
  •   Tomas Petricek    16 年前

    如果您使用aspnet_compiler.exe工具(或使用Visual Studio中的“发布”按钮)对网站进行“预编译”,而不将其编译为“可更新”(意味着所有aspx和fs文件都必须编译为dll),那么我认为您只需要:

    • fsharp.core.dll(包含核心f库、列表、元组等)
    • 可能是fsharp.powerpack.dll(正如robert提到的那样)

    运行时不需要安装F的其他DLL。如果要在服务器上编译Web应用程序(使用f codedom)(即将其部署为可更新的网站),则需要在服务器上安装f,并且需要生成“fsc.exe”的权限(因此,这看起来不像是共享服务器的情况)。

        2
  •  1
  •   Tim Cooper    13 年前

    在服务器上安装f绝对可以解决您的问题,但不是严格必要的。您肯定已经选择了对fsharp.core.dll的依赖,如果您从项目中引用了fsharp.powerpack.dll,那么您也可能选择了对fsharp.powerpack.dll的依赖,以及您可能引用的任何其他fsharp.*.dll。您通常可以使用Reflector来查找您的应用程序所依赖的DLL。

        3
  •  0
  •   fritzone    16 年前

    通过取消选中“允许此预编译站点可更新”,并将所有DLL都放在目录中,我可以解决此问题。

    谢谢你的建议。