When publish self-contained, how to place/load framework dll's in a subfolder

眉间皱痕 提交于 2020-01-06 05:21:07

问题


After published, my file/folder structure looks like this

- Connected Services
  - SomeService
    - file1
    - file2
- Pages
  - PartialFiles
    - file1
    - file2
- refs
  - files
- wwwroot
  - css
    - file1
    - file2
- api-ms-win-core-...
- api-ms-win-core-...
- api-ms-win-core-...
- api-ms-win-core-...
- ...
- MyCoreApp...
- MyCoreApp...
- MyCoreApp...
- MyCoreApp...
- ...
- Microsoft.AspNetCore...
- Microsoft.AspNetCore...
- Microsoft.AspNetCore...
- Microsoft.AspNetCore...
- Microsoft.AspNetCore...
- ...

Is there a way to keep my "MyCoreApp..." files in the root and move all the framework files into a subfolder, e.g. so it could look like this:

- Connected Services
  - SomeService
    - file1
    - file2
- Pages
  - PartialFiles
    - file1
    - file2
- refs
  - files
- wwwroot
  - css
    - file1
    - file2
- lib                                  <-- new folder for framework files
  - api-ms-win-core-...
  - api-ms-win-core-...
  - api-ms-win-core-...
  - api-ms-win-core-...
  - ...
  - Microsoft.AspNetCore...
  - Microsoft.AspNetCore...
  - Microsoft.AspNetCore...
  - Microsoft.AspNetCore...
  - Microsoft.AspNetCore...
  - ...
- MyCoreApp...                         <-- app files in the root
- MyCoreApp...
- MyCoreApp...
- MyCoreApp...
- ...

As a note, I tried this post's solution, w/o success, and wondering if Core 3.0 does it differently.

With it, I added additionalProbingPaths and changed path to "path": "/", only for one dll though, to test before moving all +300 files.

来源:https://stackoverflow.com/questions/58516461/when-publish-self-contained-how-to-place-load-framework-dlls-in-a-subfolder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!