README 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. README Last updated: 2013-01-09
  2. Visual Studio Build Setup for Mono's Managed Code
  3. =================================================
  4. The scripts in this directory are used to create the various .csproj
  5. for each one of the modules in Mono. To avoid accidentally making
  6. changes on the Makefile system that is not reflected on the csproj
  7. system, the .csproj files are generated from the actual Makefile
  8. settings.
  9. This requires a couple of steps:
  10. * Extract the order, compiler and compilation flags for all
  11. managed code in Mono on Linux by using the existing Makefile
  12. system.
  13. * Generate csproj files from the previous step
  14. The idea is to ensure that we do not miss any compilation flag,
  15. define, resource, reference, icon or any other element that might be
  16. necessary to build the Mono class libraries.
  17. * Extracting the Compilation Metadata
  18. The first step is to extract the compilation metadata from the
  19. existing Makefiles. This is done in stages, first a fully
  20. working Mono compilation setup is required, and second the data
  21. is extracted.
  22. The extraction is done like this, from the toplevel Mono
  23. directory run:
  24. make update-csproj
  25. With this input, it is possible to generate an XML file, to do
  26. this do:
  27. make package-inputs
  28. This will generate order.xml, this contains the ordered list in
  29. which directories must be compiled as well as the command line
  30. options used to build it.
  31. * Generate .csproj and .sln files
  32. Run the genproj.exe executable in this directory.
  33. On Windows:
  34. cd msvc/scripts/
  35. /cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe genproj.csproj
  36. ./genproj.exe
  37. On Mac:
  38. cd msvc/scripts/
  39. make genproj.exe
  40. mono genproj.exe
  41. One output of genproj is the solutions for the successive profiles,
  42. like net_4_x.sln.
  43. The command
  44. ./genproj.exe -h
  45. lists a couple of options, notably to limit the scope of
  46. the output solutions for each profiles to System*.dll assemblies
  47. and dependencies.
  48. * Compiling from Visual Studio
  49. Before you try to compile from Visual Studio, you are *strongly*
  50. advised to set the maximum number of parallel project builds
  51. to 1 (Tools -> Options -> Projects and Solutions -> Build and Run)
  52. Due to the iterative building process for some of Mono's
  53. assemblies, there can be clashes writing to /obj/Debug for
  54. some projects
  55. * KNOWN ISSUES
  56. * We are currently not running "sn" to sign the assemblies
  57. * We do not have an "install" target, perhaps we should generate
  58. this based on something similar to the update-csproj setup
  59. * Audit: every Makefile for "local" changes, as those are not
  60. visible to this tool.
  61. * OLD KNOWN ISSUES
  62. * Many assemblies still fail to compile, due to missing project
  63. references output by genproj, or other issues yet to determine
  64. * The first build of a solution may have a large number of
  65. failing compilations, more than subsequent solution Builds
  66. * The .NET 2.0 profile assemblies end up targetting the
  67. v4.0 runtime, even when requesting 2.0 in the csproj file
  68. (http://social.msdn.microsoft.com/Forums/en-US/msbuild/
  69. thread/6c9cd0e1-7fb8-480a-b006-f034b5926e03)