accord-net / framework

Machine learning, computer vision, statistics and general scientific computing for .NET
http://accord-framework.net
GNU Lesser General Public License v2.1
4.48k stars 1.99k forks source link

Accord.DirectSound.AudioDeviceCollection -> System.IO.FileLoadException: A strongly-named assembly is required. #231

Open jamessdixon opened 8 years ago

jamessdixon commented 8 years ago

I am getting a this error

System.IO.FileLoadException: A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

at Accord.DirectSound.AudioDeviceCollection..ctor(AudioDeviceCategory category)

When I run this code

#r "../packages/Accord.Audio.3.0.2/lib/net45/Accord.Audio.dll"
#r "../packages/Accord.DirectSound.3.0.2/lib/net45/Accord.Audio.DirectSound.dll" 
#r "../packages/SharpDX.2.6.0/Bin/DirectX11-Signed-net40/SharpDX.dll"
#r "../packages/SharpDX.2.6.0/Bin/DirectX11-Signed-net40/SharpDX.DirectSound.dll"

open Accord.Audio
open Accord.DirectSound

let collection = new AudioDeviceCollection(AudioDeviceCategory.Output)

Any suggestions? Does Accord.DirectSound need a snk?

zgrkpnr commented 8 years ago

I couldn't repeat the error myself. However, most of the time you cannot get comprehensive exception info from interactive window. I suggest you to run the code in debug mode and see the message or the inner exception if present.

cesarsouza commented 6 years ago

Hi all,

First of all, sorry for the long delay in attempting to answer the question.

I've never been able to reproduce this error myself, neither in the unit tests or in the sample applications. It certainly doesn't happen in the latest version of the audio sample applications, so if anyone is still running into this issue, I'd suggest start by trying to execute one of the audio sample applications (e.g. wave recorder) and see if you can reproduce the problem. If it doesn't happen, then this is most likely an issue with VS/environment installation.

Regards Cesar