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.
Newly created Xamarin.Forms template projects fail to deploy to iOS unless you first change the build rules for the active solution platform.
Regression status: regression between XVS 3.8.150 and XVS 3.9.236.
The problem is introduced by the new feature in XamarinVS 3.9 that integrates the device list into the Run menu.
## Steps to reproduce
1. Create a new "Visual C# -> Mobile Apps -> Blank App (Xamarin.Forms Portable)" project in Visual Studio.
2. Right-click the iOS project in the Solution Explorer and select "Set as StartUp Project".
3. Select a device or simulator from the green arrow Run drop-down menu.
4. Click the green arrow Run button.
The build fails because:
a. The FormsApp1 PCL project is not set to build when the active platform of the solution is set to "iPhone" or "iPhoneSimulator" (under "Build -> Configuration Manager").
b. The active platform of the solution at step 4 is always set to either "iPhone" or "iPhoneSimulator" depending on the device chosen in step 3.
This causes the following error:
> Metadata file 'C:\Users\Windows User\Desktop\FormsApp1\FormsApp1\FormsApp1\bin\Debug\FormsApp1.dll' could not be found
## Old "good" results on Xamarin 3.8.150
It is not possible to select an iOS Simulator as the deployment target at step 3. You must select an iOS device because that is the active platform for the iOS project when the active platform of the solution is "Mixed Platforms".
The build succeeds and deploys to the iOS device because the active platform of the solution at step 4 is "Mixed Platforms" rather than "iPhone" or "iPhoneSimulator".
## Possible fixes
- Perhaps the Xamarin.Forms template project could be modified so that the FormsApp1 PCL project *is* set to build for the "iPhone" and "iPhoneSimulator" platforms.
- Maybe the XamarinVS extensions could select the "Mixed Platforms" platform by default rather than the "iPhone" or "iPhoneSimulator" platforms AND could change the active platform specifically for the _iOS project_ depending on the device selected at step 3 rather than the active platform for the _whole solution_.
## Version information
Xamarin 126.96.36.199 (d6a2cae)
Xamarin.Android 188.8.131.52 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Xamarin.iOS 184.108.40.206 (eb24bdcf5cba2c12b673a07e0a8cce368b9563b3)
I have checked this issue by following the steps mentioned in bug description and and getting the build error. Hence marking this as Confirmed.
build log: https://gist.github.com/saurabh360/4c320e04374395a1d88e
mtbserver log: https://gist.github.com/Mohit-Kheterpal/3771fcb8a6a4d3802a76
Created attachment 9282 [details]
VS ide logs
Verified this bug and getting the VS Team's attention to getting this issue
fixed in the next release.
As Brendan pointed out we have something planned for 3.10. This is, afaik, not a regression. The problem always existed. The problem is that iPhone projects have an iPhone/iPhoneSimulator platform and PCLs (obviously) don't. We have no way of forcing the configuration for build, we did try and the API is simply not exposed. The solution is to have iPhone build as Any CPU (same as the PCL), but it's a big change and requires a lot of effort (and coordination with XS).
To discuss a bit more, the "regression status" of this bug is admittedly a little weird. The thing that has changed compared to 3.8 is just the Unified Devices menu. To put it another way, if (hypothetically) the Unified Devices menu were removed from 3.9.1, that would "solve" the problem described in this bug. Disabling the part of the Unified Devices feature that changes the active solution platform would also be sufficient as a temporary fix until 3.10. In that case, users would again need to select the active solution by hand (as in XVS 3.8). On the other hand, disabling that part of the feature now might cause more confusion than help.
The problem is that the new Unified Devices menu changes the number of steps required for a brand new user to deploy a Xamarin.Forms template project. The "Metadata file ... could not be found" error is probably fairly well-known by veteran Visual Studio users, so there's a chance that most users who are starting with Xamarin in Visual Studio will be able to solve the problem on their own. But:
a. Based on my (entirely informal) observations, Xamarin.Forms seems to be a common first entry point for brand new Xamarin users. As a result, making the first-run experience as smooth as possible for Xamarin.Forms might be advisable. XVS 3.9 has a stumbling block for this first-run experience that did not exist in XVS 3.8.
b. There might be some veteran users of Xamarin and Visual Studio who will be tripped up by this if they start a new Xamarin.Forms project.
All of that said, so far I haven't seen any complaints about this problem on the forums or in Desk. So I'd say this issue can perhaps be de-prioritized, especially if it would help free up more time for proofreading the debugger hang fixes.
There is something planned for 3.10 anyway.
But also, this problem always existed. It's also present in 3.8, and earlier. It may be more obvious because of the devices menu, but it's a structural problem with the way we do iOS, and I've been hearing about it since I started working for Xamarin... so I do think deprioritization is a good idea.
I agree that this bug, while important, requires a structure change to the way we handle iOS and will require significant changes, due to the conversations that have taken place this bug will not be a candidate for the current service release and I'll add it to the backlog for future consideration.
This occurred with a newly created iOS Unified Universal app project as well.
3.10 was scratched and the only milestone tracked for what was the 3.10 release is VS2015-CTP6. Moving open 3.10 bugs to 3.11 for review.
Fixed in XMA@efcab9704a7c881b7fb5e4b5dd6db5c51ce40df8
I have checked this Issue with latest XMA builds. iOS application of portable forms template getting deployed on build host. I am not getting any error. This is the screencast for the same: http://www.screencast.com/t/7yTYWqNRq8y
Xamarin Log: https://gist.github.com/saurabh360/3f2191360a90b706b06e