开发者

VSTO, Outlook.exe.config, and <supportedRuntime>

I've created a VSTO 2.0 SE add-in for Outlook 2007. Usually, it installs no problem on end-users' machines, but sometimes they have an outlook.exe.config file next to Outlook.exe which specifies that only .NET 1.0 or 1.1 is allowed to load. For example:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <startup>
    <supportedRuntime version="v1.0.3705" />
    <supportedRuntime version="v1.1.4322" />
  </startup>
</configuration>

In my test environment, if I add the 2.0 runtime to this list, then my add-in loads. IE:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <startup>
    <supportedRuntime version="v1.0.3705" />
    <supportedRuntime version="v1.1.4322" />
    <supportedRuntime version="v2.0.50727" />
  </startup>
</configuration>
开发者_StackOverflow社区

Is there any issue with adding the last line automatically during installation? If there happens to be another add-in that is using the 1.1 runtime, will both add-ins be able to run side-by-side? Thanks!


No, they can't run side-by-side. Whatever plug-in loads first will determine what version of the CLR will be loaded. Probably causing other plug-ins to fail.

This is fixed in .NET 4.0

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜