Skip to content

Commit 423f0c0

Browse files
committed
Fix MSBuild tasks
1 parent 8c34bc7 commit 423f0c0

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎YoutubeDownloader/YoutubeDownloader.csproj‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
</PropertyGroup>
1313
<PropertyGroup>
1414
<DownloadFFmpeg>true</DownloadFFmpeg>
15+
<PublishMacOSBundle>false</PublishMacOSBundle>
1516
</PropertyGroup>
1617
<ItemGroup>
1718
<AvaloniaResource Include="..\favicon.ico" Link="favicon.ico" />
@@ -66,7 +67,7 @@
6667
</ItemGroup>
6768
<Target
6869
Name="DownloadFFmpeg"
69-
BeforeTargets="Restore;PreBuildEvent"
70+
BeforeTargets="PreBuildEvent"
7071
Condition="$(DownloadFFmpeg) AND !Exists('ffmpeg.exe') AND !Exists('ffmpeg')"
7172
>
7273
<Exec
@@ -79,6 +80,15 @@
7980
LogStandardErrorAsError="true"
8081
Condition="'$(RuntimeIdentifier)' == ''"
8182
/>
83+
<!-- Update FFmpeg references so that the files get copied to the output within the same build sequence -->
84+
<ItemGroup>
85+
<None
86+
Include="ffmpeg.exe"
87+
CopyToOutputDirectory="PreserveNewest"
88+
Condition="Exists('ffmpeg.exe')"
89+
/>
90+
<None Include="ffmpeg" CopyToOutputDirectory="PreserveNewest" Condition="Exists('ffmpeg')" />
91+
</ItemGroup>
8292
</Target>
8393
<Target Name="PublishMacOSBundle" AfterTargets="Publish" Condition="$(PublishMacOSBundle)">
8494
<Exec

0 commit comments

Comments
 (0)