Merge pull request #5714 from alexischr/update_bockbuild
[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            On Windows:
50                 cd msvc/scripts/
51                 /cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe genproj.csproj
52                 ./genproj.exe
53
54            On Mac:
55                 cd msvc/scripts/
56                 make genproj.exe
57                 mono genproj.exe
58                 
59         One output of genproj is the solutions for the successive profiles, 
60         like net_4_x.sln.
61
62         The command
63                 ./genproj.exe -h 
64         lists a couple of options, notably to limit the scope of 
65         the output solutions for each profiles to System*.dll assemblies 
66         and dependencies.
67
68 * Compiling from Visual Studio
69
70         Before you try to compile from Visual Studio, you are *strongly* 
71         advised to set the maximum number of parallel project builds 
72         to 1 (Tools -> Options -> Projects and Solutions -> Build and Run)
73         Due to the iterative building process for some of Mono's 
74         assemblies, there can be clashes writing to /obj/Debug for 
75         some projects
76
77 * KNOWN ISSUES
78
79         * We are currently not running "sn" to sign the assemblies
80         
81         * We do not have an "install" target, perhaps we should generate
82         this based on something similar to the update-csproj setup
83
84         * Audit: every Makefile for "local" changes, as those are not
85         visible to this tool.
86
87 * OLD KNOWN ISSUES
88
89         * Many assemblies still fail to compile, due to missing project 
90         references output by genproj, or other issues yet to determine
91         
92         * The first build of a solution may have a large number of 
93         failing compilations, more than subsequent solution Builds
94         
95         * The .NET 2.0 profile assemblies end up targetting the 
96         v4.0 runtime, even when requesting 2.0 in the csproj file
97         (http://social.msdn.microsoft.com/Forums/en-US/msbuild/
98         thread/6c9cd0e1-7fb8-480a-b006-f034b5926e03)
99