Cannot resolve type

1 Answer 2395 Views
Chart Installer and VS Extensions
Angus
Top achievements
Rank 1
Iron
Angus asked on 23 Sep 2022, 07:08 AM

Hi,

I'm having issues using Telerik MAUI controls in my project. (in this case the chart controls but it's also happened with others)

I am currently using 3.0 but I had the same issue with 2.3.

I've installed Telerik UI for MAUI and I've imported the Nuget into my project.

I'm trying to make a line graph so I copied the LineSeriesXaml example from the SDK app exactly into my project, but it is unable to resolve one of the types in the xaml (it resolves everything around it though) and so the build fails. 

"Cannot resolve type "http://schemas.telerik.com/2022/xaml/maui:telerik:CategoricalAxis".

I had a similar issue before with the RadRadialGauge that I never managed to solve.

I've tried creating a brand new MAUI app in case there was something wrong in my existing app and it still won't build. (i even

copied the actual files from the SDK examples app to make sure there were no typos and that the namespace was correct)

I then created an app using the Telerik MAUI template in VS and it DID work, but the only difference between those two projects was

the version in .csproj file. In the telerik template, the version was set to * . In my new app it was 3.0.

When I updated my one to *, it still didn't work, so I have no idea what else could be causing the problem.

Both apps are brand new projects, there are no changes other than adding the example from SDK app.

Both are using the files from your SDK project so there's no difference there.

Both apps reference 3.0.

Any idea what's going on?

1 Answer, 1 is accepted

Sort by
0
Accepted
Didi
Telerik team
answered on 23 Sep 2022, 07:20 AM

Hello Angus,

There is a logged issue in the official .NET MAUI GitHub repo for the schemas. The error could be because there is no x:Name set or the compiler doesn't recognize some of the namespaces. Here is a link to the issue: https://github.com/dotnet/maui/issues/7503 This issue is not related to the Telerik .NET MAUI controls it is an issue in the .NET MAUI framework. 

Workaround:

Add x:Name to the controls in the XAML definition.

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Angus
Top achievements
Rank 1
Iron
commented on 23 Sep 2022, 08:00 AM

Thanks Didi, that did the trick. 

It's strange though, because the SDK examples app and the new app from Telerik MAUI project template don't use x:Name and they build just fine.

Didi
Telerik team
commented on 23 Sep 2022, 08:52 AM

We are using x:Name in some of the examples in the SDKBrowse app. 

I saw other has the following XAML comipation above the page:

namespace SDKBrowserMaui.Examples.TimeSpanPickerControl.StylingCategory.DropDownStylingExample
{
	[XamlCompilation(XamlCompilationOptions.Compile)]
	public partial class DropDownStyling : RadContentView
	{
		public DropDownStyling()
		{
			InitializeComponent();
		}
	}
}
You can use also this as a replacement for the x:Name

Tags
Chart Installer and VS Extensions
Asked by
Angus
Top achievements
Rank 1
Iron
Answers by
Didi
Telerik team
Share this question
or