0

I have downloaded the irrKlang sound library, and since I'm using C# with sharpdevelop I have: a) Added a reference to the DLL such that irrKlang.NET4 appears under References in the project tree. b) Added the statement 'using IrrKlang.NET4;' to my code, which corresponds exactly to one of the example programs provided.

When I try to compile, SD tells me that the type or namespace name NET4 doesn't exist (are you missing an assembly reference).

If I change the using statement to 'using IrrKlang;' as (rather confusingly) appears in another .net example program, my application compiles but I get the runtime error "Error: Could not load file or assembly 'irrKlang.NET4, Version .... or one of it's dependencies. An attempt was made to load a program with an incorrect format".

What is going on here? Any ideas?

Thanks in advance

CdrTomalak
  • 479
  • 1
  • 4
  • 15
  • Unable to reproduce this with SharpDevelop. I can use IrrKlang and run sample code to play some sounds using the library. Can you provide your project and source code? – Matt Ward Jan 30 '14 at 11:41

2 Answers2

0

It looks like that assembly was not constructed properly

instead of

using irrKlang.Net4;

change it to

using irrKlang;

and all is well :)

GreatJobBob
  • 271
  • 1
  • 8
  • I have changed it to exactly that and SD says the namespace 'irrKlang' cannot be found ? – CdrTomalak Jan 29 '14 at 19:30
  • Sorry, not sure why then in Visual Studio I add reference to irrKlang.NET4 and added using irrKlang.NET4 and got error message "the namespace NET4 could not be found are you missian a reference" Once I changed it to using irrKlang; then it worked and I am able to see all properties and methods of class. i used irrKlang-1.4.0b.zip – GreatJobBob Jan 29 '14 at 19:37
  • Argh. Could be SD that's the problem then. How infuriating! Maybe VS is doing something by default that SD doesn't? – CdrTomalak Jan 29 '14 at 19:39
0

IrrKlang comes preloaded with various versions for different .NET distributions - both x32 an x64. Make sure you're using the correct one, also set your target build for the corresponding .NET version you're using... And yes, you should be doing :

using IrrKlang;

.just an idea...