0

I am trying to build a C# project (downloaded code) in Visual Studio Express 2008. I get the error (my translation):

The type or namespace name "Allegro" couldn't be found.

for the line

using Allegro;

I know the 2D graphics library Allegro, of course, but I can't find much information on how to use it in C#. It is being used for visualization in the project I am trying to compile.

I also get the warning

This reference couldn't be resolved. The Universal assembly couldn't be found.

I haven't been working with C# before and and I barely know Visual Studio Express. These are newbie mistakes - but I just need a fast solution for this problem. Could someone provide me with a short step-by-step solution?

Brian Rasmussen
  • 114,645
  • 34
  • 221
  • 317
7331
  • 1
  • Where is your "Allegro.dll"? The compiler needs to find it. So it needs to be where the project expects it. The project file contains a list of referenced assemblies, so you need to check the path there. – CodesInChaos Dec 28 '10 at 14:40

2 Answers2

0

Remove old reference of Allegro.dll from project and add it again.

Andrei Andrushkevich
  • 9,905
  • 4
  • 31
  • 42
0

Allegro isn't a .NET library; it's written in traditional unmanaged C. If you downloaded code that references an Allegro C# library, then perhaps the author was using some unofficial C# bindings. If so, the solution is to find that additional library and use it.

Otherwise, there is no short, step-by-step solution. You would need to use DllImport on each function that you need, and follow the standard practices for using unmanaged C DLLs in C#.

Matthew
  • 47,584
  • 11
  • 86
  • 98