Skip to content
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

[question]: MAUI - Error updating nuget from 4.3.3 to 5.0.2 #79

Open
1 task done
MardorZ opened this issue Nov 17, 2023 · 7 comments
Open
1 task done

[question]: MAUI - Error updating nuget from 4.3.3 to 5.0.2 #79

MardorZ opened this issue Nov 17, 2023 · 7 comments

Comments

@MardorZ
Copy link

MardorZ commented Nov 17, 2023

How can we help?

When trying to update the nuget package in our MAUI app from 4.3.3 to 5.0.2 or any 5.X.X i get the following error:

Path not found:
C:\Users\DaveXXXXX.nuget\packages\onesignalsdk.dotnet\5.0.2\res\ios\OneSignalFramework.xcframework\ios-arm64_x86_64-maccatalyst\OneSignalFramework.framework\Versions\Current\Modules\OneSignalFramework.swiftmodule\x86_64-apple-ios-macabi.private.swiftinterface

The path is 260 characters long but i already enabled "LongPaths" in windows registry.

Is this really a path problem or did anyone have this problem?

Code of Conduct

  • I agree to follow this project's Code of Conduct
@shepherd-l
Copy link
Contributor

What version of Xcode and .Net are you using?

@doxpi
Copy link

doxpi commented Nov 29, 2023

Same problem with XCode 15.0.1 in distant Mac and .net Maui 8 with Visual Studio 2022 v 17.8.1 windows 11

@abdullahraiyyan
Copy link

Same problem.

@snoova
Copy link

snoova commented Mar 19, 2024

Same problem here.

This is how i fixed it:

  1. Run this powershell to support "Long Path" in Windows 10/11
New-ItemProperty `
    -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
    -Name "LongPathsEnabled" `
    -Value 1 `
    -PropertyType DWORD `
    -Force
  1. Create a new directory for NuGet packages => C:\n
  2. Add the new directory to a environment variable: NUGET_PACKAGES = C:\n
  3. Go to your project directory and run dotnet add package OneSignalSDK.DotNet from Console using .NET CLI.
    Do not add the package from within VS

(Credits: @TobiasBuchholz)

@DaveBrask
Copy link

I did the same as snoova except I used RegEdit to add long path support. And I right-clicked My Computer, properties, advanced, environment variables to test Temp to be C:\Tmp. I found LongPathEnabled turned off and needed to be reset periodically.

@snoova
Copy link

snoova commented Oct 23, 2024

@DaveBrask do you create a short directory for the nugets?
important is to restore nuget packages from command line. After that, you can run your project in VS

@DaveBrask
Copy link

I'm using 5.1.3. I didn't need to restore from the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants