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.
To recreate you can use the Hello World template in Visual Studio. Run the application on the simulator. Set the OutputPath to an absolute folder - I used a different drive since Visual Studio will convert to a relative path. (I came across this because of some internal MSBuild scripts that set the output path for me.) Clear the output and intermediate output folders manually. Run the application on the simulator again. It will appear to succeed. However, if you review the build_package\assemblies folder in the intermediate output it will be empty. If you clear the mtbs cache on the mac, then you will get the error MT0007:The root assembly '/Users/username/Library/Caches/Xamarin/mtbs/builds/OutDirBugTest/e7a76f27-ec1a-464f-9f25-603d5ad640ca/assemblies/OutDirBugTest.exe' does not exist [E:\Sandbox\OutDirBugTest\OutDirBugTest\OutDirBugTest.csproj].
Without clearing the cache this can show up as the application failing to update on the simulator and debug breakpoints getting out of sync with the simulator (i.e. source not found errors) and other mayhem.
It appears this can be fixed by dropping "$(ProjectDir)" from in front of "$(OutDir)" where it appears in Xamarin.MonoTouch.Common.targets. I don't know if this would impact the MangleLibraryResources task which uses OutDir and and ProjectDir internally. In my primitive testing, eliminating every instance of ProjectDir prefixing OutDir fixed the problem. Although it is the common case, I don't believe it should be assumed that OutDir will be relative.
In my case I was also able to workaround this problem by manually setting the OutputPath in the csproj file to use a relative path that matches the absolute path that would otherwise be used by my internal MSBuild script.
Fixed in our repositories, the fix will be part of the 1.8 release.
I have checked this issue with following builds:
iOS for VS 1.10.19
When I run project again on Simulator after changing OutputPath and clearing intermediate output folders manually, I am not getting build_package\assemblies folder in the intermediate output as empty. also after clearing mac server log, it gets cleared, no error appears.
Changing the status to Verified.