2011-05-01 95 views
0

Could not load file or assembly 'ScriptReferenceProfiler' or one of its dependencies. The system cannot find the file specified.運行應用程序時出現分析器錯誤

運行應用程序後出現此錯誤。可能的問題是什麼? 我正在使用Visual Studio 2008,.NET 3.5 sp1 for C#。

*生成後的ASP.NET應用程序調試。

**大會負荷跟蹤

=== Pre-bind state information === LOG: User = ORG-FA431C61BE1\ahsan LOG: DisplayName = ScriptReferenceProfiler (Partial) LOG: Appbase = file:///C:/Documents and Settings/My Documents/Visual Studio 2008/myproj/myproj/ LOG: Initial PrivatePath = C:\Documents and Settings\My Documents\Visual Studio 2008\myproj\myproj\bin Calling assembly : (Unknown).

LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Documents and Settings\My Documents\Visual Studio 2008\myproj\myproj\web.config LOG: Using machine configuration file from C:\WINDOWS.0\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: The same bind was seen before, and was failed with hr = 0x80070002.

+0

您需要提供更多信息才能得到答案。它*非常*模糊。 – casperOne 2011-05-01 20:10:21

+0

可能不會爲ScriptReferenceProfiler添加引用。檢查他們。如果運行意味着執行exe文件,該文件必須已經存在。如果你只是複製exe,複製DLL的 – 2011-05-01 20:10:23

+0

這是當我成功構建後調試。 – gandalfish 2011-05-01 20:12:24

回答

0

可能的原因是,ScriptReferenceProfiler組裝您的應用程序依賴於尚未被引用或它的一個不正確的版本已經被引用。一旦引用程序集並編譯項目,Visual Studio就會自動將其複製到輸出文件夾,以便在運行時解析它。如果這是一個ASP.NET應用程序,程序集必須存在於bin文件夾中。否則,它應該與可執行文件一起使用。

+0

它作爲REFRESH文件存在。 – gandalfish 2011-05-01 20:16:21

+0

@gandalfish,REFRESH文件僅包含路徑,但實際的程序集需要在'bin'文件夾中複製。通常,這應該在編譯時由Visual Studio完成。如果在運行站點時,程序集本身不在bin文件夾中,則無法運行。驗證REFRESH文件指向程序集的正確位置。嘗試再次刪除並添加參考。 – 2011-05-01 20:17:46

相關問題