2011-05-01 94 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

相关问题