关于程序集的问题

webworm 2003-09-11 06:06:42
在项目中引用一程序集,并将属性[复制本地]设为false,然后
a.在项目的引用路径上添加引用程序集的路径,项目运行报错.
b.在项目的配置文件application.exe.config中增加如下探测路径
<probing privatePath="c:\temp" />
项目运行仍然报错.
c.将程序集添加至全局程序集缓存,提示无法添加,因为不具有强名
但查看该程序集的属性,强名为true.

请各位指教
1.是否不具有强名的程序集只能放在和应用程序同一目录或其子目录.
2.在vs.net ide中,如果程序集的强名为true,是否真的表示有强名
3.对一个没有强名的程序集,如果没有源代码,能否为它签署强名.

问题多了些,希望各位能热心的解答,不胜感激.
中秋快乐;)
...全文
33 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
qqchen79 2003-09-11
  • 打赏
  • 举报
回复
>> 1.是否不具有强名的程序集只能放在和应用程序同一目录或其子目录.
Yes. Probing path only works when it's a sub-dir of the application root.

>> 2.在vs.net ide中,如果程序集的强名为true,是否真的表示有强名
To get a strong name, you have to generate a keyfile and apply AssemblyKeyFile attribute.

>> 3.对一个没有强名的程序集,如果没有源代码,能否为它签署强名.
The simple answer is No (if the assembly is not designed to be delay signed).
But, Reverse engineering for .NET Assembly is pretty easy. Use ildasm.exe to dump the MSIL code (you don't have to understand it), Apply Strongname attributes and use ilasm.exe to compile it back into a dll file.
You may want to confirm that you have the legal right to do so first.

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧