Move runtime copy into a separate target

This commit is contained in:
ta264 2020-07-26 21:51:51 +01:00 committed by Qstick
parent 629d784d0b
commit ee31ff1e89
5 changed files with 16 additions and 22 deletions

View File

@ -7,4 +7,5 @@
<Import Project="Targets/PublishAllRids.targets" />
<Import Project="Targets/FixBindingRedirects.targets" />
<Import Project="Targets/MonoFacades.targets" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and !$(RuntimeIdentifier.StartsWith('win'))" />
<Import Project="Targets/CopyRuntimes.targets" />
</Project>

View File

@ -19,21 +19,12 @@
<ProjectReference Include="..\NzbDrone.Core\Lidarr.Core.csproj" />
</ItemGroup>
<ItemGroup>
<RuntimeFiles Include="..\Runtimes\$(RuntimeIdentifier)\*" />
</ItemGroup>
<ItemGroup>
<Content Include="..\..\Logo\1024.png">
<None Include="..\..\Logo\1024.png">
<Link>Files\1024.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Files\**\*.*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="CopyRuntimeFilesOnBuild" AfterTargets="AfterBuild" Condition="!$(RuntimeIdentifier.StartsWith('linux')) or '$(TargetFramework)' == 'netcoreapp3.1'">
<Copy SourceFiles="@(RuntimeFiles)" DestinationFolder="$(OutDir)" />
</Target>
<Target Name="CopyRuntimeFilesOnPublish" AfterTargets="Publish" Condition="!$(RuntimeIdentifier.StartsWith('linux')) or '$(TargetFramework)' == 'netcoreapp3.1'">
<Copy SourceFiles="@(RuntimeFiles)" DestinationFolder="$(PublishDir)" />
</Target>
</Project>

View File

@ -28,18 +28,9 @@
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
</ItemGroup>
<ItemGroup>
<RuntimeFiles Include="..\Runtimes\$(RuntimeIdentifier)\*" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\Logo\64.png">
<Link>Resources\Logo\64.png</Link>
</EmbeddedResource>
</ItemGroup>
<Target Name="CopyRuntimeFilesOnBuild" AfterTargets="AfterBuild" Condition="!$(RuntimeIdentifier.StartsWith('linux')) or '$(TargetFramework)' == 'netcoreapp3.1'">
<Copy SourceFiles="@(RuntimeFiles)" DestinationFolder="$(OutDir)" />
</Target>
<Target Name="CopyRuntimeFilesOnPublish" AfterTargets="Publish" Condition="!$(RuntimeIdentifier.StartsWith('linux')) or '$(TargetFramework)' == 'netcoreapp3.1'">
<Copy SourceFiles="@(RuntimeFiles)" DestinationFolder="$(PublishDir)" />
</Target>
</Project>

View File

@ -0,0 +1,11 @@
<Project>
<ItemGroup>
<RuntimeFiles Include="..\Runtimes\$(RuntimeIdentifier)\*" />
</ItemGroup>
<Target Name="CopyRuntimeFilesOnBuild" AfterTargets="AfterBuild">
<Copy SourceFiles="@(RuntimeFiles)" DestinationFolder="$(OutDir)" />
</Target>
<Target Name="CopyRuntimeFilesOnPublish" AfterTargets="Publish">
<Copy SourceFiles="@(RuntimeFiles)" DestinationFolder="$(PublishDir)" />
</Target>
</Project>

View File

@ -13,7 +13,7 @@
-->
<PropertyGroup>
<MonoFacadesPath>$(MSBuildThisFileDirectory)Libraries\Mono\</MonoFacadesPath>
<MonoFacadesPath>$(MSBuildThisFileDirectory)..\Libraries\Mono\</MonoFacadesPath>
<ResolveReferencesDependsOn>
$(ResolveReferencesDependsOn);
SubstituteMonoFacadesBuild