-
If I add the csproj From XamarinCommunityToolkit to my project (the XCT repo is in a git submodule) I cannot use the references : I must use : Otherwise I have the error XFC0000 Cannot resolve type "xct:........ |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
@auriou are you using VSMac? |
Beta Was this translation helpful? Give feedback.
-
I recently encountered a similar problem that may be the same thing. I tried adding a custom xmlns for the controls, effects, markup extension etc. in my app and also got the "XFC0000 Cannot resolve type..." error (although intellisense seemed to work fine if I typed my prefix in XAML). Does a custom xmlns just not work when trying to consume it from the assembly in which it is declared? Although I guess in the case of referencing the source of XCT it would still be in a different assembly. @pictos I was using VSMac. |
Beta Was this translation helpful? Give feedback.
-
In the msdn doc, they say to add a call to the library initializer. using Xamarin.Forms;
using MyCompany.Controls;
namespace CustomNamespaceSchemaDemo
{
public partial class MainPage : ContentPage
{
public MainPage()
{
Controls.Init();
InitializeComponent();
}
}
} I have found several references to this problem on the internet, and the solution described is to call the initializers of the controls in the app.xaml.cs roubachof/Sharpnado.Shadows#24 does XCT have an initializer method ? |
Beta Was this translation helpful? Give feedback.
-
Here's how to reproduce the error for this to work, you have to add a static class which serves just as an initializer, and apply it just after the initialization of your application's initializer // into Xamarin.CommunityToolkit project
namespace Xamarin.CommunityToolkit
{
public static class Initializer
{
public static void Init()
{
}
}
}
// into your project
namespace MyApp
{
public partial class App : Application
{
public App()
{
InitializeComponent();
Xamarin.CommunityToolkit.Initializer.Init();
}
}
} |
Beta Was this translation helpful? Give feedback.
Here's how to reproduce the error
for this to work, you have to add a static class which serves just as an initializer, and apply it just after the initialization of your application's initializer