大会生成失败 - 引用程序集“Interop.Office”没有强名称 [英] Assembly generation failed -- Referenced assembly 'Interop.Office' does not have a strong name

查看:214
本文介绍了大会生成失败 - 引用程序集“Interop.Office”没有强名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WPF 4项目在VS2010和一个双赢的形式用户控件项目来承载Word应用程序到这让word文档进行交互。和其他COM的DLL。所有内COM DLL被称为进入我的主要WPF应用程序。我要发布我的项目,所以我可以在另一台机器上安装它,并为它进行自动更新,我得到错误:大会生成失败 - 引用程序集Interop.Office没有一个强大的名字。错误的每个COM DLL。
一个dll指(Interop.word.dll,interop.office.dll,interop.VBIDE.dll),所有这些DLL文件还提到和使用到我的WPF代码。

I have a WPF 4 project to interact with word documents made in VS2010 and a win form User Control project to host word application into it. And other com dlls. All com dlls are referred into my main wpf application. I want to publish my project so I can install it on another machine and perform automatic update for it, I get error: "Assembly generation failed -- Referenced assembly 'Interop.Office' does not have a strong name. ". error for each COM Dll. A dll refer to (Interop.word.dll, interop.office.dll, interop.VBIDE.dll) and all these dlls are also refer and used into my wpf code.

我发现强签名的程序集链接有同样的问题,但它并没有解决问题。

I found Strong Signed Assemblies link have same question but it does not solve the problem.

推荐答案

我花了一段时间拖网上网本,我相信,你所需要的答案可能是在这里,对于大多数第三方dll的。

I spent a while trawling the internet for this, I believe that the answer you need may be here, for most 3rd party dll's.

添加强名称的Interop DLL

本文介绍了三种方法来添加一个强名称第三方组件。这些命令是:结果
1.通过密钥对添加强名称

The article describes three ways to add a strong name to a third party assembly. The commands are:
1. Adding a Strong Name via Key Pair

> SN -k MyKeyPair.snk
> ILDASM ASQLService.dll /out:ASQLService.il
> ILASM ASQLService.il /dll /resource=ASQLService.res /key=MyKeyPair.snk



2。通过在证书存储证书添加强名称

2. Adding a Strong Name via a Certificate in a Certificate Store

> ILDASM ASQLService.dll /out:ASQLService.il  
> MAKECERT -ss MyCertificateStore -sk MyKeyContainer
> ILASM ASQLService.il /dll /resource=ASQLService.res /key=@MyKeyContainer



3。通过在个人信息交换证书(.PFX)文件

3. Adding a Strong Name via a Certificate in a Personal Information Exchange (.pfx) File

> MAKECERT -r -pe -sv MyCertificate.pvk MyCertificate.cer
> PVK2PFX -pvk MyCertificate.pvk -pi qwerty -spc MyCertificate.cer -pfx MyCertificate.pfx
> SN -p MyCertificate.pfx MyCertificate-publickey.snk
> ILASM ASQLService.il /dll /resource=ASQLService.res /key=MyCertificate-publickey.snk
> SN -R ASQLService.dll MyCertificate.pfx



希望它能帮助

Hope it helped

这篇关于大会生成失败 - 引用程序集“Interop.Office”没有强名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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