无法将程序集安装到缓存? [英] Cannot install assembly to cache?

查看:33
本文介绍了无法将程序集安装到缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将程序集添加到 Visual Studio 2010 命令提示符的缓存中.我收到此错误将程序集添加到缓存失败:尝试安装没有强名称的程序集".我正在从名为 ListTasks2 的 WCF 服务应用程序添加 ListTasks2.dll 程序集.我在同名项目中从未遇到过这个问题,为什么现在提出问题?

I am trying to add an assembly to the cache on Visual Studio 2010 Command Prompt. I get this error "Failure adding assembly to the cache: Attempt to install an assembly without a strong name". I am adding a ListTasks2.dll assembly from a WCF Service App called ListTasks2. I never had this issue with a similarly-named project, so why is it raising an issue now?

注意:我尝试在 Visual Studio 中对其进行签名,但仍然无法正常工作.我想知道这是否可能是权限问题.我使用了不同的用户凭据,并且能够添加程序集.问题是我加载了一个 VS 解决方案,并且该项目签署了程序集.我应该创建一个密钥对吗?

NOTE: I tried signing it in Visual Studio and it still doesn't work. I wonder if it might be a permission issue. I used different user credentials and was able to add an assembly. The catch is that I loaded a VS Solution, and that project signed the assembly. Should I just create a key pair?

推荐答案

只有强名称程序集才能安装到 GAC 中.有关如何创建强名称程序集的信息,请参阅如何:使用强名称对程序集进行签名.

Only strong-named assemblies can be installed into the GAC. For information about how to create a strong-named assembly, see How to: Sign an Assembly with a Strong Name.

这篇关于无法将程序集安装到缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆