gustavoja / Intune.MAM.NET7

Mobile application to test Intune Mobile Application Management on .NET7
0 stars 0 forks source link

The MAM transofrmation failed unexpectedly #1

Open PramodKumarHK89 opened 1 year ago

PramodKumarHK89 commented 1 year ago

@gustavoja

I'm unable to compile the code in my Visual Studio Version 17.7.4.

Severity Code Description Project File Line Suppression State Error The MAM transofrmation failed unexpectedly, please review the verbose logs for more details. Intune.MAM.NET7.Droid C:\Users\pramkum.nuget\packages\microsoft.intune.maui.essentials.android\9.5.2-beta2\build\netstandard2.0\Microsoft.Intune.Maui.Essentials.android.targets 287

If I click on the error message it takes me to the below target file line

Diagnostic_Output.zip <MamifyFiles Files="@(_IntuneExtractedJarImports);@(_IntuneAndroidJavaLibrary)" Classpath="$(_IntuneClasspath)" BuildToolArgsDirectory="$(_IntuneMamifyRemappingPath)" BuildToolReportPath="$(_IntuneMamifyRemappingPath)report" />

Pasting the relevant diagnostic output

2> C:\Users\pramkum.nuget\packages\microsoft.intune.maui.essentials.android\9.5.2-beta2\build\netstandard2.0\Microsoft.Intune.Maui.Essentials.android.targets(287,9): error : The MAM transofrmation failed unexpectedly, please review the verbose logs for more details. 2> Done executing task "MamifyFiles" -- FAILED. 2>Done building target "_IntuneMamifyForXamarinRemapping" in project "Intune.MAM.NET7.Droid.csproj" -- FAILED.

Attached the verbose build logs

gustavoja commented 1 year ago

Hello @PramodKumarHK89

From you log I can see that VS is not able to find some file. Please take a look why this might be happening

Running command: 2> Command: C:\Users\pramkum\.nuget\packages\microsoft.intune.maui.essentials.android\9.5.2-beta2\build\netstandard2.0\BuildTool\bin\BuildToolCLI.bat 2> Arguments: --input C:\Official\IntuneTraining\Session4 - MAUI-Xamarin - IntuneAppSDK\MAUISample\Intune.MAM.NET7.Droid\obj\Debug\net7.0-android33.0\intune\build-tool\remap\input.txt --output C:\Official\IntuneTraining\Session4 - MAUI-Xamarin - IntuneAppSDK\MAUISample\Intune.MAM.NET7.Droid\obj\Debug\net7.0-android33.0\intune\build-tool\remap\output.txt --excludeClasses mono.MonoRuntimeProvider;androidx.startup.InitializationProvider --classpath “C:\Program Files (x86)\Android\android-sdk\platforms\android-33\android.jar;C:\Users\pramkum\.nuget\packages\microsoft.intune.maui.essentials.android\9.5.2-beta2\build\netstandard2.0\Resources\classes.jar” --report C:\Official\IntuneTraining\Session4 - MAUI-Xamarin - IntuneAppSDK\MAUISample\Intune.MAM.NET7.Droid\obj\Debug\net7.0-android33.0\intune\build-tool\remap\report --xamarin 2> File: C:\Official\IntuneTraining\Session4 not found.

PramodKumarHK89 commented 1 year ago

Thanks @gustavoja .

You are right. It is to do with the space in the path. I got the answer from https://github.com/msintuneappsdk/ms-intune-app-sdk-android/issues/180

gustavoja commented 1 year ago

Cool @PramodKumarHK89 So the example is working for you too? Hope it helps!

PramodKumarHK89 commented 1 year ago

Yes. It is working fine.

PramodKumarHK89 commented 1 year ago

@gustavoja : Quick follow up here.

Looks like you have used the two project(One core and one android specific) and then integrated the SDK. However, MAUI, we have one project and platform specific code can be written under platform folder. I was just wondering, if you have a sample in that format . For example: Take a sample templated MAUI and then integrate SDK.

gustavoja commented 1 year ago

Heel @PramodKumarHK89 I'm using .NET for mobile, not MAUI but it should be the same. Ultimately MAUI is based on .NET for mobile. Feel free to contribute to the project if you get it to work.