Bug 29798 - Error building target ImplicitlyExpandDesignTimeFacades
Summary: Error building target ImplicitlyExpandDesignTimeFacades
Status: RESOLVED ANSWERED
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: 3.4.0
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-05-06 11:15 UTC by p.gloor
Modified: 2015-05-07 10:31 UTC (History)
2 users (show)

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


Attachments
Output of failed build with xbuild 12.0 / Mono 4.0.1 (183.10 KB, text/plain)
2015-05-06 11:15 UTC, p.gloor
Details
Example of a good output with xbuild / mono 2.10.8.1 (903.22 KB, text/plain)
2015-05-06 11:24 UTC, p.gloor
Details


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 on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description p.gloor 2015-05-06 11:15:37 UTC
Created attachment 11094 [details]
Output of failed build with xbuild 12.0 / Mono 4.0.1

I'm trying to build a project using XBuild Engine Version 12.0 with Mono Version 4.0.1.0 on Linux Debian Wheezy and get the following error:

Project "/home/devos/git-hub/opensim/OpenSim/Region/CoreModules/OpenSim.Region.CoreModules.csproj" (default target(s)):
      Target PrepareForBuild:
      Configuration: Debug Platform: AnyCPU
: error : Error building target ImplicitlyExpandDesignTimeFacades: startIndex + length cannot exceed length of string.
Parameter name: length
Done building project "/home/devos/git-hub/opensim/OpenSim/Region/CoreModules/OpenSim.Region.CoreModules.csproj".-- FAILED

The same project builds without any problems with XBuild Engine Version 2.10.8.1 and Mono Version 2.10.8.1 on Linux Debian Wheezy as well as with MSBuild with Microsoft.NET Framework64 v4.0.30319 (Visual Studio 2013 CE Update 4). 

I've seen the same issue already in the past with Mono 3.12 on Linux Debian Wheezy but had no time to take a closer look and simply compiled under Windows.

However, the project is an Open Source project where an increasing number of users can be expected who will move toward newer Mono releases, so I decided to take a closer look in hope to find a solution for the problem. 

If you have GIT you can reproduce the problem the following way: 
1) Clone the project: 
git clone https://github.com/opensim/opensim.git

2) Change into the project directory and prebuild the project
cd opensim
./runprebuild.sh

3) Run Xbuild
xbuild

Wait. Beside the error you will get a lot of warnings, but the warnings are all ok.
Comment 1 p.gloor 2015-05-06 11:24:06 UTC
Created attachment 11095 [details]
Example of a good output with xbuild / mono 2.10.8.1

Just to demonstrate that things work with Mono 2.10.8.1. It's exactly the same project, just built by another user on another machine but except Mono and it's dependencies both having the same Debian release and software environment.
Comment 2 p.gloor 2015-05-07 06:48:01 UTC
While I can reproduce the problem under various HW and VM conditions with Debian Wheezy I cannot reproduce it on an identical VM with Ubuntu 14.04.2 LTS.
Comment 3 p.gloor 2015-05-07 10:31:00 UTC
On a fresh minimal installiation of Debian Wheezy where no Mono has been installed before and Mono 4.0.1 is the first Mono install, the problem is not reproducable too. 

I'm not 100% sure but it seems that it is only reproducable if the standard mono package (Debian Mono 2.10.8.1-8+deb7u1) included in the Debian Wheezy distribution has been installed before. At least, this is what all systems, where I could reproduce the problem, had in common.