MiniProfilerEF.Initialize()无法正常初始化 [英] MiniProfilerEF.Initialize() could not be initialized properly

查看:461
本文介绍了MiniProfilerEF.Initialize()无法正常初始化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始尝试在我的EF4.1 MVC3项目MVC-迷你探查和改变后 MiniProfilerEF.Initialize(); MiniProfilerEF.Initialize_EF42(); 我收到:

I just started trying out the mvc-mini-profiler in my MVC3 project with EF4.1 and after changing MiniProfilerEF.Initialize(); to MiniProfilerEF.Initialize_EF42(); I'm getting :

一个空被调用的GetService'方法的商店后,返回
  类型的提供程序实例
  MvcMiniProfiler.Data.EFProfiledOdbcProviderFactory。商店
  供应商可能无法正常工作。

A null was returned after calling the 'GetService' method on a store provider instance of type 'MvcMiniProfiler.Data.EFProfiledOdbcProviderFactory'. The store provider might not be functioning correctly.

此方法MiniProfilerEF.Initialize(); - 是给我

This method MiniProfilerEF.Initialize(); - was giving me

给定的程序集名称或codeBase的无效。 (异常来自
  HRESULT:0x80131047)

The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

所以我把它换成DLL与那些我手动从源头上构建的。

So I've replaced dll's with ones I've manually built from the source.

这可能是什么问题吗?

推荐答案

如果有帮助,在EF团队已经发布测试preVIEW与错误修复

If it helps, the EF team have release a beta preview with a fix for the error

给定的程序集名称或codeBase的无效。 (异常来自HRESULT:0x80131047)

请参阅的http://blogs.msdn.com/b/adonet/archive/2011/09/28/ef-4-2-release-candidate-available.aspx

您可以使用的NuGet得到它

You can get it from Nuget using

PM>安装封装的EntityFramework。preVIEW

我只是测试它在我的构建和它修复该问题意味着你可以叫 MiniProfilerEF.Initialize(); 作为代替之前的新方法。

I just tested it on my build and it fixes the issue meaning you can just call MiniProfilerEF.Initialize(); as before instead of the new method.

这篇关于MiniProfilerEF.Initialize()无法正常初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆