Repository navigation
MicrosoftIntune test fails on .NET 9 #8548
Description
Activity
- addedArea: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.needs-triageIssues that need to be assigned.Issues that need to be assigned.
on Nov 30, 2023 - addedbugComponent does not function as intended.Component does not function as intended.and removedneeds-triageIssues that need to be assigned.Issues that need to be assigned.
on Nov 30, 2023 But wait, it's worse now:
dotnet new androidproject with$(TargetFramework)=net9.0-androidand the following additional NuGet packages:<ItemGroup> <PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.6.1.6" /> <PackageReference Include="Microsoft.Intune.Maui.Essentials.android" Version="10.0.0" /> </ItemGroup>
Microsoft.Intune.Maui.Essentials.android v10.0 is the current latest version of the package.
Build, and it immediately fails to build:
$HOME/.nuget/packages/microsoft.intune.maui.essentials.android/10.0.0/build/netstandard2.0/Microsoft.Intune.Maui.Essentials.android.targets(159,9): error :
Intune currently supports a maximum Xamarin.Android SDK major version of 34. Your major version is 35. Please downgrade your app's target framework.This check can be disabled by setting the
$(IntuneValidateAndroidBuild)MSBuild property tofalse:dotnet build -v:diag -p:IntuneValidateAndroidBuild=falsewhich then fails with the originally reported error:
$HOME.nuget/packages/microsoft.intune.maui.essentials.android/10.0.0/build/netstandard2.0/Microsoft.Intune.Maui.Essentials.android.targets(208,9): error :
…/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.android-arm/9.0.0-rc.1.24380.7/runtimes/android-arm/native/libSystem.Security.Cryptography.Native.Android.jar
doesn't contain $HOME/.nuget/packages/ and the mamified library won't be placed in the correct intune directory.
This is not expected.@meghandaly is .NET 9 support coming soon for Microsoft.Intune.Maui.Essentials.android?
Is there any update on this? @meghandaly @jonathanpeppers
Any update on an expected release with support for .NET 9? Not long until .NET 10 will be out! @jonathanpeppers
I'm not really sure who to ask about this, maybe file a ticket here?
All I did here was write a test for their NuGet package, but they didn't add .NET 9 support as far as I can tell.
We have the same issue. The Microsoft Intune works on .NET 8 Android, but we have a lot of issues regarding performance with some controls in my app. And some performance issues have been fixed on .NET 9.
What time frame MAUI of Microsoft develop team have new version MAM Intune on .NET 9?@jfversluis are you able to provide any help with this?
Unfortunately not and I'm currently having some time off. I know we started conversations with the Intune team before I left. Hopefully that will get us somewhere!
Reacted by Euan Eadie and Alpay ÇalışırReacted by Quaybe and Leonardo LimaTo be clear, the fixes are in the
Microsoft.Intune.Maui.Essentials.androidNuGet package.I'm not sure where the source code for it even lives? It must be a private repository somewhere.
Unfortunately, downgrading to .NET 8 is no longer an option, as Google Play will require all app updates to target API level 35 starting August 31, 2025. Without API 35 support, we will not be able to publish any updates, which is a critical blocker for our release and long-term support.
Reacted by Euan Eadie and Quaybe@alpayclsr1 no you can target API 35 in .NET 8 by using
AndroidManifest.xml:<uses-sdk android:targetSdkVersion="35" />
This will trigger a build warning, and you'd just ignore it.
Ideally, you would upgrade to .NET 9, though.
Thanks for the info, @jonathanpeppers . I’ll try target API 35 in the AndroidManifest.xml on .NET 8
Are you kidding me? .NET 9 has been out for essentially a year now and .NET 10 is right around the corner. Intune is a Microsoft product. MAUI is a Microsoft product. HOW is this not supported! How frustrating to work on getting this all implemented only to find that I can't even implement MAM policies on the Android app with .NET 9 (which again, has been out almost a year in release build)
Any update on this?
@jfversluis do you have any news from MS Intune team?
We're getting to Oct 31st, when API 35 will be required on PlayStore, that's a huge blocker for apps that uses Intune.
I already posted an issue on their repo, but no response (microsoftconnect/ms-intune-app-sdk-android#301)Reacted by Euan Eadie, Quaybe, AndriiDron, iris-georgej and bronteqThe new version of the Intune package was released for .NET 9, if someone here was waiting for that:
Reacted by Euan Eadie
Android application type
.NET Android (net7.0-android, net8.0-android, etc.)
Affected platform version
.NET 9
Description
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=8749461&view=ms.vss-test-web.build-test-results-tab&runId=89641486&resultId=100000&paneView=attachments
Context: #8366
The
MicrosoftIntunetest fails in both Debug and Release mode with:Steps to Reproduce
Run the Intune test on .NET 9.
Did you find any workaround?
Will ignore this test for now.
Relevant log output
Intune.zip