views:

70

answers:

2

I'd like to see how some classes are implemented in Mono and would like to use code navigation features found in Visual Studio. Has anyone tried importing Mono source codes as a VS project / solution?

+1  A: 

Yes, you can. Just add all the souce files to a project.

Venemo
+2  A: 

Yep, it is fairly simple. The solution file for Visual Studio 2008 is shipped with a source tarball and is located under the *..\mono-2.6.1.tar\mono-2.6.1\mono-2.6.1\msvc* directory (you should specify your mono version of course). Here is a quotation from a readme file:

BUILDING

From this directory type:

   msbuild.exe mono.sln /p:Configuration=Debug_eglib

msbuild must be in your path, it comes with the .NET Framework.

Latest sources can be downloaded from here.

EDIT

First of all, mono class library is part of a mono runtime and is being build simultaneously with a runtime. Not all parts of mono (as well as not all parts of a base class library) are written in c#. For example, zlib related stuff is written in C. Building mono is not an easy process, my answer above is just a tip as to where the solution file is located. The complete tutorial on building mono on Windows cold be found here. If you just want to browse a source code, *..\mono-2.6.1.tar\mono-2.6.1\mono-2.6.1\mcs\class\corlib\System* would be a good starting point.

n535
Isn't this a solution file for compilers etc? My VS doesn't have C++ component installed and it doesn't seem to be able to open a single project in that solution (I expected the sources to be C#, not C++ for the class library).
Borek
See EDIT for details.
n535