Commit b0bac43
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`.
I added a test that builds an Android project in Debug & Release with
`MSBuild.exe`, and updated Xamarin.ProjectTools to support doing this.xamarin-android-tools.override.props
1 parent a850d81 commit b0bac43
File tree
8 files changed
+48
-23
lines changed- external
- src/Xamarin.Android.Build.Tasks/Tests
- Xamarin.Android.Build.Tests
- Xamarin.ProjectTools
- Android
- Common
8 files changed
+48
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2577 | 2577 | | |
2578 | 2578 | | |
2579 | 2579 | | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
2580 | 2602 | | |
2581 | 2603 | | |
Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 23 | | |
29 | 24 | | |
30 | 25 | | |
| |||
Lines changed: 21 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| |||
186 | 192 | | |
187 | 193 | | |
188 | 194 | | |
189 | | - | |
| 195 | + | |
190 | 196 | | |
191 | 197 | | |
192 | 198 | | |
| |||
204 | 210 | | |
205 | 211 | | |
206 | 212 | | |
| 213 | + | |
207 | 214 | | |
208 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
209 | 218 | | |
210 | 219 | | |
211 | 220 | | |
212 | 221 | | |
213 | 222 | | |
214 | 223 | | |
215 | 224 | | |
216 | | - | |
| 225 | + | |
217 | 226 | | |
218 | 227 | | |
219 | 228 | | |
220 | | - | |
| 229 | + | |
221 | 230 | | |
222 | 231 | | |
223 | 232 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
0 commit comments