You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mono.Android-Tests is failing to build with AndroidGenerateJniMarshalMethods enabled #2683
The build fails on the _CreateJavaInteropDllConfigs target because I don't have XA build artifacts in my checkout:
(_CreateJavaInteropDllConfigs target) ->
/Users/peter/source/xamarin-android/build-tools/scripts/JavaInteropDllConfigs.targets(11,5): error MSB3491: Could not write lines to file "/Users/peter/source/xamarin-android/bin/Debug/lib/xamarin.android/xbuild/Xamarin/Android/Java.Interop.dll.config". Could not find a part of the path "/Users/peter/source/xamarin-android/bin/Debug/lib/xamarin.android/xbuild/Xamarin/Android/Java.Interop.dll.config". [/Users/peter/source/xamarin-android/src/Mono.Android/Test/Mono.Android-Tests.csproj]
Now, I can conditionally set /p:XAInstallPrefix=/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/ on macOS, but msbuild then runs into a permission issue when trying to modify the file:
(_CreateJavaInteropDllConfigs target) ->
/Users/peter/source/xamarin-android/build-tools/scripts/JavaInteropDllConfigs.targets(11,5): error MSB3491: Could not write lines to file "/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/xbuild/Xamarin/Android/Java.Interop.dll.config". Access to the path "/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/xbuild/Xamarin/Android/Java.Interop.dll.config" is denied. [/Users/peter/source/xamarin-android/src/Mono.Android/Test/Mono.Android-Tests.csproj]
Finally, the _CreateJavaInteropDllConfigs target can't work on Windows as designed (though I don't believe any of this is yet supported on Windows anyway) because xbuild doesn't exist in the XA install path on Windows. The relevant assemblies and configuration files would be found in a path similar to the one shown below:
@grendello was seeing a similar problem when building the XF integration project in Release mode, when you've only built XA in Debug mode:
build-tools/scripts/JavaInteropDllConfigs.targets(11,5): error MSB3491:
Could not write lines to file "bin/Release/lib/xamarin.android/xbuild/Xamarin/Android/Java.Interop.dll.config". Could not find a part of the path "bin/Release/lib/xamarin.android/xbuild/Xamarin/Android/Java.Interop.dll.config".
Activity
jonathanpeppers commentedon Feb 1, 2019
@grendello was seeing a similar problem when building the XF integration project in
Releasemode, when you've only built XA inDebugmode:So if you have a clean checkout:
make prepare allbin/Debug/bin/xabuild tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj /bl /restore /p:Configuration=Releasepjcollins commentedon Jun 7, 2019
Should be fixed by #3042.