更新时间:2023-10-28 10:47:46
据我所知,你有一个 Standalone (SCD)
应用程序.
As far as I can see you have a Standalone (SCD)
app.
对于这种类型的部署,hostfxr.dll
应始终存在于应用程序目录中.
For that type of deployment hostfxr.dll
should always exist in the app directory by convention.
对于其他 deps,您可以将它们移动到任何位置,但是您需要为每个构建编辑 [AppName].deps.json
并指定附加探测路径.此外,如果您确定不使用它们,您可以***地删除所有冗余依赖项(从 deps.json 和文件本身).
As to other deps, you are able to move them to any locations, however you'll need to edit [AppName].deps.json
for every build and also specify Additional probing paths. Besides, you are free to remove all the redundant dependencies (from deps.json and the file itself) if you are sure that you don't use them.
检查这个演示,其中我已经放置了Standalone
的所有依赖项> 可以移动到其他位置到 lib
子目录的应用.
Check this demo where I've put all the dependencies of a Standalone
app that could be moved to other location to a lib
subdirectory.
请注意以下事项:
NuGet 包缓存
因此在里面有一个包布局.NuGet package cache
thus have a package layout inside.另外,考虑使用 Portable (FDD)
类型.您将有更少的占用空间和更大的灵活性来安排文件.
Also, consider having a Portable (FDD)
type. You'll have a much less footprint and more flexibility arranging the files.