unosquare / ffmediaelement

FFME: The Advanced WPF MediaElement (based on FFmpeg)
https://unosquare.github.io/ffmediaelement/
Other
1.17k stars 240 forks source link

Use of a reference to .NET5 System.Runtime assembly in .NET48 project #535

Closed stf1981 closed 3 years ago

stf1981 commented 3 years ago

Use of a reference to .NET5 "System.Runtime" assembly in .NET48 project

NuGet PackageManager says "Unsupported" on the newest version, where are the frameworks listed. When building the app a error comes up that says, that the "System.Runtime" from .NET5 is used but not exists.

Issue Categories

Version Information

Steps to Reproduce

  1. Make a .NET48 project
  2. Install the Nuget Package
  3. Use and build it
Nisse123 commented 3 years ago

It is easy to fix. You need to clone the repo and not use the nuget package Edit Unosquare.FFME.Windows.csproj replace the line `

net5.0-windows` with ` net461;net472;net5.0-windows ` Edit Unosquare.FFME.Windows.Sample.csproj replace the line ` net5.0-windows` with `net461;net472;net5.0-windows ` In MediaBlockBuffer.cs a system.indexer [^1] (C#8) is used, replaced it with Linq last i.e. change ` var lastBlock = PlaybackBlocks.Count > 0 ? PlaybackBlocks[^1] : null;` to `var lastBlock = PlaybackBlocks.Count > 0 ? PlaybackBlocks.Last() : null; ` In LegacyAudioExceptions.cs add ` using System.Security.Permissions; ` Rebuild and the .Netframework dlls are found in Unosquare.FFME.Windows\bin\Release\net472 I suggest that .Netframework compabiltity is maintained.
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mariodivece commented 3 years ago

fixed in the latest commit. will release new package