Open sedoLevi609 opened 1 week ago
For some reason I'm getting "Position 14:3. DataTemplateExtension: Could not locate type for local:MainPage". The only difference is that I've referenced NASServerLibrary and CommonNASLibrary as projects? So there might be another issue here. I have ran tests tests and dependency injection appears to work as expected. Though I think you should add App and AppShell to DI and inject them where needed.
@radimitrov "Position 14:3. DataTemplateExtension: Could not locate type for local:MainPage" doesn't matters if you export to APK(it shows for some reason but shouldn't since everything is correct ,I exported to APK and that's where the strange things happen as you can see in the attached video.
https://github.com/radimitrov/CSharpShellApp/assets/51722783/d182789c-9e27-4056-945f-3555d0944faf
Hmm, I'm getting a better result with APK. Though I did tinker with the project a tiny bit. Yours should still show something. It looks like in your case the assembly isn't included?bI will investigate next week.
Registering and injecting AppShell and App as you did not solves my issue. I will try reference the libraries as projects.
@radimitrov How can I reference the 2 libraries as projects from other solution as you did?
@sedoLevi609 From left drawer panel solution -> Add existing project -> Pick the .csproj(s)
References menu -> Add project reference
Now I see the view too,seems like it solved the issue
@radimitrov Nas.zip it seems Refit not working with maui in your app(when I launch the maui app i see the c# shell maui plugin app view,not my view). Example is the above uploaded zip(first you need to export the dlls from CommonNASLibrary and NASServerLibrary as dll(from NASFileSyncher(maui app) you need to reference both CommonNASLibrary(also tried in both as dll) and NASServerLibrary as dll)(contains libraries for maui app,both NASServerLibrary and NASFileSyncher use CommonNASLibrary,which is inside NASServerLibrary solution,which is only used by NASFileSyncher which is the maui app). Please help me to make it to work!(In the maui app if you comments out .AddNASServer() when injecting services and also comments out INasServer parameter from MainPageViewModel constructor then it works,but theres no rest API then)