2011-02-10 7 views
1

Hy人。どのように私はこの問題を解決する?だから、私は、web.configファイルにこの行を追加エラー:アセンブリMySql.DataのIDbCommandおよびIDbConnectionの実装が見つかりません

The IDbCommand and IDbConnection implementation in the assembly MySql.Data could not be found. Ensure that the assembly MySql.Data is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use element in the application configuration file to specify the full name of the assembly.

:イムは、エラーメッセージのgettin

<configuration> 
    <runtime> 
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
      <qualifyAssembly partialName="MySql.Data" fullName="MySql.Data, Version=6.3.6, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> 
     </assemblyBinding> 
    </runtime> 

をしかし、働いていませんでした。

これは、Hibernateを設定する方法であって、

private static ISessionFactory CreateSessionFactory() 
    {  
     return new NHibernate.Cfg.Configuration() 
      .Configure(@"C:\Users\Documents\Visual Studio 2010\Projects\Atendimento\NHibernateLayer\hibernate.cfg.xml") 
      .AddAssembly(typeof(NHibernateHelper).Assembly) 
      .BuildSessionFactory(); 
    } 

誰でも??? Tkhs !!!

答えて

1

このエラーメッセージが表示される前に覚えていて、私のために働いた解決策(メモリがあれば!)がこのblog entryに見つかりました。

web.configに適切な行を追加しているようですが、正しいバージョン番号/公開鍵トークンを設定していることを確認しましたか?

言っ
<runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
    <qualifyAssembly partialName="MySql.Data" 
      fullName="MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"> 
    </qualifyAssembly> 
    </assemblyBinding> 
</runtime> 

- 私はMySql.DataアセンブリのVersion NがGACにありますとき、奇妙な/混乱物事が起こると、あなたはそれがVersion Mだ参照している別のコピーを持って見てきました。プロジェクト内のと同じバージョンがGACのバージョンと同じであることを確認してください。

+0

男性は、書き込みました。私は、「バージョン= 6.3.6.0」の単純な「0」がそれを壊すとは信じていませんでした。私は「0」を出して働いた。私は、ブログがPublicKeyトークンを知るための秘訣を持っているので、あなたの答えを受け入れたものとして選んだ。 ( 'gacutil/l MySql.Data'コマンド)。 Tksの男。 – Thiago

+0

@ティアゴ、問題ではない、うれしい=) – Rob

関連する問題