Open ma81xx opened 4 days ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
This problem cannot be reproduced at Android platform on the latest 17.10.3(8.0.61).
Reproduction project: https://github.com/ma81xx/App04Bug Git clone, open solution in VS2022 (17.10.3), build App04Bug project
The problem is due to the duplicated project reference at https://github.com/ma81xx/App04Bug/blob/master/App04Bug/App04Bug.csproj#L14
Description
When I deploy the project to device/emulator I get the XAPRAS7023 DirectoryNotFoundException error.
The problem seems the https://github.com/dotnet/maui/issues/10150, but I get it in more recent update, in net8.0-android, VS 2022 17.10.3, Android SDK 34, Android Command line tools 11.0, Android SDK Platform tools 35.0.1 Android SDK Build tools 34.0.0, Android emulator 34.1.19
dotnet workload list ID Manifest versions Installation source android 34.0.95/8.0.100 VS 17.10.35013.160 aspire 8.0.0/8.0.100 VS 17.10.35013.160 maui-windows 8.0.40/8.0.100 VS 17.10.35013.160 maccatalyst 17.2.8053/8.0.100 VS 17.10.35013.160 ios 17.2.8053/8.0.100 VS 17.10.35013.160
I already found that the problem was due to a double project reference to a library in a .csproj. It was born in a bad merge.
I think this can be useful to someone else that falls in a similar problem or to the developers of Android Build process.
Stack trace:
App04Bug -> C:\Users\user\source\repos\App04Bug\App04Bug\App04Bug\bin\Debug\net8.0-android\App04Bug.dll C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.95\targets\Microsoft.Android.Sdk.AssemblyResolution.targets(123,5): error XAPRAS7023: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\user\source\repos\App04Bug\App04Bug\AndroidLib1\bin\Debug\net8.0-android\android-x64\AndroidLib1.dll'. C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.95\targets\Microsoft.Android.Sdk.AssemblyResolution.targets(123,5): error XAPRAS7023: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.95\targets\Microsoft.Android.Sdk.AssemblyResolution.targets(123,5): error XAPRAS7023: at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.95\targets\Microsoft.Android.Sdk.AssemblyResolution.targets(123,5): error XAPRAS7023: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.95\targets\Microsoft.Android.Sdk.AssemblyResolution.targets(123,5): error XAPRAS7023: at Xamarin.Android.Tasks.MonoAndroidHelper.HasMonoAndroidReference(ITaskItem assembly) C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.95\targets\Microsoft.Android.Sdk.AssemblyResolution.targets(123,5): error XAPRAS7023: at Xamarin.Android.Tasks.ProcessAssemblies.SetMetadataForAssemblies(List
1 output, Dictionary
2 symbols) C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.95\targets\Microsoft.Android.Sdk.AssemblyResolution.targets(123,5): error XAPRAS7023: at Xamarin.Android.Tasks.ProcessAssemblies.RunTask() C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.95\targets\Microsoft.Android.Sdk.AssemblyResolution.targets(123,5): error XAPRAS7023: 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 25Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
Unknown/Other
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
VS 2022 17.10.3, net8.0-android, android 34
Did you find any workaround?
The problem was due to a double project reference to a library in a .csproj
Relevant log output
No response