Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UseLocalNotification is not defined if TFM is net7.0 #343

Closed
tranb3r opened this issue Dec 10, 2022 · 12 comments
Closed

UseLocalNotification is not defined if TFM is net7.0 #343

tranb3r opened this issue Dec 10, 2022 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@tranb3r
Copy link

tranb3r commented Dec 10, 2022

I'm referencing Plugin.LocalNotification in a library built only for net7.0 (no platform specific code).
Of course this library is then referenced in a Maui App (net7.0-android and net7.0-ios).

When building the lib, I've got an error, because UseLocalNotification is not defined for TFM net7.0.


Could you please fix this issue and make sure we can reference this package in a net7.0 lib and call the mauiAppBuilder initialisation from this lib ?

Thanks.

@tranb3r tranb3r added the bug Something isn't working label Dec 10, 2022
@thudugala
Copy link
Owner

Hey @tranb3r can you attach a sample project?

@tranb3r
Copy link
Author

tranb3r commented Dec 21, 2022

Here is a repro.

@thudugala
Copy link
Owner

@tranb3r Can you make it downloadable zip. Otherwise, I have to download the whole repo.

@thudugala
Copy link
Owner

@tranb3r also try referencing Plugin.LocalNotification in Maui App

@thudugala thudugala added Configuration Issue Configuration Issue and removed bug Something isn't working labels Jan 14, 2023
@tranb3r
Copy link
Author

tranb3r commented Jan 14, 2023

Hi @thudugala
I think there is a misunderstanding. The classLibrary in my repro is not building. Adding the plugin to the app project won't help it.
The issue described here is of your plugin not supporting net7.0 TFM, which prevents using/initializing your plugin in a classLibrary.
Here is the MauiAppLocalNotificationLib.zip if you want to test it.

@thudugala thudugala reopened this Jan 14, 2023
@thudugala thudugala added bug Something isn't working and removed Configuration Issue Configuration Issue labels Jan 14, 2023
@thudugala
Copy link
Owner

@tranb3r Try version 10.1.2

@7702244
Copy link

7702244 commented Jan 14, 2023

After upgrading to this version, regular MAUI app gives exception:
[Plugin.LocalNotification] No platform plugin found. Did you install the nuget package in your app project as well?

@thudugala
Copy link
Owner

@7702244 Do you only have net7.0-android and net7.0-ios as TargetFrameworks?

@7702244
Copy link

7702244 commented Jan 14, 2023

I target net7.0-android net7.0-ios net7.0-maccatalyst

@thudugala
Copy link
Owner

thudugala commented Jan 14, 2023

@7702244
Copy link

7702244 commented Jan 14, 2023

Is there an option to just not activate the library for Mac, because I want to use the application for this platform?

@tranb3r
Copy link
Author

tranb3r commented Jan 16, 2023

@tranb3r Try version 10.1.2

It works. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants