NETFramework4.0 的DLL可以不配置config文件吗

kkkwzwx 2014-05-25 04:36:03
现状:我写的一个DLL文件要到别的程序里调用,EXE文件是Delphi写的,可我的DLL运行时需要一个APP.CONFIG里面内容为<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
</configuration>

提示报这个错
Could not load file or assembly 'file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.
需要结果:
1、APP.CONFIG放到哪才能支持DLL运行。
2、不配置APP.CONFIG运行DLL。
以上两种结果均可,希望高人指点,在线急等。
...全文
147 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
泡泡龙 2014-05-25
  • 打赏
  • 举报
回复
http://www.2cto.com/kf/201301/184113.html
kkkwzwx 2014-05-25
  • 打赏
  • 举报
回复
现在DLL访问没有问题,只是DLL运行的时候需要CONFIG文件,
threenewbee 2014-05-25
  • 打赏
  • 举报
回复
如果你希望不用指明dll路径可以访问到dll,需要将dll注册到GAC中: 用sn签名,用gacutil注册 http://support.microsoft.com/kb/315682

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧