2013-11-28 7 views
5

最初EntityFramework 6のコードで私が最初にEF6コードを使用する既存のプロジェクトにワイヤーアップMiniProfilerに試してみましたが、aaaandそれはちょうど私はクレイジーになり、今:)MiniProfilerは

問題は、デフォルトではMiniProfilerがで動作するということですEF 4.1と6.0のために、彼らは速い解決の一種を実装しましたhttps://github.com/SamSaffron/MiniProfiler/pull/134

しかし、それは私にとってはうまくいかないようです。 毎回私は、私はちょうど次の例外を取得してアプリケーションを起動しています:

System.InvalidOperationException: The Entity Framework provider type 'StackExchange.Profiling.Data.EFProfiledSqlClientDbProviderServices, MiniProfiler.EntityFramework6' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. 

は誰でも同様の問題に直面しましたか? ありがとうございました!

答えて

4

EF6ナゲットが公開されました。それはhere利用可能であり、単にあなたのアプリケーションの起動ロジックに次のように呼び出して、初期化するにはInstall-Package MiniProfiler.EF6 -Pre

を使用してインストールすることができます。

using StackExchange.Profiling.EntityFramework6; 

... 

protected void Application_Start() 
{ 
    MiniProfilerEF6.Initialize(); 
} 

は、どのような方法でEFを使用する前にこれを呼び出してください。

関連する問題