Merge pull request #505 from roji/shutdown_flow
[mono.git] / msvc / scripts / README
1 README                                  Last updated: 2013-01-09
2
3 Visual Studio Build Setup for Mono's Managed Code
4 =================================================
5
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
10 settings.
11
12 This requires a couple of steps: 
13
14         * Extract the order, compiler and compilation flags for all
15           managed code in Mono on Linux by using the existing Makefile
16           system.
17
18         * Generate csproj files from the previous step
19
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.
23
24 * Extracting the Compilation Metadata
25
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
29         is extracted.
30
31         The extraction is done like this, from the toplevel Mono
32         directory run:
33
34                   make update-csproj
35
36         With this input, it is possible to generate an XML file, to do
37         this do:
38
39                   make package-inputs
40
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.
44
45 * Generate .csproj and .sln files
46
47         Run the genproj.exe executable in this directory.
48
49                 cd msvc/scripts/
50                 /cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe genproj.csproj
51                 ./genproj.exe
52                 
53         One output of genproj is the solutions for the successive profiles, 
54         from net_2_0.sln to from net_4.5.sln 
55
56         The command
57                 ./genproj.exe -h 
58         lists a couple of options, notably to limit the scope of 
59         the output solutions for each profiles to System*.dll assemblies 
60         and dependencies.
61
62 * Compiling from Visual Studio
63
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 
69         some projects
70
71 * KNOWN ISSUES
72
73         * Many assemblies still fail to compile, due to missing project 
74         references output by genproj, or other issues yet to determine
75         
76         * The first build of a solution may have a large number of 
77         failing compilations, more than subsequent solution Builds
78         
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)