首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Nuget包ServerAppFabric.Client时系统找不到Microsoft.ApplicationServer.Caching.Core.resources.dll

使用Nuget包ServerAppFabric.Client时系统找不到Microsoft.ApplicationServer.Caching.Core.resources.dll
EN

Stack Overflow用户
提问于 2011-12-14 15:47:04
回答 1查看 5.8K关注 0票数 2

我在一个应用程序中包含了ServerAppFabric.Client.1.0.2912,用于执行一些基本的缓存诊断。但是,当我尝试使用缓存API时,我得到了以下异常:

代码语言:javascript
复制
Caught unhandled exception: System.TypeInitializationException: The type initializer for 'Microsoft.ApplicationServer.Caching.ConfigManager' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ApplicationServer.Caching.Core.resources, Version=1.0.0.0, Culture=en, PublicKeyToken=31bf3856ad364e35' or one of its
dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\src\Frank\Mischief\bin\Microsoft.ApplicationServer.Caching.Core.resources, Version=1.0.0.0, Culture=en, PublicKeyToken=31bf3856ad364e35.dll' or one of its dependencies. The system cannot find the file specified.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Habanero.Commands.AppFabric.CacheDirCommand.<>c__DisplayClass9.<GetResolverForPath>b__8(Object o, ResolveEventArgs args) in C:\src\Habanero\Habanero\Commands\AppFabric\CacheDirCommand.cs:line 84
   at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

对如何帮助它找到资源DLL有什么想法吗?它不在nuget包里。

我使用的nuget包(http://nuget.org/packages/ServerAppFabric.Client/1.0.2912)附带了以下DLL:

代码语言:javascript
复制
Microsoft.ApplicationServer.Caching.Client.dll
Microsoft.ApplicationServer.Caching.Core.dll
Microsoft.WindowsFabric.Common.dll
Microsoft.WindowsFabric.Data.Common.dll
EN

回答 1

Stack Overflow用户

发布于 2017-01-03 17:55:04

我对这个NuGet也有类似的问题。该包安装了四个dll,但仅引用了前两个dll:

MSBuild复制了bin文件夹中的另外两个引用,可能是通过检测上面两个文件夹中使用的类型,但其他一些部署工具不能。

确保您的bin文件夹中包含了所有四个引用。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8501008

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档