假设项目:
生成:Demo.exe
引用:1.dll;2.dll;3.dll如果程序及所有dll都在同一目录时,程序可以正常运行。实际打包时,我想把所有dll部署到 .\libs 目录下。请教怎么才能实现既可自定义部署,又保证程序正常运行?
生成:Demo.exe
引用:1.dll;2.dll;3.dll如果程序及所有dll都在同一目录时,程序可以正常运行。实际打包时,我想把所有dll部署到 .\libs 目录下。请教怎么才能实现既可自定义部署,又保证程序正常运行?
试过了,这样好像不行啊(1.dll;2.dll;3.dll是被Demo.exe引用的组件),重新生成后:
Demo.exe
.\libs\1.dll
.\libs\2.dll
.\libs\3.dll....运行Demo.exe 报错
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;lib;Components"/>
</assemblyBinding>
</runtime>
<configuration>
<runtime>
<gcConcurrent enabled="true"/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<publisherPolicy apply="yes"/>
<probing privatePath="libs"/>
<!--文件夹名-->
</assemblyBinding>
</runtime>
</configuration>
引用不同文件夹下的Dll文件
http://blog.csdn.net/whowhen21/archive/2009/04/23/4104281.aspx
但我想知道有没有办法将配置写进exe中,即不在外部带.config文件
不想用反射的方式,而且,就这种方法在CSDN很多文章都有,就是没有实例,反正我试过不知道怎么在我这也不行。