部署outlook2003插件

如果你的插件部署失败,很可能是没有信任的原因,请参考下面的文章吧。

问题

outlook addin 部署成功了,但打死不能切换语言,无论切换哪个都是英文。(多语言是通过ResourceManager读取的)

解决方法

原因是资源文件是放在子目录下的dll文件,例如”zh-CN\xxx.resource.dll”,这些dll并没有授权。
你可以在 VS的命令行中输入 “caspol -lg” 列出所有授权的组。
如果你是按照MSDN的文章进行部署,你应该会有个CaspolSecurityPolicyCreator.cs的文件用于授权。

//找到这句
string arguments = policyLevel + " -q -ag " + parentCodeGroup + " -url \"" + solutionInstallationUrl + "\" Nothing -n \"" + solutionCodeGroupName + "\" -d \"" + solutionCodeGroupDescription + "\"";

//把Nothing改为FullTrust,其实就是把这个目录的所有文件都信任了
string arguments = policyLevel + " -q -ag " + parentCodeGroup + " -url \"" + solutionInstallationUrl + "\" FullTrust -n \"" + solutionCodeGroupName + "\" -d \"" + solutionCodeGroupDescription + "\"";

如果你没有上面这个文件(其实这个文件也是调用caspol.exe来授权的),可以尝试自己来运行caspol.exe -m -ag …来授权。

参考文章

Outlook 2003 Add in 部署笔记
Deploying Visual Studio 2005 Tools for the Office System SE Solutions Using Windows Installer (Part 1 of 2)

updatedupdated2023-12-062023-12-06