將.Net應用程序依賴的庫文件部署到其餘目錄下

以程序:ReferenceClass.exe爲例,引用myClass.dll;html

1.程序編譯成功後會生成ReferenceClass.exe.config文件;app

2.打開ReferenceClass.exe.config文件,configuration元素下增長節點spa

    <runtime>
    <gcConcurrent   enabled="true"   />
    <assemblyBinding   xmlns="urn:schemas-microsoft-com:asm.v1">
      <publisherPolicy   apply="yes"   />
      <probing   privatePath=".\myClass"   />
    </assemblyBinding>
  </runtime>

3.在ReferenceClass.exe目錄下新建文件件,把myClass.dll移到myClass文件夾中

4.至此大功告成!code



資料:xml

https://msdn.microsoft.com/zh-cn/library/yx7xezcf(v=vs.80).aspxhtm

http://www.csharpwin.com/csharpspace/9839r5399.shtml
io


版權聲明:本文爲博主原創文章,未經博主容許不得轉載。asm

相關文章
相關標籤/搜索