【发布时间】:2011-12-18 17:11:09
【问题描述】:
基于this question,我尝试使用<codebase> 定位外部程序集。现在,当我运行程序时,我收到一条错误消息,指出私有程序集位于应用程序库之外。我该如何解决这个问题?我看到的一个建议是签署大会。我这样做了,但是我的程序找不到程序集。当我取消签名时,我收到outside the appbase 错误。如何使用<codebase> 加载位于其他地方的程序集而不安装到 GAC? (探测也不起作用,似乎它仍然必须存在于应用程序文件夹中)
我的配置文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NGameHost"
culture="neutral" />
<codeBase version="1.0.0.0"
href="C:/Program Files/NetworkGame3/api/NGameHost.exe"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
【问题讨论】:
标签: c# console-application .net-assembly codebase assembly-signing