Bug 17852 - [Already fixed in 1.12] Linked resources cause Internal Server Error, "Source file ... does not exist"
Summary: [Already fixed in 1.12] Linked resources cause Internal Server Error, "Source...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.10.x
Hardware: PC Mac OS
: High critical
Target Milestone: 1.12 (Merge)
Assignee: Adrian Alonso
URL:
: 18373 18843 ()
Depends on:
Blocks:
 
Reported: 2014-02-18 13:50 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2014-06-09 12:10 UTC (History)
13 users (show)

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


Attachments
Test case (30.58 KB, application/zip)
2014-02-18 13:50 UTC, Brendan Zagaeski (Xamarin Team, assistant)
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 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 FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2014-02-18 13:50:09 UTC
Created attachment 6082 [details]
Test case

## Steps to reproduce

Attempt to build and run the attached test project.



## Result

### Message from the Build output in Visual Studio

Exception System.Net.WebException: The remote server returned an error: (500) Internal Server Error.


### Message in ~/Library/Logs/Xamarin/MonoTouchVS/TestApp_71f360e9-d32c-4e39-8edb-55974c1985ad.log

> [18-Feb-2014 13:35:49] Error: Tool MonoTouch.Tools.Tools.ContentCopier failed to run
> [18-Feb-2014 13:35:49] Exception: Exception type: System.InvalidOperationException
> Source file '/Users/username/Library/Caches/Xamarin/mtbs/builds/TestApp/71f360e9-d32c-4e39-8edb-55974c1985ad/bundle/default-test.png' does not exist



## Regression status

### Works on
Xamarin.iOS 1.8.365
Xamarin.iOS 1.12.216

### Fails on
Xamarin.iOS 1.10.39


This project builds and runs successfully on XamarinVS.iOS 1.8 and 1.12. Clicking the button in the running app will display the image.

Versions 1.8, 1.10, and 1.12 copy `default-test.png` into the following folder in the `mtbs` build cache:
> bundle/TestApp.app/Resources/default-test.png

Versions 1.8 and 1.12 also copy it to:
> output/Debug/iPhone/TestApp.app/default-test.png
Comment 1 PJ 2014-02-18 14:15:11 UTC
Brendan says this is already fixed in 1.12, let's be sure to verify.
Comment 2 Tajinder Singh 2014-03-24 10:04:20 UTC
I have checked this issue with the following builds:

VS 2012/2013
XVS 1.12.247

Now we are able to build and deploy "Testapp" successfully.Hence verifying this issue.
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2014-04-11 14:11:09 UTC
Just a little additional information for any users who might come across this while waiting for version 1.12: if you pre-copy the missing resources to the build cache directory, the build will succeed. So for the attached test case, you can run the following commands on the build host before building from VS:

> mkdir -p ~/Library/Caches/Xamarin/mtbs/builds/TestApp/71f360e9-d32c-4e39-8edb-55974c1985ad/bundle/

> cp default-test.png ~/Library/Caches/Xamarin/mtbs/builds/TestApp/71f360e9-d32c-4e39-8edb-55974c1985ad/bundle/
Comment 4 Nate Cook 2014-04-24 19:18:13 UTC
Just ran into this problem again, upgraded to 1.12 and now it works. Thanks
Comment 5 Tajinder Singh 2014-05-02 06:09:33 UTC
*** Bug 18843 has been marked as a duplicate of this bug. ***
Comment 6 Neil Pepper 2014-05-08 07:27:03 UTC
Hi 

This seemed to fix this problem for PNG's or files set to bundle resource, but linked xib's that need to be set to interface definition to be loaded in app are not copied across even when i use the alpha channel, so it still generates 

Server returned an error. The remote server returned an error: (500) Internal Server Error.
Server error code: 500

when trying to deploy because of missing xibs in the logs, but if i change them to bundle resource, they deploy ok but then cant be opening in the app.

thanks
Comment 7 dean.ellis 2014-06-03 08:16:43 UTC
Thanks for the bug report Neil. I've reopened the bug for you. It would be really helpful if you could provide a simple test case, it will help the developers track down the issue quicker :)
Comment 9 Adrian Alonso 2014-06-09 12:10:59 UTC
*** Bug 18373 has been marked as a duplicate of this bug. ***