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
Context: dotnet/android#9846
Trying to build our `Mono.Android-Tests` suite for NativeAOT, it fails
with:
EXEC Failed to load assembly 'System.IO'
Which is caused by passing:
--root:System.IO
I couldn't find anything in the Android workload that would cause this.
It appears the `Microsoft.NETCore.Native.targets` have an issue caused
by this specific project:
* When adding to `@(_IlcRootedAssemblies)` it does an `Exists()` check
* So `Exists('System.IO.Compression')` is called. This is *true*
because there is a folder in the working directory named
`System.IO.Compression`!
https://github.com/dotnet/android/tree/main/tests/Mono.Android-Tests/Mono.Android-Tests/System.IO.Compression
* `%(FileName)` is then `System.IO` as `.Compression` is stripped as
the `%(Extension)` metadata.
I believe the fix here is to use `System.IO.File.Exists()` instead of
MSBuild's `Exists()` as it returns `true` for files *and* folders.
0 commit comments