Bug 36656 - Referenced images of another project in a test project is build with a backslash
Summary: Referenced images of another project in a test project is build with a backslash
Status: VERIFIED DUPLICATE of bug 36407
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 4.0.0 (C6)
Hardware: Macintosh Windows
: Normal normal
Target Milestone: 4.0.1 (C6SR1)
Assignee: Enzo Heredia
Depends on:
Reported: 2015-12-06 16:31 UTC by Laurence Lafontaine
Modified: 2016-02-23 22:26 UTC (History)
8 users (show)

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

Sample Solution (35.21 KB, application/zip)
2015-12-06 16:31 UTC, Laurence Lafontaine
Zip Xamarin Logs (13.99 KB, application/zip)
2015-12-08 12:37 UTC, Udham Singh

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:

Description Laurence Lafontaine 2015-12-06 16:31:20 UTC
Created attachment 14135 [details]
Sample Solution

# Steps to reproduce
Unzip the attached solution and try to build the UnitTestApp1 project.

# Expected behavior
The test project should build and the referenced project's image should be in the */Images/CautionBanner.jpg

# Actual behavior
The test project doesn't build and in the Debug folder the image's name is "Images\CautionBanner.jpg"

# Supplemental info (logs, images, videos)
The error is "System.IO.FileNotFoundException: ~/Library/Caches/Xamarin/mtbs/builds/App1/a8627a4ae84aecf2f4a4c9c034d7255c/obj/iPhoneSimulator/Debug/Images/CautionBanner.jpg does not exist
File name: '~/Library/Caches/Xamarin/mtbs/builds/App1/a8627a4ae84aecf2f4a4c9c034d7255c/obj/iPhoneSimulator/Debug/Images/CautionBanner.jpg'
  at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) <0x19ff7f0 + 0x00333> in <filename unknown>:0 
  at Xamarin.MacDev.Tasks.SmartCopyTaskBase.CopyFile (System.String source, System.String target, System.String targetItemSpec) <0x38dea60 + 0x000c7> in <filename unknown>:0 
  at Xamarin.MacDev.Tasks.SmartCopyTaskBase.Execute () <0x38de348 + 0x00227> in <filename unknown>:0"

# Test environment (full version information)
Microsoft Visual Studio Professional 2015
Version 14.0.24720.00 Update 1
Microsoft .NET Framework
Version 4.6.01055
Installed Version: Professional
Xamarin (deffc90)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android (3efa14c)
Visual Studio plugin to enable development for Xamarin.Android.
Xamarin.iOS (3c0ec35)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 2 Alexandre Pepin 2015-12-21 16:23:28 UTC
Any update on this? We can't upgrade to Xamarin 4 without it.
When can we expect a fix or workaround?
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2016-02-23 22:26:56 UTC
## Verification status: verified fixed on Cycle 6 – Service Release 1

I tested the "Sample Solution" from Comment 0 using the current Stable versions in both the "Debug|iPhoneSimulator" and "Debug|iPhone" configurations. The build now completes without error, and the `CautionBanner.jpg` file is present at the correct `obj/iPhoneSimulator/Debug/Images/CautionBanner.jpg` location.

GOOD: XamarinVS   (dcea9c1) + Xamarin.iOS (962a050)
BAD:  XamarinVS (1390b70) + Xamarin.iOS  (7322991)
BAD:  XamarinVS (f860fe4) + Xamarin.iOS (3c0ec35)

*** This bug has been marked as a duplicate of bug 36407 ***