Bug 6549 - Monodevelop doesn't support <Compile Include="@(FileList)" /> in csproj files
Summary: Monodevelop doesn't support <Compile Include="@(FileList)" /> in csproj files
Status: NEW
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: 3.0.x
Hardware: PC Windows
: Low enhancement
Target Milestone: ---
Assignee: Lluis Sanchez
Depends on:
Reported: 2012-08-15 20:48 UTC by aschaeffer
Modified: 2013-08-19 15:37 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

screenshot (4.31 KB, image/png)
2012-08-15 20:48 UTC, aschaeffer

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 6549 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description aschaeffer 2012-08-15 20:48:53 UTC
Created attachment 2358 [details]

monodevelop doesn't handle .csproj files that import/include external file lists.  It treats @FileList like a filename rather than a collection of files.  For example, a project of this structure:

<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="Game.Shared.targets" />
    <Compile Include="@(ExternalShareCompile)" />

where Game.Shared.targets is a second file of the form:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <ExternalShareCompile Include="..\..\..\File1.cs">
    <ExternalShareCompile Include="..\..\..\File2.cs">

fails to show or build any of the files listed in Game.Shared.targets. Instead, the string "@(ExternalShareCompile)" is shown in the solution window where the list of included files should be.
Comment 1 Mikayla Hutchinson [MSFT] 2012-08-19 01:03:15 UTC
This should build correctly if you enable "experimental MSBuild support" in MonoDevelop preferences and restart MD. However, this would break building some project types, including MonoTouch, MonoMac, and ASP.NET.

Unfortunately a full fix is likely to be extremely difficult. I've explained it in some detail here: https://mjhutchinson.com/journal/2012/08/19/state_msbuild_support_monodevelop