Microsoft.Maui.Essentials packages

Qun Shen 60 Reputation points
2024-04-27T08:45:34.1866667+00:00

I have an razor class library and want to use Microsoft maui SecureStorage. In visual studio , NuGet interface, when select the latest Microsoft.Maui.Essentials packages, get the following errors:

Severity Code Description Project File Line Suppression State

Error NU1213 The package Microsoft.Maui.Essentials.Ref.android 7.0.101 has a package type DotnetPlatform that is incompatible with this project. BIWebRazorLib D:\MyData\CorePortal\BIWebRazorLib\BIWebRazorLib.csproj 1

Severity Code Description Project File Line Suppression State

Error NU1202 Package Microsoft.Maui.Essentials.Ref.android 7.0.101 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package Microsoft.Maui.Essentials.Ref.android 7.0.101 supports: net7.0-android30.0 (.NETCoreApp,Version=v7.0) BIWebRazorLib D:\MyData\CorePortal\BIWebRazorLib\BIWebRazorLib.csproj 1

Severity Code Description Project File Line Suppression State

Error Package 'Microsoft.Maui.Essentials.Ref.android 7.0.101' has a package type 'DotnetPlatform' that is not supported by project 'BIWebRazorLib'.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,904 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,592 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,577 questions
{count} votes

Accepted answer
  1. S.Sengupta 19,256 Reputation points MVP
    2024-04-29T01:13:41.1333333+00:00

    You are encountering errors because Microsoft.Maui.Essentials is not currently compatible with .NET 8.0 Razor class libraries.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.