Closed MikeP0911 closed 1 year ago
To Reproduce Steps to reproduce the behavior:
1>C:\NugetPackages\microsoft.intune.maui.essentials.android\9.5.2-beta2\build\netstandard2.0\Microsoft.Intune.Maui.Essentials.android.targets(131,9): error : Intune integration requires .Net 7.0. Please upgrade your app's target framework version. 1>Done building project "MyMaui.csproj" -- FAILED.
Hi @MikeP0911, Microsoft.Intune.Maui.Essentials.android requires the MAUI app to have a target framework of .NET 7.0. Can you please confirm your MAUI app is targetting .NET 7?
@Archit-Pikle This is my csproj. Im not sure where im missing Below is the info.
.NET SDK: Version: 7.0.400 Commit: 73bf45718d
Runtime Environment: OS Name: Windows OS Version: 10.0.22621 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.400\
Host: Version: 7.0.10 Architecture: x64 Commit: a6dbb800a4
.NET SDKs installed: 3.1.426 [C:\Program Files\dotnet\sdk] 5.0.101 [C:\Program Files\dotnet\sdk] 5.0.104 [C:\Program Files\dotnet\sdk] 5.0.408 [C:\Program Files\dotnet\sdk] 5.0.416 [C:\Program Files\dotnet\sdk] 6.0.310 [C:\Program Files\dotnet\sdk] 7.0.400 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found: arm64 [C:\Program Files\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\arm64\InstallLocation] x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables: Not set
global.json file: Not found
Learn more: https://aka.ms/dotnet/info
Download .NET: https://aka.ms/dotnet/download
This is same like the problem mentioned below
https://github.com/msintuneappsdk/ms-intune-app-sdk-android/issues/174
Does it build if you replace “net7.0-android33.0” with “net7.0-android” in the target frameworks?
@Archit-Pikle
Error:
@Archit-Pikle Were you able to reproduce this issue in your side?
Hi @MikeP0911 , I was able to reproduce the issue. We'll be working on a fix and ship it in a future release.
In the meanwhile, can you instead add the following code and let me know if that resolves your issue?
This code should import the Microsoft.Intune.Maui.Essentials.android
package only for Android builds.
`
`
@Archit-Pikle I was able to successfully build if I could target for Android builds. Is there a way to download nuget packages only for the particular platform. If we install a nuget package from Nuget package manager it gets installed in all the platforms. Thank you.
@Archit-Pikle Im getting an error in MAM transformation of files. Please have a look. https://github.com/msintuneappsdk/ms-intune-app-sdk-android/issues/182
I this related due to the workaround.
Thanks
The fix should be available in our latest release 10.0.0-beta2.
With this release, you no longer need to specify the TargetPlatformIdentifier
while importing Microsoft.Intune.MAUI.Essentials.android
Intune Android App SDK for .NET MAUI Issue
Summary
Created a new MAUI project and installed the Microsoft.Intune.Maui.Essentials.android version 9.5.2 Beta. Immediately it throws
Intune integration requires .Net 7.0. Please upgrade your app's target framework version. MyMaui C:\NugetPackages\microsoft.intune.maui.essentials.android\9.5.2-beta2\build\netstandard2.0\Microsoft.Intune.Maui.Essentials.android.targets
Details
Microsoft.Intune.Maui.Essentials.android
Version: 9.5.2 BetaLogs
1>C:\NugetPackages\microsoft.intune.maui.essentials.android\9.5.2-beta2\build\netstandard2.0\Microsoft.Intune.Maui.Essentials.android.targets(131,9): error : Intune integration requires .Net 7.0. Please upgrade your app's target framework version. 1>Done building project "MyMaui.csproj" -- FAILED.
Microsoft.Intune.Maui.Essentials.android
package? Yesbin
andobj
output folders?YesMicrosoft.Intune.Maui.Essentials.android
NuGet package version? Yes