Microsoft Unity 导致应用程序启动延迟 30 秒

Microsoft Unity causing 30 second delay in app startup

我正在使用 Unity v 2.1.505.2。 在我的生产 Win 7 机器上,仅存在 Unity 容器就会导致应用程序在 运行 之前延迟 30 秒。甚至在我实例化容器之前。

static void Main()
{
   // a 30 second delay occurs before the next line runs
   DoSomething();
   IUnityContainer container = null;
}

有人知道为什么会发生这种情况吗?它不会发生在我的开发 Win 7 盒子上。谢谢!

将以下内容放入应用程序的配置文件中解决了我的问题。

<configuration>
  <runtime>
    <generatePublisherEvidence enabled="false"/>
  </runtime>
</configuration>