有网友问一个超文本在线编辑控件Lion.Web.WebHtmlEditor 1.0的因缺失密钥无法编译源码的问题,研究了一下,把解决办法共享出来。 先说一下控件的下载地址: http://www.mybigbigworld.com/net/WebHtmlEditor1.0_Src.rar 源码 http://www.mybigbigworld.com/net/WebHtmlEditor1.0_Demo.rar 演示 在Visual Studio .NET 2003 命令提示下输入 sn -k WebHtmlEditor1.0.snk 拷贝到Sn下编译src项目得到Lion.Web.WebHtmlEditor.dll 用sn -Tp Lion.Web.WebHtmlEditor.dll > 1.txt(注意大小写) 得到公钥和公钥标记 然后打开src项目中Core目录下的Resx.cs文件, Line 16:中 PublicKey 的值替换为公钥 再将Files目录下的Web.Config中的PublicKeyToken的值替换为公钥标记 重新编译,得到最终的Lion.Web.WebHtmlEditor.dll 到Demo项目中,打开licenses.licx,将PublicKeyToken的值替换为公钥标记 删除Lion.Web.WebHtmlEditor.dll引用,并添加最新的Lion.Web.WebHtmlEditor.dll引用 重新编译,搞定! 同时简单介绍一下另一个权限查看工具CASPol.exe 同样是在Visual Studio .NET 2003 命令提示下输入
CASPol -all -resolvegroup Lion.Web.WebHtmlEditor.dll
可以看到更详细的权限信息,CASPol的详细用法可以用
CASPol /?
查看,有时间我写一篇详细的介绍。 
|