question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] Path too long for MAUI device connected deploys

See original GitHub issue

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

Setup MAUI .NET 7 service release 6 with Sentry and deploy from Visual Studio to a usb connected IPhone.

NOTE: This is a compound issue by Sentry NuGet having files in a deep folder structure and MAUI SDK tooling generating longer paths than needed.

Expected Result

Deployment to go an without error.

Actual Result

Fails with MSB3021 The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Severity Code Description Project File Line Suppression State Error MSB3021 Unable to copy file "C:\Users\xxxx\.nuget\packages\sentry.bindings.cocoa\3.31.0\lib\net6.0-ios16.1\Sentry.Bindings.Cocoa.resources\Sentry.xcframework\ios-arm64_x86_64-simulator\dSYMs\Sentry-iPhoneSimulator.dSYM\Contents\Resources\DWARF\Sentry" to "C:\Users\xxxx\AppData\Local\Temp\Xamarin\HotRestart\Signing\Naturoppdrag.app\out\Payload\Naturoppdrag.app\Naturoppdrag.content\Sentry.Bindings.Cocoa.resources\Sentry.xcframework\ios-arm64_x86_64-simulator\dSYMs\Sentry-iPhoneSimulator.dSYM\Contents\Resources\DWARF\Sentry". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. Naturoppdrag C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\16.4.7054\tools\msbuild\iOS\Xamarin.iOS.HotRestart.targets 273

Product Area

Other

Link

No response

DSN

No response

Version

3.31.0

Issue Analytics

  • State:closed
  • Created 4 months ago
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
bruno-garciacommented, Aug 20, 2023

Looking at the error message:

Severity Code Description Project File Line Suppression State Error MSB3231 Unable to remove directory “C:\Users\usernamehere\AppData\Local\Temp\Xamarin\HotRestart\Signing\SampleAppSentry.app\out”. Could not find a part of the path ‘C:\Users\usernamehere\AppData\Local\Temp\Xamarin\HotRestart\Signing\SampleAppSentry.app\out\Payload\SampleAppSentry.app\SampleAppSentry.content\Sentry.Bindings.Cocoa.resources\Sentry.xcframework\ios-arm64\dSYMs\Sentry-iPhoneOS.dSYM\Contents\Resources\DWARF’. SampleAppSentry C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\16.4.7089\tools\msbuild\iOS\Xamarin.iOS.HotRestart.targets 359

This seems to me different than the original issue with path too long. Seems like something in the build tried to remove the path C:\Users\usernamehere\AppData\Local\Temp\Xamarin\HotRestart\Signing\SampleAppSentry.app\out\Payload\SampleAppSentry.app\SampleAppSentry.content\Sentry.Bindings.Cocoa.resources\Sentry.xcframework\ios-arm64\dSYMs\Sentry-iPhoneOS.dSYM\Contents\Resources\DWARF but it choked already when it got to ../out because that didn’t exist. Probably best to create a new ticket to track that problem. And close this issue again.

0reactions
jamescrosswellcommented, Aug 21, 2023

I’ve opened https://github.com/getsentry/sentry-dotnet/issues/2567. Closing this issue again then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to deploy only myApp to iOS device · Issue #16835
I'm working on a app, and during development I've deployed to my device at least a 50 times. Then 4 days ago something...
Read more >
.net - Release build of iOS MAUI failed with MSB3191 ( ...
1 Answer. Finally found the solution: Executing the command dotnet workload restore "full-path-to-your-sln" did the magic!
Read more >
Deploy an iOS app using hot restart - NET MAUI
The workaround is to reduce the amount of processing performed in the app's startup path, and to use a more recent iOS device....
Read more >
Deploying your .NET MAUI apps to production - Part 2: iOS
You can develop apps for iOS devices using macOS or Windows, but you need a macOS device to develop apps for macOS, and...
Read more >
Build iOS Apps with or WITHOUT a Mac? Visual Studio, C# ...
Better yet, use iOS Hot Restart for local deployment to an iOS device without the need for a Mac. After watching this video,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found