当我尝试使用类似这样的类构建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")]
它返回错误:
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'.
答案 0 :(得分:0)
当我尝试通过控制台注册程序集时。它显示:
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后,版本= 5.0.0.0,问题解决了。