Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Firebird和在Visual Studio 2013中生成视图_C#_Linq_Firebird_Edmx_Entity Framework 6.1 - Fatal编程技术网

C# Firebird和在Visual Studio 2013中生成视图

C# Firebird和在Visual Studio 2013中生成视图,c#,linq,firebird,edmx,entity-framework-6.1,C#,Linq,Firebird,Edmx,Entity Framework 6.1,我已经在VS 2013中运行了runnning EF6(Firebird provider 4.5),只有一个补丁需要解决。调用Generate Views of Power Tools Beta 4以运行T4流程时显示此消息: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.Entity.Core.Met

我已经在VS 2013中运行了runnning EF6(Firebird provider 4.5),只有一个补丁需要解决。调用Generate Views of Power Tools Beta 4以运行T4流程时显示此消息:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.Entity.Core.MetadataException: Schema specified is not valid. Errors: Framework.edmx(7,6) : **error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'FirebirdSql.Data.FirebirdClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.** at System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Loader.ThrowOnNonWarningErrors() at System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Loader.LoadItems(IEnumerable`1 xmlReaders, IEnumerable`1 sourceFilePaths) at System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Loader..ctor(IEnumerable`1 xmlReaders, IEnumerable`1 sourceFilePaths, Boolean throwOnError, IDbDependencyResolver resolver) at System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Init(IEnumerable`1 xmlReaders, IEnumerable`1 filePaths, Boolean throwOnError, IDbDependencyResolver resolver, DbProviderManifest& providerManifest, DbProviderFactory& providerFactory, String& providerInvariantName, String& providerManifestToken, Memoizer`2& cachedCTypeFunction) at System.Data.Entity.Core.Metadata.Edm.StoreItemCollection..ctor(IEnumerable`1 xmlReaders) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at Microsoft.DbContextPackage.Utilities.EdmxUtility.GetMappingCollectionEF6(Assembly ef6Assembly, String& containerName) at Microsoft.DbContextPackage.Handlers.OptimizeContextHandler.OptimizeEdmx(String inputPath) System.Reflection.TargetInvocationException:调用的目标已引发异常。-->System.Data.Entity.Core.MetadataException:指定的架构无效。错误: Framework.edmx(7,6):**错误0152:未找到具有固定名称“FirebirdSql.Data.FirebirdClient”的ADO.NET提供程序的实体框架提供程序。确保提供程序已在应用程序配置文件的“entityFramework”部分注册。看见http://go.microsoft.com/fwlink/?LinkId=260882 了解更多信息** 位于System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Loader.ThrowOnNonWarningErrors()处 位于System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Loader.LoadItems(IEnumerable`1 xmlReaders,IEnumerable`1 SourceFilePath) 位于System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Loader..ctor(IEnumerable`1 xmlReaders,IEnumerable`1 SourceFilePath,Boolean throwOnError,IDBDDependencyResolver解析器) 位于System.Data.Entity.Core.Metadata.Edm.StoreItemCollection.Init(IEnumerable`1 xmlReaders、IEnumerable`1文件路径、布尔throwOnError、IDBDDependencyResolver解析器、DbProviderManifest和providerManifest、DbProviderFactory和ProviderManifactory、String和ProviderManifestName、String和providerManifestToken、Memorizer`2和CachedTypeFunction) 位于System.Data.Entity.Core.Metadata.Edm.StoreItemCollection..ctor(IEnumerable`1 xmlReaders) ---内部异常堆栈跟踪的结束--- 位于System.RuntimeMethodHandle.InvokeMethod(对象目标、对象[]参数、签名符号、布尔构造函数) 在System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr、Binder Binder、Object[]参数、CultureInfo区域性) 位于System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr、Binder Binder、Object[]args、CultureInfo区域性、Object[]ActivationAttribute、StackScrawMark和stackMark) 在System.Activator.CreateInstance(类型类型、BindingFlags bindingAttr、Binder Binder、对象[]参数、CultureInfo区域性、对象[]ActivationAttribute) 位于System.Activator.CreateInstance(类型,对象[]args) 位于Microsoft.DbContextPackage.Utilities.EdmxUtility.GetMappingCollectionEF6(程序集EF6AAssembly、字符串和容器名称) 位于Microsoft.DbContextPackage.Handlers.OptimizeContextHandler.OptimizedMX(字符串输入路径) 我的猜测是:EntityFramework.Firebird必须放在Generate View运行的位置,也就是它的安装位置。这条路是什么?生成视图在哪里运行?EntityFramework.Firebird是在EntityFramework中提到的,但我想电动工具会在machine.config中看到,但EntityFramework.Firebird不可能在那里

<entityFramework>
  <defaultConnectionFactory type="FirebirdSql.Data.EntityFramework6.FbConnectionFactory, EntityFramework.Firebird" />
  <providers>
    <provider invariantName="FirebirdSql.Data.FirebirdClient" 
            type="FirebirdSql.Data.EntityFramework6.FbProviderServices, EntityFramework.Firebird" />
  </providers>
</entityFramework>

谢谢


马可·卡斯特罗(Marco Castro)

我在我的VS2012上测试了它,它运行正常。是否安装Firebird DDEX提供程序?您还需要GAC中的EF provider 4.5才能使其在VS中工作。DDEX已安装,GAC中已安装FireBird 4.5。请重试安装,但请选择更改选项,然后查看是否也安装了VS20122013 OS64x和OS86x。如果没有,请安装它们并尽情享受。