I'm no longer able to build the Mono.Android-Tests suite against a XA system install, as a result of the changes in #2153.
Steps to Reproduce
- On macOS, install a recent .pkg from master.
- Get a clean checkout of xamarin-android.
msbuild /t:SignAndroidPackage src/Mono.Android/Test/Mono.Android-Tests.csproj
- 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:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Java.Interop.dll
Log File
https://gist.githubusercontent.com/pjcollins/31101a7f7b4badeaec79bac976d47533/raw/9633a1077e8865c80d606b061a4122a53438e242/gistfile1.txt
I'm no longer able to build the Mono.Android-Tests suite against a XA system install, as a result of the changes in #2153.
Steps to Reproduce
msbuild /t:SignAndroidPackage src/Mono.Android/Test/Mono.Android-Tests.csproj_CreateJavaInteropDllConfigstarget because I don't have XA build artifacts in my checkout: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:Finally, the
_CreateJavaInteropDllConfigstarget can't work on Windows as designed (though I don't believe any of this is yet supported on Windows anyway) becausexbuilddoesn'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:Log File
https://gist.githubusercontent.com/pjcollins/31101a7f7b4badeaec79bac976d47533/raw/9633a1077e8865c80d606b061a4122a53438e242/gistfile1.txt