LoginSignup
4

More than 5 years have passed since last update.

dllファイルをサブフォルダーにおく

Posted at

Summary

依存するdllファイルはexeファイルと同じフォルダに置くのが一般的
依存するdllをサブフォルダーに置く方法

方法

configファイルを作成する

ファイル構成

gimBeam.exeがメイン


highball$ tree
.
├── dll
│   ├── FSharp.Compiler.Service.dll
│   ├── FSharp.Core.dll
│   ├── Newtonsoft.Json.dll
│   ├── deopletefs.exe
│   └── log.txt
├── gimBeam.exe
├── gimBeam.exe.config
└── gimBeam.fsx

1 directory, 8 files

config ファイル

gimBeam.exe.configをつくって下記を入力


<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

   <!-- Look for addins in the addins directory for now -->
      <probing privatePath="dll"/>

    </assemblyBinding>
  </runtime>
</configuration>

留意事項

依存するdllファイルは同じフォルダかサブフォルダしかおけない

privatePath は親フォルダを指定できない仕様

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4