无法为 iAnywhere.Data.SQLAnywhere 生成类型库
Failed to generate type library for iAnywhere.Data.SQLAnywhere
当我尝试使用 class 构建一个 c# 解决方案时出现此错误的原因可能是这样的:
using iAnywhere.Data.SQLAnywhere;
/// Specify a name for your serviced component
[ ProgId( "Name" ) ]
/// Add content to hosting COM+ App's description field
[ Description("Name")]
/// Configure component's Transaction Option, configure transaction isolation level so only a shared lock is placed for read
[Transaction(TransactionOption.Supported,
Isolation = TransactionIsolationLevel.ReadCommitted)]
/// Configure component's object pooling
[ObjectPooling(Enabled = true, MinPoolSize = 1, MaxPoolSize = 20, CreationTimeout = 60000)]
/// Specify COM+ Context Attributes
[MustRunInClientContext(false)]
/// Enable event tracking
[EventTrackingEnabled(false)]
/// Enable JITA for the component
[JustInTimeActivation(false)]
/// Enable Construction String Support for the component
[ConstructionEnabled(Enabled = false)]
/// Configure activity-based Synchronization for the component
[Synchronization(SynchronizationOption.Required)]
/// Indicate the type of class interface that will be generated for this class
[ClassInterface(ClassInterfaceType.AutoDual)]
[GuidAttribute("xxxx")]
它returns错误:
Error Failed to generate type library 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\iAnywhere.Data.SQLAnywhere.v4.0\v4.0_16.0.0.19484__f222fc4333e0d400\iAnywhere.Data.SQLAnywhere.v4.0.tlb' for 'iAnywhere.Data.SQLAnywhere.v4.0, Version=16.0.0.19484, Culture=neutral, PublicKeyToken=f222fc4333e0d400'.
当我尝试通过控制台注册程序集时。它显示:
An unknown exception occurred during installation:
1: System.IO.FileNotFoundException - Could not load file or assembly 'EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
原来我安装了EntityFramework,Version=5.0.0.0,问题解决了。
当我尝试使用 class 构建一个 c# 解决方案时出现此错误的原因可能是这样的:
using iAnywhere.Data.SQLAnywhere;
/// Specify a name for your serviced component
[ ProgId( "Name" ) ]
/// Add content to hosting COM+ App's description field
[ Description("Name")]
/// Configure component's Transaction Option, configure transaction isolation level so only a shared lock is placed for read
[Transaction(TransactionOption.Supported,
Isolation = TransactionIsolationLevel.ReadCommitted)]
/// Configure component's object pooling
[ObjectPooling(Enabled = true, MinPoolSize = 1, MaxPoolSize = 20, CreationTimeout = 60000)]
/// Specify COM+ Context Attributes
[MustRunInClientContext(false)]
/// Enable event tracking
[EventTrackingEnabled(false)]
/// Enable JITA for the component
[JustInTimeActivation(false)]
/// Enable Construction String Support for the component
[ConstructionEnabled(Enabled = false)]
/// Configure activity-based Synchronization for the component
[Synchronization(SynchronizationOption.Required)]
/// Indicate the type of class interface that will be generated for this class
[ClassInterface(ClassInterfaceType.AutoDual)]
[GuidAttribute("xxxx")]
它returns错误:
Error Failed to generate type library 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\iAnywhere.Data.SQLAnywhere.v4.0\v4.0_16.0.0.19484__f222fc4333e0d400\iAnywhere.Data.SQLAnywhere.v4.0.tlb' for 'iAnywhere.Data.SQLAnywhere.v4.0, Version=16.0.0.19484, Culture=neutral, PublicKeyToken=f222fc4333e0d400'.
当我尝试通过控制台注册程序集时。它显示:
An unknown exception occurred during installation:
1: System.IO.FileNotFoundException - Could not load file or assembly 'EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
原来我安装了EntityFramework,Version=5.0.0.0,问题解决了。