1 README Last updated: 2013-01-09
3 Visual Studio Build Setup for Mono's Managed Code
4 =================================================
6 The scripts in this directory are used to create the various .csproj
7 for each one of the modules in Mono. To avoid accidentally making
8 changes on the Makefile system that is not reflected on the csproj
9 system, the .csproj files are generated from the actual Makefile
12 This requires a couple of steps:
14 * Extract the order, compiler and compilation flags for all
15 managed code in Mono on Linux by using the existing Makefile
18 * Generate csproj files from the previous step
20 The idea is to ensure that we do not miss any compilation flag,
21 define, resource, reference, icon or any other element that might be
22 necessary to build the Mono class libraries.
24 * Extracting the Compilation Metadata
26 The first step is to extract the compilation metadata from the
27 existing Makefiles. This is done in stages, first a fully
28 working Mono compilation setup is required, and second the data
31 The extraction is done like this, from the toplevel Mono
36 With this input, it is possible to generate an XML file, to do
41 This will generate order.xml, this contains the ordered list in
42 which directories must be compiled as well as the command line
43 options used to build it.
45 * Generate .csproj and .sln files
47 Run the genproj.exe executable in this directory.
50 /cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe genproj.csproj
53 One output of genproj is the solutions for the successive profiles,
54 from net_2_0.sln to from net_4.5.sln
58 lists a couple of options, notably to limit the scope of
59 the output solutions for each profiles to System*.dll assemblies
62 * Compiling from Visual Studio
64 Before you try to compile from Visual Studio, you are *strongly*
65 advised to set the maximum number of parallel project builds
66 to 1 (Tools -> Options -> Projects and Solutions -> Build and Run)
67 Due to the iterative building process for some of Mono's
68 assemblies, there can be clashes writing to /obj/Debug for
73 * Many assemblies still fail to compile, due to missing project
74 references output by genproj, or other issues yet to determine
76 * The first build of a solution may have a large number of
77 failing compilations, more than subsequent solution Builds
79 * The .NET 2.0 profile assemblies end up targetting the
80 v4.0 runtime, even when requesting 2.0 in the csproj file
81 (http://social.msdn.microsoft.com/Forums/en-US/msbuild/
82 thread/6c9cd0e1-7fb8-480a-b006-f034b5926e03)