Here's what I did so far:
Went here and downloaded the source code: http://oggsharp.codeplex.com/SourceControl/latest#OggSharp/CsVorbis . It came as "oggsharp-19c0361a8fa8.zip" and in there is OggSharp\CsVorbis which has all the .cs files I want.
Started a new Class Library project in MS VS 2010. Added all the .cs files from that folder (CsVorbis).
Compiled the project. This made a CsVorbisDll.dll file.
Went to another project of mine---a MonoGame DirectX project---and added a reference to that dll.
Added
using CsVorbisDll;
, and this part works. So it can see the dll. (EDIT: typod it before. It isusing CsVorbisDll;
)Tried to use classes from that dll, such as OggDecoder, but this doesn't work! It says "The type or namespace name 'OggDecoder' could not be found"
Apparently my project can see the dll, but cannot see into the dll. I'm not sure why. The OggDecoder class is public. I noticed, however, that the dll was only 4 KB in size, whereas the source code folder was something like 300 KB. Did it not compile correctly?
I set the Configuration to "Release", not "Debug", when I compiled the dll. My MonoGame Project is also in MS VS 2010, uses DirectX, and otherwise runs fine.
EDIT: What I've verified so far: Both projects target ".NET Framework 4" (not the Client Profile). Both projects have platform target "x86".
Can someone help me set up this dll correctly? I really want it to be a dll. There are too many *.cs from the source to just add them all into my MonoGame Project.
EDIT: I found the answer and posted it. Basically, I had to make the project name the same as the namespace of all the .cs files so that the dll filename is the same as the namespace too.