解决CopySourceAsHTML异常

in Develop

CopySourceAsHTML是一款vs2005的插件,安装完后,在vs2005代码视图选中代码后,在右键菜单会出现“Copy as Html”,可以直接复制成html格式。

但它对中文版的vs2005支持并不好,很多朋友在安装之后启动vs2005都会出现异常的错误(错误截屏已被我和谐)

直接给出解决办法吧:

1、下载源代码,

点击下载该压缩文档

2、打开 Connect.cs文件,找到第195行,将" editPopup = (CommandBarPopup)commandBars["MenuBar"].Controls["Edit"];"中的Edit改成"编辑",即:

 private void AddControls()

        {

            CommandBars commandBars;

            CommandBarPopup editPopup;

            int copyIndex;

            commandBars = (CommandBars)this.application.CommandBars;

            editPopup = (CommandBarPopup)commandBars["MenuBar"].Controls["编辑"];

            copyIndex = FindCopyOnCommandBar("Edit") + 1;

 

3、在解决方案管理器中,选中项目,右键-属性-资源选项卡,找到CopyMenuItemText,其值改为:复制(C)即可.

4、重新编辑,将CopySourceAsHtml.dll覆盖安装目录的同名文件即可。

安装文件:

CopySourceAsHtml-2.0.0-Installer.zip (162.38 kb)

编辑好的文件下载:

CopySourceAsHtml.dll (60.00 kb)


1 Comment

One Comment

  1. Hi there,

    I can’t read Chinese, but it looks like you’ve found and fixed a language-specific bug in CopySourceAsHtml. If you’d be interested in helping me understand the bug and test the fix, it could be fixed in the next release.

    http://copysourceashtml.codeplex.com/

    Cheers,

    Colin

Leave a Reply

Using Gravatars in the comments - get your own and be recognized!

XHTML: These are some of the tags you can use: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>