-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
MAUI Blazor app with long reference paths fails to Deploy on Windows #10068
Comments
Hi, https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation Could you check that your path length is not greater than 260? |
Marc, Thanks for your comment. I believe you are correct, my file paths listed above are just over the 260 limit. I was surprised because I was sure this limit had been raised/removed in recent versions of Windows. I wonder if this still needs attention by someone at MS though, especially since ~85 characters (about a third) of the file path ( In the meantime, I will add your link to the documentation for our repository and package. Thanks again! |
Follow-up. I followed the directions on @marcmognol 's link to "Enable Long Paths", did a reboot, checked the registry key, and added to the MAUI windows |
I also am running into this same issue. I am running Visual Studio 2022 and deploying a Maui Blazor app. Even enabling long file paths + a reboot, doesn't work for me.
|
I see this issue is planned for .NET 8, but I came across this and noticed a few things so let me add that. Maybe it will help diagnose/fix this when we get to it. @loligans could you add the file path that you have been using? Because I notice that the path from @TimPurdum has spaces in it. While that is valid on Windows, I wonder if we do not escape that somewhere. Could you both confirm that the path has spaces in it and that it behaves correctly (or at least differently) when the path does not have spaces? Additionally it seems that the long paths do not seem to be the root cause then since you both mention that you have enabled that. It's a long shot, but are you by any chance on .NET 7 by now? Can you confirm that this still occurs on the latest versions of things? |
@jfversluis I can confirm that this still occurs on .NET 7. |
This is still an issue in .Net 8 RC1. I can't deploy to a local iOS device because of a path being over 260 characters. In the logs, I can see this error:
This path exists, but the path length is 275 characters. I have already enabled long paths in Windows. Is there any workaround that doesn't require me to rename my app? |
Verified this issue with Visual Studio Enterprise 17.8.0 Preview 2.0. Can repro on windows platform with sample project. |
Is there a workaround in the meantime? I am hitting this and as other said, enabling Long path doesn't work. I don't really know how to shorten the name any further because the file of the library is that way:
|
@datvm the only workaround I have found during development is to move my project into |
@TimPurdum It's actually not a problem with the nuget folder but with my project "Deploy" destination (interestingly it builds successfully, just fails when deploying). Unfortunately it's part of a larger Git repo and even with I moved it to |
Im having a similar issue, if not the same. The second path is only over 260 characters, and that is considering the full path, not the partial one showed on the message. |
Im also facing the issue:
The file mentioned exists in its location, but i guess it fails because the path is around 270 characters long. |
So I try to use Junction as a workaround to shorten the path: New-Item New-Item -ItemType Junction -Path "D:\MyLongProjectPath" -Target "D:\Temp\Proj" VS builds successfully but unfortunately now trying to deploy results in another error:
Is there any workaround for this instead? |
Any workaround ? i got the same problem |
This is still an Issue on .NET 8 |
|
@lisa3907 I can't believe I didn't think about that workaround! Thank you. |
Just had this issue as well on .NET8. I am contributing to a few projects so I have them cloned as submodules in my MAUI app repo. On top of that one of these submodules makes use of AAPT which references files like Once you start using this workflow the limit is just around the corner. It would be nice to have long path support. |
You add this into the mobile.csproj ? If yes you add it somewhere specially or ? Because if i add it there, i got a error MSB4184 cannot evaluate the expression "[MSBuild]::MakeRelative(C:\temp\Debug\net8.0-ios\ios-arm64\publish, (F: is the ssd where the app project is stored) |
It must be in the same location. C: If you have a project, you can do it with ₩temp |
Unfortunately, this is an OS limitation and not something that .NET MAUI can address. Since a number of workarounds have been provided, I'm going to close this issue. |
Description
I'm using this public repo from our company. If I clone the repository into a relatively short path such as
C:\git
, it all works as expected. However, if I clone into a longer path, such as inC:\Users\TimPurdum\OneDrive - Dymaptic\git
, all the applications work except the MAUI sample app, which throws the following exception:Steps to Reproduce
OneDrive
directory.src/dymaptic.Blazor.GIS.API.Core.sln
in Visual Studio 2022 (I'm using the latest Preview)..MAUI
sample application, targetingWindows Machine
.Expected Outcome:
Application starts and runs on Windows machine.
Actual Outcome:
Error listed in description.
Link to public reproduction project repository
https://github.com/dymaptic/dy-blazor-api-core
Version with bug
6.0.400
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Target Framework: net6.0-windows10.0.19041.0
Did you find any workaround?
Moving to a shorter file path works as a temporary workaround.
#10068 (comment)
Relevant log output
No response
The text was updated successfully, but these errors were encountered: