您的位置:首页 > 技术教程 > vb

通过app.config来改变编译路径的问题
【字体: 整理日期:2008-9-8 11:11:24 打印本文】 【收藏此文

问题: 我先把我的意思讲一遍: 假如把一个a工程编译后: 会在debug目录中生成以下文件: a.exe a.pdb a.xml 引用的common.dll 我在制作setup文件后,我想 生成一个这样的目录: a目录中: bincommon.dll a.exe 但现在a.exe 和common.dll不在一级目录上,就出错.

  解决: 项目 右键-->追加-->应用配置文件-->添加一个app.config,然后加下以下代码:

  <configuration>

  <runtime>

  <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">

  <probing privatepath="bin"/>

  </assemblybinding>

  </runtime>

  </configuration>

  再编译的时候会自动生成a.exe.config.xml文件.再把它添加到安装项目中.



查询
关键词:
相关文章
标签Tags