【发布时间】:2015-09-23 14:42:14
【问题描述】:
我有一个 VS 扩展,它应该使用 Gmail api 向我公司的某些用户发送邮件。
在开发过程中,我遇到了System.Net.Http.Primitives 版本的一个常见问题,该问题在 Google API 中以某种方式搞砸了。
common solution 用于将 bindingRedirect 放在 app.config 中,以将所有调用重定向到库的最新版本。如下:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
但是,如果我的输出是 Vsix 包,这似乎不起作用。生成的 Vsix 甚至没有 app.config。
我知道一个解决方案,将bindingRedirect 添加到machine.config 文件,但我的扩展名被其他人使用,我不想强迫他们将内容放入他们的机器配置文件中。
还有其他解决方案吗?
【问题讨论】:
标签: google-api app-config vsix