【问题标题】:RegAsm error RA0000 Could not load file or assembly on Network DriveRegAsm 错误 RA0000 无法在网络驱动器上加载文件或程序集
【发布时间】: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


    【解决方案1】:

    regasm.exe.config 中正确的行是

     <loadFromRemoteSources enabled="true"/>
    

    案件很重要

    【讨论】:

    • 我还必须在 Windows 2003 R2 Server 的本地驱动器上执行此操作
    猜你喜欢
    • 1970-01-01
    • 2010-10-07
    • 2023-03-05
    • 1970-01-01
    • 1970-01-01
    • 2012-01-21
    • 2014-05-07
    • 2013-02-23
    相关资源
    最近更新 更多