Gerardo Martinez
Gerardo Martinez

Reputation: 165

Why I get This error? Can't Load Types From

I was in my project and suddenly, this error appeared:
Can't load types from xmlns http://schemas.microsoft.com/winfx/2006/ xaml/presentation TaskX.UWP C:\Users\M\source\repos\TaskX\TaskX\TaskX\New.xaml

This is my full code:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage

x:Class="TaskX.New"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:TaskX"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">

<StackLayout>
  <Label Text="Hello World"/>
</StackLayout>

</ContentPage>

Upvotes: 1

Views: 533

Answers (1)

TheGeneral
TheGeneral

Reputation: 81493

If you are renaming pages, you need to make sure the xaml class is pointing to your backing class

Xaml

<ContentPage
    x:Class="YourNameSpace.SomeAwesomeNamePage"

Code Behind

public partial class SomeAwesomeNamePage : ContentPage

Upvotes: 1

Related Questions