Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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
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.
A customer has reported an issue when building using Visual Studio. The error disappears on when attempting a second build which leads us to think it could be a race condition.
The customer wrote:
' would like to report a new issue we are seeing: This happens when we define our own attributes for layout XMLs on a separate Monodroid class assembly and include that assembly into the application.
When we build in VS2012, the attributes we defined are not included and we get a build error. When we try to rebuild one more time, the issue goes away. It looks like a race condition.
Here are repro steps:
1. Create a new Android Application
2. Add a new Android class library project
3. Add Resource\values\[somename]xml. The contents: <?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="MVVMTargetMarkup"> <attr name="TestAttr" format="string"/> </declare-styleable> </resources>
4. Modify a layout XML file in the application project to something like this: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aaa="http://schemas.android.com/apk/res-auto" android:layout_width="fill_parent" android:layout_height="fill_parent" aaa:TestAttr="some textual data">
5. This causes the following error during build: ......\Resources\layout\Main.xml(2): error : No resource identifier found for attribute 'TestAttr' in package '....'
6. Rebuilding the whole solution couple of times fixes the issue, but it sometimes comes back...'
I guess it is IDE's responsibility to work with possibly concurrent invocations of build targets (`GenerateResourceDesigner` and optionally? `Build`).
It is fairly old report so it might not be the case anymore. Do we have any safe guard on this kind of issue? > VS team
As we've added several improvements to our build system and deploying/debugging mechanism since the bug was reported, I'm resolving it tentatively as Fixed.
That said, if you're still facing this issue with current bits, please feel free to reopen the bug.