4

Nu-Get を使用して 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);
        }
    }
}

アプリケーションを実行すると、この行に「型または名前空間名 'Config' が名前空間 'System.Data.Entity' に存在しません (アセンブリ参照がありませんか?)」という例外が発生します。EntityFrameworkProfiler.Initialize();

System.Data.Entity は、私の Web プロジェクトで参照されています。

エラーを解決する方法についてのアイデアはありますか?

4

0 に答える 0