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.
=== Overview ===
Error in new template for Forms Content Page Xaml file. Codebehind is creating an instance of class ContentPageViewModel that doesn't exist.
=== Steps to replicate ===
1. Create a new Forms project.
2. Right-click project and add Forms Content Page Xaml file.
=== Expected result ===
Sample should create instance of class named after the file created.
BindingContext = new [NameOfContentPage]ViewModel();
=== Actual result ===
Sample creates instance of ContentPageViewModel resulting in red squigglies and the error:
"The type of namespace name 'ContentPageViewModel' could not be found (are you missing a using directive or an assembly reference?)"
BindingContext = new ContentPageViewModel();
Ignore last message - too many Bugzilla tabs open :(
*** Bug 53104 has been marked as a duplicate of this bug. ***
Good luck with the quick fix, cool click counter template. Just watching the Xamarin Show 17: ReactiveUI, James looks A LITTLE TIRED hahaha
Created attachment 21549 [details]
Bug is retested and verified in the below test environment:
• Microsoft Visual Studio Enterprise 2017 d15rel Version 15.1 (26403.0) d15rel d15rel
• Microsoft .NET Framework Version 4.6.01586
• Xamarin 220.127.116.119 (265d40a)
• Xamarin.Android SDK 18.104.22.168 (40f69c3)
• Xamarin.iOS and Xamarin.Mac SDK 10.10.0.4 (9245c1c)
Actual Result- There is no red squiggles in added Content Page.cs file.Hence marking bug as verified. Please refer the attached gist and screencast link for bug verification reference
Screen Cast Link-https://www.screencast.com/t/Q0ksJ52IvgV0
Still not fixed. I get it after doing this:
1. In Portable project Add new item...
2. Choose "Forms Content Page Xaml"
3. Click "Add"
4. Open .cs-file and "BindingContext = new ContentPageViewModel();" is still there.
This will be fixed in the next stable release of Visual Studio. Thanks so much for the report. :)