在没有app.config的情况下在.NET exe中禁用authenticode签名验证

6 .net configuration app-config authenticode

有没有人知道如何在不使用应用程序配置文件的情况下禁用.NET可执行文件中的authenticode签名验证(以避免启动缓慢)?换句话说,这样做:

<configuration>
    <runtime>
        <generatePublisherEvidence enabled="false"/>
    </runtime>
</configuration>
Run Code Online (Sandbox Code Playgroud)

没有app.config.可能吗?

Dir*_*mar 0

好吧,根据 MSDN,元素generatePublishersEvidence 只能在配置文件中使用:

配置文件

该元素只能在应用程序配置文件中使用。

请参阅http://msdn.microsoft.com/en-us/library/bb629393.aspx