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
[Xamarin.Android.Build.Tasks] set $(AndroidSdkDirectory) if blank (#2225)
In d6009ef, I fixed an issue when `$(AndroidSdkDirectory)` is set to
a non-existent directory.
However, downstream in `monodroid`, there is a test project with an
MSBuild target such as:
<Exec Command=""$(JavaSdkDirectory)\bin\javac" -etc" />
`/p:JavaSdkDirectory` is not passed in here at the command line or
imported, causing `/bin/javac` is attempted to be used, which doesn't
work, as it doesn't exist.
This brings up an important point.
`$(AndroidSdkDirectory)`, `$(AndroidNdkDirectory)` and
`$(JavaSdkDirectory)` were public properties that were set if blank,
So we can't just remove them! There could be unknown projects, NuGet
packages, etc. relying on them.
I think the fix here is to set these properties if they are blank.
Internally in xamarin-android's MSBuild targets, we should always use
the private underscore-prefixed versions such as
`$(_AndroidSdkDirectory)`.
0 commit comments