drewnoakes / metadata-extractor-dotnet

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Other
922 stars 164 forks source link

cannot find package in nuget #357

Open pbarone opened 7 months ago

pbarone commented 7 months ago

WinForms project with .NET8. When trying to install the package from the Package Manager Console I get the below:

PM> Install-Package MetadataExtractor
Install-Package : Unable to find package 'MetadataExtractor'
At line:1 char:1
+ Install-Package MetadataExtractor
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Time Elapsed: 00:00:00.3459234

Not sure if this is the right place to ask for help with this, can anybody help?

pbarone commented 7 months ago

Looks like it works if I pick .NET 6. Any plans to make this compatible with .NET 8?

drewnoakes commented 7 months ago

.NET 8 support is expected to work.

What if you add this to your .csproj file:

<ItemGroup>
  <PackageReference Include="MetadataExtractor" Version="2.8.1" />
</ItemGroup>
drewnoakes commented 7 months ago

Just tested this on a .NET 8 console app and it worked for me:

PM> Install-Package MetadataExtractor
Restoring packages for C:\Users\drnoakes\source\repos\ConsoleApp556\ConsoleApp556\ConsoleApp556.csproj...
  GET https://api.nuget.org/v3/vulnerabilities/index.json
  OK https://api.nuget.org/v3/vulnerabilities/index.json 27ms
  GET https://api.nuget.org/v3-vulnerabilities/2024.01.12.23.26.44/vulnerability.base.json
  GET https://api.nuget.org/v3-vulnerabilities/2024.01.12.23.26.44/2024.01.15.17.27.04/vulnerability.update.json
  OK https://api.nuget.org/v3-vulnerabilities/2024.01.12.23.26.44/vulnerability.base.json 9ms
  OK https://api.nuget.org/v3-vulnerabilities/2024.01.12.23.26.44/2024.01.15.17.27.04/vulnerability.update.json 28ms
Installing NuGet package MetadataExtractor 2.8.1.
Writing assets file to disk. Path: C:\Users\drnoakes\source\repos\ConsoleApp556\ConsoleApp556\obj\project.assets.json
Restored C:\Users\drnoakes\source\repos\ConsoleApp556\ConsoleApp556\ConsoleApp556.csproj (in 495 ms).
Successfully installed 'MetadataExtractor 2.8.1' to ConsoleApp556
Successfully installed 'Microsoft.NETCore.Platforms 2.1.2' to ConsoleApp556
Successfully installed 'System.Runtime.CompilerServices.Unsafe 4.5.2' to ConsoleApp556
Successfully installed 'System.Text.Encoding.CodePages 4.5.1' to ConsoleApp556
Successfully installed 'XmpCore 6.1.10.1' to ConsoleApp556
Executing nuget actions took 594 ms
Time Elapsed: 00:00:06.1577814
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="MetadataExtractor" Version="2.8.1" />
  </ItemGroup>

</Project>