Fix linking nothing.
This commit is contained in:
Родитель
2864a71683
Коммит
621fc546a9
|
@ -451,9 +451,10 @@
|
|||
|
||||
<!-- TrimMode specifies what the linker will do with framework assemblies -->
|
||||
<TrimMode Condition="'$(_LinkMode)' == 'TrimMode'">$(TrimMode)</TrimMode>
|
||||
<TrimMode Condition="'$(_LinkMode)' == 'None'">copy</TrimMode> <!-- Don't use 'copyused', because that might still end up saving some assemblies, and if that's the platform assembly, it may break the partial static registrar -->
|
||||
<TrimMode Condition="'$(_LinkMode)' == 'None'">copy</TrimMode>
|
||||
<TrimMode Condition="'$(_LinkMode)' == 'SdkOnly'">partial</TrimMode>
|
||||
<TrimMode Condition="'$(_LinkMode)' == 'Full'">full</TrimMode>
|
||||
<!-- For None link mode we also need to set TrimMode for all assemblies. This is done further below -->
|
||||
|
||||
<!-- Determine if any assemblies are actually trimmed, or if we're in a "Don't link" scenario -->
|
||||
<!-- We're in a "Don't link" scenario if both of the following are true:
|
||||
|
@ -562,6 +563,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Mark all assemblies to be copied if we're not linking any assemblies -->
|
||||
<ResolvedFileToPublish
|
||||
Update="@(ResolvedFileToPublish)"
|
||||
Condition="'$(_LinkMode)' == 'None' And '%(ResolvedFileToPublish.Extension)' == '.dll' And '%(ResolvedFileToPublish.AssetType)' != 'native'"
|
||||
>
|
||||
<TrimMode>copy</TrimMode> <!-- Don't use 'copyused', because that might still end up saving some assemblies, and if that's the platform assembly, it may break the partial static registrar -->
|
||||
</ResolvedFileToPublish>
|
||||
|
||||
<!-- Mark our entry assembly as a root assembly. -->
|
||||
<TrimmerRootAssembly Include="@(ResolvedFileToPublish)" Condition="'%(ResolvedFileToPublish.Filename)' == '$(AssemblyName)' And '%(ResolvedFileToPublish.Extension)' == '.dll'" />
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче