microsoftconnect/ms-intune-app-sdk-android

[.NET MAUI] Build error while installing MAM Intune SDK in MAUI solution

NiladriPadhy opened this issue · 7 comments

Intune Android App SDK for .NET MAUI Issue

Summary

After adding the nuget package to the MAUI project. The project is not building.

Details

  • Microsoft.Intune.Maui.Essentials.android 9.5.2-beta
  • VS Mac 2022 17.6.4 (build 472)
  • Android Target Version 13

Logs

For build issues, please include:
Users/niladri/.nuget/packages/microsoft.intune.maui.essentials.android/9.5.2-beta2/build/netstandard2.0/Microsoft.Intune.Maui.Essentials.android.targets(13,13): Error MSB4184: The expression "[MSBuild]::VersionLessThanOrEquals('', 33.0.26)" cannot be evaluated. Version string was not in a correct format. (MSB4184) (com.microsoft.rightsmanagement.mobile.viewer.android)

  • MSBuild Logs

  • NA

MSBuild Logs

  • NA

Company Portal Logs

  • NA

NuGet Dependencies

If your app includes third-party NuGet libraries, please list them here:

  • NA

Questions to Ask Before Submission

  1. Does the app build and launch without including the Microsoft.Intune.Maui.Essentials.android package? Yes
  2. Does the issue reproduce if you rebuild after deleting the bin and obj output folders? - Yes
  3. Have you checked the .NET MAUI repository for similar issues? If so, please follow the guidance there or add that information to this issue. - Yes
  4. Are you using the latest Microsoft.Intune.Maui.Essentials.android NuGet package version? - Yes

Hi @NiladriPadhy, is the build only failing on Mac?
Our current release doesn't support building on Mac and we will be adding support in a future release.
Please refer #174 for more information

Hi @NiladriPadhy, is the build only failing on Mac? Our current release doesn't support building on Mac and we will be adding support in a future release. Please refer #174 for more information

@Archit-Pikle Currently we have MAC system only. Will check in Windows. Thanks a lot for your response.

@Archit-Pikle Created a new MAUI Project and installed only MAM Intune getting same issue.
WhatsApp Image 2023-09-29 at 5 14 23 PM
WhatsApp Image 2023-09-29 at 5 13 41 PM

Hi @NiladriPadhy , this looks very similar to #176

Could you try adding Microsoft.Intune.Maui.Essentials.android package only for Android builds using the following code as a workaround?

<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'Android' "> <PackageReference Include="Microsoft.Intune.Maui.Essentials.android" Version="9.5.2-beta2"/> </ItemGroup>

Building on a Mac is supported in version 9.7.1-beta which should now be available

Getting below error
/Users/niladri/.nuget/packages/microsoft.intune.maui.essentials.android/9.5.2-beta2/build/netstandard2.0/Microsoft.Intune.Maui.Essentials.android.targets(9,9): Error: An error occurred trying to start process '/Users/niladri/.nuget/packages/microsoft.intune.maui.essentials.android/9.5.2-beta2/build/netstandard2.0/BuildTool\bin\BuildToolCLI.bat' with working directory '/Users/niladri/Microsoft/WS/AIPViewer/AIPViewer'. No such file or directory
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at Core.BuildToolCLI.ExecuteBuildToolCLIProcess(Argument input, Argument output, Argument classpath, Argument excludeClasses, Argument reportPath, String workingDirectory, CancellationToken cancellationToken)
at Core.Mamifier.Mamify()
at BuildTasks.MamifyFiles.Execute() (AIPViewer)

This should be fixed in version 9.7.1-beta. Please update Microsoft.Intune.Maui.Essentials.Android