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.
Create a Forms project and bring up the previewer, for Android (I didn't try iOS).
Do whatever it takes to get the "The Android project needs to be rebuilt before preview can be created." error message to show up, with the Rebuild Project and Reload Document action links.
I'm not sure what triggers that message to appear, as it seems to not show up when I expect it to, but that's a separate issue. When I saw it appear last, the project was partially built but the build had errors.
Click on the Rebuild Project and Reload Document links in the message.
Result: Nothing seems to happen. There's no evidence any kind of build is triggered (nothing in Output window changes, etc). Whenever this message showed up for me, that's the behavior I see.
Expected: The action links should work.
Thanks so much for taking the time to submit this report! I’m unable to reproduce this issue using the latest Visual Studio 2017 Preview version 15.4. Please attach the following to help us reproduce this issue:
-Detailed reproduction steps
-Version information (Help → About Microsoft Visual Studio → Copy Info)
-Logs (Help → Xamarin → Zip Logs (last 7 days))
I'm on 15.4 preview 1.
Prashant - When you say you are unable to repro, I assume you couldn't actually get it into the state where the Rebuild Project / Reload Document dialog shows up?
Also, FYI, I'm a MS/Xamarin employee.
Created attachment 24459 [details]
I attached logs. But they don't seems to show anything when the commands are selected.
To repro, do this:
- File / New Project Xamarin Forms project (I used Master/Detail PCL)
- Double click on some of the XAML files. At first you may see another error message (separate bug, #59054), but the error with the Rebuild / Reload UI should come up after.
When you click `rebuild` do some new lines appear in the log containing this:
` ERROR: : The project was not built. HasSourceAssemblies False. HasLoadableAssemblies False`
That means we attempted to reload after compilation completed and the binaries were still missing.
If that line doesn't appear then either compilation failed or something else went wrong. If compilation failed you won't be able to launch the app either.
I checked the Xamarin log files again & nothing gets logged there when clicking build / reload. Nor does anything appear in the VS Build Output window. It seems like the links just are a no-op currently (on VS Windows).
VSDesignerCommand.CanExecute returns false for these commands. This is a bug on the XVS side as we are calling the APIs correctly, but XVS itself is claiming the actions are unsupported. Reassigning it there!
(Note: I tested using the latest master builds)
This code looks the same in master and 15-4 and this issue definitely meets the bar for backporting according to me. It's possible others will disagree, but we should prioritise this appropriately for a d15-4 inclusion until we hear otherwise! I'm hoping it's a simple fix :)
Specifically this line is returning false - https://github.com/xamarin/designer/blob/master/Xamarin.Designer.VisualStudio/src/VisualStudio.Designer/VsDesignerCommand.cs#L26
Fixed in version 22.214.171.1249 (master)
Author: Adrian Alonso
Commit: 9f88e5c5744fc75353ee45f99b986141167a586a (xamarin/XamarinVS)
*** Bug 59989 has been marked as a duplicate of this bug. ***