使用 mklink 将一个文件夹中的 dll 文件符号链接到另一个文件夹

Symlink dll files from one folder to another using mklink

如果我没有复制本地那些 dll 的选项,我如何将所有 dll 从另一个应用程序符号链接到我的 bin 文件夹?

类似于:

mklink /h "C:\myApplication\bin\*.dll" "C:\directoryWithTheDlls\bin\*.dll"

这是帮助中的 loadlibrary 搜索顺序。

The directory from which the application loaded.

The current directory. Windows XP: If HKLM\System\CurrentControlSet\Control\SessionManager\SafeDllSearchMode is 1, the current directory is the last directory searched. The default value is 0.

The Windows system directory. Use the GetSystemDirectory function to get the path of this directory. Windows NT/2000/XP: The name of this directory is System32.

Windows NT/2000/XP: The 16-bit Windows system directory. There is no function that obtains the path of this directory, but it is searched. The name of this directory is System.

The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.

The directories that are listed in the PATH environment variable.

因此将该目录添加到路径中。

我决定用这个命令复制所有内容:

 "/c mklink "C:\myApplication\bin\CopiedAssemblies" "C:\directoryWithTheAssemblies\bin" /j"