我使用Nu-Get通过Hibernating Rhinos安装了Entity Profiler版本2.02145.0。它安装了所需的程序集并创建了以下引导程序类:
using HibernatingRhinos.Profiler.Appender.EntityFramework;
[assembly: WebActivator.PreApplicationStartMethod(typeof(Application.Web.App_Start.EntityFrameworkProfilerBootstrapper), "PreStart")]
namespace Application.Web.App_Start
{
public static class EntityFrameworkProfilerBootstrapper
{
public static void PreStart()
{
// Initialize the profiler
EntityFrameworkProfiler.Initialize();
// You can also use the profiler in an offline manner.
// This will generate a file with a snapshot of all the EntityFramework activity in the application,
// which you can use for later analysis by loading the file into the profiler.
// var filename = @"c:\profiler-log";
// EntityFrameworkProfiler.InitializeOfflineProfiling(filename);
}
}
}
当我运行我的应用程序时,我得到这个异常“名称空间'System.Data.Entity'中不存在类型或命名空间名称'Config'(你是否缺少程序集引用?)”在这一行{{1 }}
我的Web项目中引用了System.Data.Entity。
有关如何解决错误的任何想法?