FacePuncher7
FacePuncher7

Reputation: 139

AddictedCS SoundFingerprinting giving netstandard error

I am attempting to use AddictedCS SoundFingerprinting (https://github.com/AddictedCS/soundfingerprinting).

When I download any recent version and build with Visual Studio 2019 I get the expected output with no errors or warnings (SoundFingerprinting.dll).

The issue is that when I attempt to call functionality from the DLL in a .net console application I get errors relating to netstandard referencing.

I've attempted to add a new reference manually as the error message suggests, but get no further - same error occurs.

Here is my code, taken straight from the SoundFingerprinting example:

var hashedFingerprints = await FingerprintCommandBuilder.Instance
                                            .BuildFingerprintCommand()
                                            .From("C:/Users/Asher/Desktop/testSound.wav")
                                            .UsingServices(audioService)
                                            .Hash();

Here is the error log I am getting when compiling my console app with either mcs or csc:

C:\Users\Asher\Desktop\Raw_0.1>mcs TestProg.cs -r:SoundFingerprinting.dll -r:protobuf-net.dll TestProg.cs(46,40): error CS0012: The type System.Object' is defined in an assembly that is not referenced. Consider adding a reference to assembly netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' C:\Users\Asher\Desktop\Raw_0.1\SoundFingerprinting.dll (Location of the symbol related to previous error) Compilation failed: 1 error(s), 0 warnings

I attempted this on my desktop PC running Windows 10, and on my Surface Pro 6 running Windows 10. I also attempted this using VS2017. The result was the same each time. Also tried to use the library in Unity3D which caused a crash with no prompt or stacktrace output.

To Reproduce Use: Windows 10, Visual Studio 2019 Steps to reproduce the behavior:

Text Text

Upvotes: 1

Views: 329

Answers (1)

goodfellow
goodfellow

Reputation: 3725

I encountered exactly the same problem today. What fixed it for me was simply downloading the latest version of protobuf-net from nuget:

Install-Package protobuf-net -Version 3.0.101

Also, please don't paste pictures of code but the code itself next time.

Upvotes: 0

Related Questions