I've been developing a windows phone app in a team since June. Everything worked fine with all the syncs until today. I synced the project and vs started giving me the errors
I didn't change anything, it worked fine yesterday. Classes names on XAML match the names in code-behind.
I've tried exited all vs instances but the problems are still there.
For me, the problem was following:
Project structure
Project\Views\Page1.xaml
Project\Views\Page1.xaml.cs
The error in Page1.xaml.cs
on abovementioned page constructor:
public sealed partial class Page1 : Page
{
public Page1()
{
this.InitializeComponent();
}
}
Xaml file
<Page
x:Class="App1.Page1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
should be x:Class="App1.Views.Page1"
so just typo in the class name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With