I have a problem with resolving dependency to Enyim.Caching.dll while using Couchbase client. I have downloaded the dlls via NuGet and referenced them in the project. The solution compiles fine with the downloaded assembly Enyim.Caching, Version=2.12.0.0, Culture=neutral, PublicKeyToken=05e9c6b5a9ec94c2. But in the runtime Couchbase throws an exception because it is looking for Enyim.Caching, Version=2.12.0.0, Culture=neutral, PublicKeyToken=cec98615db04012e.
我对解决对enyi . cache的依赖性有一个问题。使用Couchbase客户端时使用dll。我已经通过NuGet下载了dll,并在项目中引用了它们。该解决方案通过下载的程序集Enyim进行了良好的编译。缓存、Version = 2.12.0.0文化=中立,都必须05 e9c6b5a9ec94c2。但是在运行时Couchbase中抛出一个异常,因为它正在寻找Enyim。缓存、Version = 2.12.0.0文化=中立,都必须cec98615db04012e。
I can't undestand why it requires another dll of the same version, but with another PublicKey.
我无法理解为什么它需要另一个相同版本的dll,而是使用另一个公钥。
I also tried the solution described in Cant get the couchbase .net memcache client to run, complains it's strong name validation failed to remove strongname requirements via using ns.exe. But it didn't workout.
我还尝试了在“无法让couchbase .net memcache客户端运行”中描述的解决方案,抱怨说强名称验证无法通过使用ns.exe删除强名称需求。但是没有锻炼。
Can anoyone help me?
anoyone能帮助我吗?
2 个解决方案
#1
1
In the end I managed to solve this problem using description in the file Readme.mdown of couchbase-net-client project. They say that there are 2 ways to solve the problem: either remove the strong name checking via sn.exe or via removing assembly signing at all.
最后,我在文件Readme中使用描述来解决这个问题。mdown couchbase-net-client项目。他们说有两种方法可以解决这个问题:通过sn删除强名称检查。exe或通过删除程序集签名。
I have chosen the second way, since I don't that need assembly signing. I rebuilt the source from the scratch, removed every entry NuGet has created for me and manually added references to all assemblies. And it worked like a charm :)
我选择了第二种方式,因为我不需要汇编签名。我从头重新构建了源代码,删除了NuGet为我创建的每个条目,并手动添加了对所有程序集的引用。它就像一种魅力:
#2
0
you can delete node with "public_key.snk" in file "build/CommonProperties.targets"
可以使用“public_key”删除节点。snk构建/ CommonProperties.targets“在文件
<!-- delay sign the assembly if the PrivateKeyPath property is not specified -->
<!--<PropertyGroup Condition=" '$(PrivateKeyPath)' == '' And '$(PrivateKeyName)' == ''">
<AssemblyOriginatorKeyFile>..\public_key.snk</AssemblyOriginatorKeyFile>
<DelaySign>true</DelaySign>
</PropertyGroup> -->
#1
1
In the end I managed to solve this problem using description in the file Readme.mdown of couchbase-net-client project. They say that there are 2 ways to solve the problem: either remove the strong name checking via sn.exe or via removing assembly signing at all.
最后,我在文件Readme中使用描述来解决这个问题。mdown couchbase-net-client项目。他们说有两种方法可以解决这个问题:通过sn删除强名称检查。exe或通过删除程序集签名。
I have chosen the second way, since I don't that need assembly signing. I rebuilt the source from the scratch, removed every entry NuGet has created for me and manually added references to all assemblies. And it worked like a charm :)
我选择了第二种方式,因为我不需要汇编签名。我从头重新构建了源代码,删除了NuGet为我创建的每个条目,并手动添加了对所有程序集的引用。它就像一种魅力:
#2
0
you can delete node with "public_key.snk" in file "build/CommonProperties.targets"
可以使用“public_key”删除节点。snk构建/ CommonProperties.targets“在文件
<!-- delay sign the assembly if the PrivateKeyPath property is not specified -->
<!--<PropertyGroup Condition=" '$(PrivateKeyPath)' == '' And '$(PrivateKeyName)' == ''">
<AssemblyOriginatorKeyFile>..\public_key.snk</AssemblyOriginatorKeyFile>
<DelaySign>true</DelaySign>
</PropertyGroup> -->