我想让你问一下 IntermediateAssembly 最初设置在哪里。
我问我想优化我的作业以仅在初始化 IntermediateAssembly后应用的原因。
考虑以下比较:
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<!-- NOT WORKING: list is empty -->
<ModuleInitializerAssemblyLoaderInjectionTargetAssemblies Include="@(IntermediateAssembly->'%(Identity)')" />
</ItemGroup>
</Project>
<Project InitialTargets="init" Sdk="Microsoft.NET.Sdk">
<Target Name="init">
<ItemGroup>
<!-- WORKING: list is initialized -->
<ModuleInitializerAssemblyLoaderInjectionTargetAssemblies Include="@(IntermediateAssembly->'%(Identity)')" />
</ItemGroup>
</Target>
</Project>
在dotnet sdk中,我找不到最初设置 IntermediateAssembly 的参考。