[MonoDevelop] Wild Cards in MS Build Project Files

Charles Mason charlie.mas at gmail.com
Mon Dec 29 09:08:26 EST 2008


Hi All,

I have been trying to get my project to work correctly. I won't go
into details but basically there are many directories with source
files which are pulled in via source control (git & Anrdoid's Repo
tool). So I don't want to keep manually adding every new source file
as it appears in these folders to the project.

The project files are based on MSBuild which is quite flexible in
terms of using wild cards in source paths however Monodevelop just
reports a missing file called *.cs in the file list. For more info:
http://msdn.microsoft.com/en-us/library/ms171454(VS.80).aspx

I have had a first stab at implementing this in Mono Develop and I now
have it loading project files that contain nodes like this.

  <ItemGroup>

    <Compile Include="..\shared\BlockStore\*.cs" />

    <Compile Include="..\shared\Networking\**\*.cs" />
    <Compile Include="source\ClientNode\ClientConnection.cs" />

    <Compile Include="source\ClientNode\ClientEngine.cs" />

    <Compile Include="source\ClientNode\ClientEngineImpl.cs" />

  </ItemGroup>

At the moment when it goes to save the project file it removes the
wild cards and replaces them with the files currently in the file list
so clearly that's something I need to look into.

Also much of the file list context menu items don't work or needs to
be modified, e.g. to remove a file from the project. Also logically
the GUI eventually should provide a away for people to add an edit
these wildcards.

Does anyone else think this is a useful feature? It is something that
is supported by MSBuild although I remember it used to confuse visual
studio a bit too, although it did attempt to support it (that was
VS2005 I think not tried it in the latest version).

Also I noticed that all files added out side of the project directory
are added to a tree item called External Files and are not shown in
their directory hierarchy is this an intended feature? It does makes
it hard to find files if there are quite a few files. Wouldn't it be
better to show them in the same hierarchy that's used in the project
file. Eg. External Files -> BlockStore -> example.cs

Charlie M


More information about the Monodevelop-list mailing list