c# - Need I enable ReadyToRun in each of my dll whlie publish the exe file?
问题描述
As we know, there is ReadyToRun compilation option since .net core 3.0 .
There is several dll that made by .net core .
I created a WPF project and referenced all the dll above.
Now I am about to publish the project with ReadyToRun and there is a problem I am not so sure.
Whether the compiler will compile all the reference dll with ReadyToRun while I just compile the WPF project?
Or I have to compile with the ReadyToRun one by one in its project?
Why I asked the question it is so troublesome to compile so many dll with the different target times. I want to find a fast way to do it.
Thank you .
解决方案
将<PublishReadyToRun>
设置添加到您正在发布的项目中就足够了。您也可以使用-p:PublishReadyToRun=true
命令行选项:
dotnet publish ... -p:PublishReadyToRun=true
PublishReadyToRunExclude
您可以使用项目组排除某些程序集被编译为 ReadyToRun 图像:
<ItemGroup>
<PublishReadyToRunExclude Include="FilenameOfAssemblyToExclude.dll" />
</ItemGroup>
推荐阅读
- php - PHP pdo 仅在查询被硬编码时获得结果
- angular - 动画时垫步内容消失 - mat-horizontal-stepper
- mapbox - Mapbox - 如何在 Mapbox 中添加 .pbf 文件作为图层?
- html - Woo Commerce Checkout Paypal 的东西似乎不起作用
- c# - 如何获取列表c#的所有项目
- c - 如何在C中存储一行的最后一个总和
- git - git rebase 重新散列未触及的提交
- python - 如何将两个列表连接在一起但频率不同
- java - java.lang.IllegalStateException:当我尝试将keycloak与spring boot web + spring security项目集成时,当前用户主体不是类型
- python - 无法为形状为“(?, 120)”的张量“x:0”提供形状 (75, 4) 的值