【发布时间】:2014-10-09 04:51:36
【问题描述】:
我在使用批处理文件在网络驱动器上的框架 4 上调用 Regasm 时遇到问题。 当 dll 在本地驱动器上时,它可以正常工作。
消息是无法加载文件或程序集 filename.dll 或其依赖项之一。不支持操作。
问题已讨论 here ad "Darrens Developer Diary"
但是按照描述编辑配置并没有帮助
我也尝试了这个建议 here 这行不同
<loadFromRemoteSources="true"/>
我收到了另一个错误 "系统无法执行指定的程序"
该 DLL 曾经使用 Framework 2,但我使用 Framework 2 Regasm 注销了它。
这里是 regasm.exe.config
<?xml version ="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<requiredRuntime safemode="true" imageVersion="v4.0.30319" version="v4.0.30319"/>
<supportedRuntime version="v4.0" sku="client" />
</startup>
<runtime>
<loadfromremotesources enabled="true"> </loadfromremotesources>
</runtime>
</configuration>
这是我的批处理文件中的命令
Z:
cd foldername
c:\WINDOWS\Microsoft.Net\Framework\v4.0.30319/regasm /verbose /codebase /tlb: .\SBD.CommBridge.tlb .\SBD.ComBridge.dll
【问题讨论】:
标签: regasm