-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not copy the file from xcframework #21111
Comments
The path: Probably related to: but shortening the path doesnt make a difference |
I get a 404 - is it private? In any case this sounds like a MAX_PATH issue, but the fact that it's intermittent is really weird. Can you try building from the command line and see if that has the same problem? Here's a document explaining how to publish from the command line, you can build as well by just replacing "dotnet publish" with "dotnet build" and adjusting any other command line arguments as needed. If you're able to reproduce from the command line, please get an MSBuild binlog and attach it here. |
Sorry, yes it was, now you should be able to access it.
From cli the build seems to work without errors/warnings
|
Sorry, I forgot to link to the actual document: https://learn.microsoft.com/en-us/dotnet/maui/ios/deployment/publish-cli?view=net-maui-8.0#publish-an-ios-app-from-windows The important part is that you need to set a few properties (ServerAddress, ServerUser, ServerAddress) on the command line for the remote build to happen. |
Enabling long path support doesn't cut it for VS on Windows. The paths still have to be shortened (~260 chars). |
But specifying server address, user etc is for building on the mac. I had this problem on windows without connected mac. Or whats the purpose of running it on mac from cli ? But when trying to run cli ios build with address and user specified I get:
|
I haven't had time to try this yet, but a potential workaround could be to just remove the files causing problems from the xcframework before it's consumed by the binding project. So remove this directory:
You could probably remove all the *.swiftmodule directories:
These files are not needed at runtime (in fact only for compiling Xcode/Swift projects, so we don't need them at all). Can you try that and see if it works for you? |
After deletion of those |
OK, this really sounds like a MAX_PATH issue, since it works from the command line. It's a known issue that it's not possible to increase/ignore MAX_PATH in VS (https://developercommunity.visualstudio.com/t/allow-building-running-and-debugging-a-net-applica/351628 - please upvote!), so I'm closing this as a duplicate of the VS feedback issue. |
Apple platform
iOS
Framework version
net8.0-*
Affected platform version
VS 2022 17.11.1
Description
idk if this is my binding's bug or VS bug
I can normally build MAUI app containing library referencing iOS xcframework binding. This binding contains files also for simulator. First build/rebuild and then starting the app works correctly. But then when I close and start or restart the maui app it fails with errors(I cleared whole nuget cache and those files really exist in that location):
followed by warnings like:
warning MSB3026: Could not copy "C:\Users\samos\.nuget\packages\kebechet.maui.microsoftclarity.ios\2.0.0\lib\net8.0-ios17.2\Maui.MicrosoftClarity.iOS.resources\Clarity.xcframework\ios-arm64_x86_64-simulator\Clarity.framework\Modules\Clarity.swiftmodule\arm64-apple-ios-simulator.abi.json" to "bin\Debug\net8.0-ios\iossimulator-arm64\Maui.MicrosoftClarity.iOS.resources\Clarity.xcframework\ios-arm64_x86_64-simulator\Clarity.framework\Modules\Clarity.swiftmodule\arm64-apple-ios-simulator.abi.json". Beginning retry 1 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\iossimulator-arm64\Maui.MicrosoftClarity.iOS.resources\Clarity.xcframework\ios-arm64_x86_64-simulator\Clarity.framework\Modules\Clarity.swiftmodule\arm64-apple-ios-simulator.abi.json'.
Steps to Reproduce
Did you find any workaround?
I have to always clean and rebuild the whole solution (sometimes works, sometimes it doesnt)
Build logs
The text was updated successfully, but these errors were encountered: