发布自包含文件时,如何在子文件夹中放置/加载框架dll

时间:2019-10-23 06:10:02

标签: asp.net-core asp.net-core-3.0

发布后,我的文件/文件夹结构如下

- 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...
- ...

有没有一种方法可以将我的“ MyCoreApp ...”文件保留在根目录中,并将所有框架文件移到一个子文件夹中,例如所以看起来像这样:

- 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...
- ...

请注意,我尝试了this post's solution,但没有成功,并且想知道Core 3.0是否会有所不同。

使用它,我添加了additionalProbingPaths并将路径更改为"path": "/",但仅对一个dll进行了测试,然后才移动所有+300个文件。 < / p>

0 个答案:

没有答案