我试图将MiniProfiler连接到一个使用EF6 Code First的现有项目中,但它让我感到很抓狂 :)
问题是默认情况下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.
有人遇到过类似的问题吗? 谢谢!