[MonoDevelop] Possible bug in generic MonoDevelop project(mdproj) build.

Thiago Padilha tpadilha84 at gmail.com
Fri Jun 11 19:12:33 EDT 2010


  I have a generic md project that contains a mix of C and C ++ code,
so I created a Makefile to handle everything and in the Project
Options->General->Custom Commands I replaced the build step by the
make command. But I didnt knew about MSBuild/XBuild(which to my joy,
looks a lot like nant) customization power until today so I decided to
migrate from Make to XBuild which not only is integrated with
monodevelop, but I can easily customize with C# code. However after
examining the mdproj file I noticed that even though the 'Project'
element has DefaultTargets="Build" attribute, there are no targets(and
no imports to other files) and when I try to build from command line
XBuild complains it didnt find any target named 'Build'. When I build
the project from monodevelop it does not report any errors.
  I don't know if it is a bug, but I have two guesses as to why this
is happening

  - MonoDevelop does something other than callind xbuild on the mdproj.
  - MonoDevelop appends a file that contains build target to the
mdproj , calling any custom commands if present.

  To test what was happening, I inserted the following on the mdproj:

   <Target Name="Build">
  	<Message Text="Testing XBUILD!"/>
   </Target>

  XBuild displays the message when invoked manually, but nothing was
shown in the MD's build output window. I could easily get arround this
issue  by changing my custom build command from 'make' to 'xbuild',
but I think it would be more elegant if MD invoked xbuild
automatically.

   I have tree suggestions for the MD team :so it automatically adds
an empty 'Build Target' on the mdproj file and invokes xbuild for it.
Then any user customized build steps would be placed in the
  - Automatically call xbuild on generic projects
  - Add an empty 'Build target' on the mdproj file(so Xbuild doesn't
complain about missing targets)
  - Add an option to the context menu for project/solution items to
open it with the XML editor

  The third option is only a helper, so the user doesn't have to
trough the File-Open route to edit the project file. An issue I
noticed is that theres no syntax coloring when opening  csproj files
with the source code editor.(Can this be customized?).


More information about the Monodevelop-list mailing list