Skip to content

MicrosoftIntune test fails on .NET 9 #8548

Description

@jonathanpeppers

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 MicrosoftIntune test fails in both Debug and Release mode with:

/Users/runner/.nuget/packages/microsoft.intune.maui.essentials.android/10.0.0-beta2/build/netstandard2.0/Microsoft.Intune.Maui.Essentials.android.targets(208,9): /Users/runner/work/1/s/bin/Release/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.android-x64/9.0.0-alpha.1.23577.7/runtimes/android-x64/native/libSystem.Security.Cryptography.Native.Android.jar doesn't contain /Users/runner/.nuget/packages/ and the mamified library won't be placed in the correct intune directory. This is not expected. [/Users/runner/work/1/a/TestRelease/11-30_21.20.10/temp/MicrosoftIntuneFalse/UnnamedProject.csproj]

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

Activity

  1. added this to the .NET 9 milestone on Nov 30, 2023
  2. added
    bugComponent does not function as intended.
    and removed
    needs-triageIssues that need to be assigned.
    on Nov 30, 2023
  3. added a commit that references this issue on Dec 4, 2023
  4. jonpryor commented on Aug 6, 2024

    @jonpryor
    Contributor

    But wait, it's worse now: dotnet new android project with $(TargetFramework)=net9.0-android and 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 to false:

    dotnet build -v:diag -p:IntuneValidateAndroidBuild=false

    which 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.

  5. jonathanpeppers commented on Aug 6, 2024

    @jonathanpeppers
    MemberAuthor

    @meghandaly is .NET 9 support coming soon for Microsoft.Intune.Maui.Essentials.android?

  6. modified the milestones: .NET 9, .NET 10 on Nov 20, 2024
  7. added theissue type on Apr 3, 2025
  8. alpayclsr1 commented on Jun 19, 2025

    @alpayclsr1

    Is there any update on this? @meghandaly @jonathanpeppers

  9. eeadie commented on Jun 19, 2025

    @eeadie

    Any update on an expected release with support for .NET 9? Not long until .NET 10 will be out! @jonathanpeppers

  10. jonathanpeppers commented on Jun 19, 2025

    @jonathanpeppers
    MemberAuthor

    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.

  11. longnx1986 commented on Jul 15, 2025

    @longnx1986

    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?

  12. eeadie commented on Jul 15, 2025

    @eeadie

    @jfversluis are you able to provide any help with this?

  13. jfversluis commented on Jul 15, 2025

    @jfversluis
    Member

    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!

  14. jonathanpeppers commented on Jul 15, 2025

    @jonathanpeppers
    MemberAuthor

    To be clear, the fixes are in the Microsoft.Intune.Maui.Essentials.android NuGet package.

    I'm not sure where the source code for it even lives? It must be a private repository somewhere.

  15. alpayclsr1 commented on Aug 4, 2025

    @alpayclsr1

    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.

  16. jonathanpeppers commented on Aug 4, 2025

    @jonathanpeppers
    MemberAuthor

    @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.

  17. alpayclsr1 commented on Aug 12, 2025

    @alpayclsr1

    Thanks for the info, @jonathanpeppers . I’ll try target API 35 in the AndroidManifest.xml on .NET 8

  18. Quaybe commented on Sep 3, 2025

    @Quaybe

    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)

  19. eeadie commented on Sep 15, 2025

    @eeadie

    Any update on this?

  20. leoslima1 commented on Sep 17, 2025

    @leoslima1

    @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)

  21. jonathanpeppers commented on Nov 17, 2025

    @jonathanpeppers
    MemberAuthor

    The new version of the Intune package was released for .NET 9, if someone here was waiting for that:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.bugComponent does not function as intended.

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions