2009-02-19 25 views
0

哪些dll是否需要包含在bin文件夾中? 還是我需要在它自己的服務器上安裝F#?共享服務器上的FSharp站點,哪些dll是否需要包含在bin文件夾中?

NB: 解決

  • 所有FSharp的dll現在在賓
  • 該網站使用的是Visual Studio中的發佈選項
    • 允許預編譯站點部署的網站可更新必須是未檢查
    • 從我的站點10

錯誤:

該系統找不到指定的文件

說明:當前Web請求的執行過程中發生未處理的異常。請查看堆棧跟蹤以獲取有關該錯誤的更多信息以及源代碼的位置。

異常詳細信息:System.ComponentModel.Win32Exception:系統找不到指定的文件

源錯誤

當前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

回答

1

如果您使用aspnet_compiler.exe工具(或使用Visual Studio中的「發佈」按鈕)預編譯該網站,而不將其編譯爲「可更新」(即所有ASPX和FS文件都必須編譯成DLL文件),那麼我認爲你只需要:

  • FSharp.Core.dll(包含核心F#庫,列表,元組等)
  • 可能FSharp.PowerPack。dll(如Robert提到的)

其他運行時不需要F#安裝的DLL。如果您想要在服務器上編譯Web應用程序(使用F#CodeDOM)(即將其部署爲可更新的網站),那麼您需要在服務器上安裝F#,並且您需要擁有產生「fsc .exe「(這樣看起來不像共享服務器)。

1

在服務器上安裝F#絕對可以解決您的問題,但並非絕對必要。你肯定會拿起對FSharp.core.dll的依賴,如果你已經從你的項目中引用了你的FSharp.PowerPack.dll,你也可能會選擇它的依賴關係,以及你可能會使用的其他任何FSharp。* .dll。有引用。通常可以使用反射器來查找應用程序依賴哪個dll。

+0

我參考了我引用的兩個dll,但仍然出現奇怪的錯誤,我可能不得不將整個文件複製到我的bin目錄中,然後刪除那些我不需要的文件。 – 2009-02-19 12:24:11

0

我能夠通過取消選中允許此預編譯的網站可更新以及通過使目錄中的所有dll來解決此問題。

感謝您的建議。

+0

我很高興它的工作! – 2009-02-19 22:41:09

相關問題