Commit c38e3c5
committed
[build] create
If you installed the `android` workload via:
dotnet workload install android --skip-sign-check \
--from-rollback-file https://maui.blob.core.windows.net/metadata/rollbacks/net8.0.json \
--source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json \
--source https://api.nuget.org/v3/index.json
`dotnet new android` & `dotnet build` succeeds.
But `MSBuild.exe` fails with:
D:\src\dotnet-sdk-8.0.100-preview.6.23318.1-win-x64\packs\Microsoft.Android.Sdk.Windows\34.0.0-preview.6.323\tools\Xamarin.Android.EmbeddedResource.targets(39,5): error XARLP7028: System.IO.FileNotFoundException: Could not load file or assembly 'libZipSharp, Version=2.1.0.0, Culture=neutral, PublicKeyToken=276db85bc4e20efc' or one of its dependencies. The system cannot find the file specified.
File name: 'libZipSharp, Version=2.1.0.0, Culture=neutral, PublicKeyToken=276db85bc4e20efc'
at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(IDictionary`2 jars, ICollection`1 resolvedResourceDirectories, ICollection`1 resolvedAssetDirectories, ICollection`1 resolvedEnvironments, ICollection`1 proguardConfigFiles)
at Xamarin.Android.Tasks.ResolveLibraryProjectImports.RunTask()
at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 25
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
It turns out that for references to `libZipSharp.dll`:
* `Microsoft.Android.Build.BaseTasks.dll` references 2.1.0.0
* `Xamarin.Android.Build.Tasks.dll` references 3.0.0.0
However, this appears to already be solved in the 34.0.0-preview.6.355
version of the `android` workload. It is broken in
`34.0.0-preview.6.323`.
In that time window, we updated `$(LibZipSharpVersion)` in
xamarin/xamarin-android, but not yet bumped to the latest
xamarin/xamarin-android-tools:
f1d5918
To solve this issue, we can use the extension points we added to:
dotnet/android-tools@34e98e2
And import xamarin-android's `Directory.Build.props` from
`xamarin-android-tools.override.props`. With this change in place, I can
set the value of `$(LibZipSharpVersion)` to any value and the value from
xamarin-android overrides it.
This probably slipped through because we dropped the "classic"
Xamarin.Android test suite that used .NET framework MSBuild on Windows.
All tests now use `dotnet build`, so we need to add something to test
`MSBuild.exe`?xamarin-android-tools.override.props
1 parent 6e375d5 commit c38e3c5
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments