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

Can't install the package in a NET8 MAUI project #266

Closed
erossini opened this issue Feb 20, 2024 · 11 comments
Closed

Can't install the package in a NET8 MAUI project #266

erossini opened this issue Feb 20, 2024 · 11 comments

Comments

@erossini
Copy link

HI,
I was traying to add this NuGet package to my .NET8 MAUI project but I get this error:

Could not find a part of the path 'C:\Users\enric.nuget\packages\xamarin.firebase.ios.installations\8.10.0.3\lib\net6.0-ios15.4\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_x86_64-simulator\FirebaseInstallations.framework\Headers\FirebaseInstallations-umbrella.h'.

Do you know if there is a fix for it?

Thank you in advance,
Enrico

@erossini erossini changed the title Can't install the package in a NET9 MAUI project Can't install the package in a NET8 MAUI project Feb 20, 2024
@twannie83
Copy link

twannie83 commented Feb 21, 2024

Your NuGet package folder causes to long filepaths. Change your NuGet folder in environement variables, reboot your system after. Also a lot of other stuff to fix issues here, scroll down to Trouble Shooting
image

@baconsplit
Copy link

The error still persists for me, even after successfully setting the NuGet path to C:\NuGet.
When I go to the path described in Visual Studio, the file "client_load_reporting_filter.h" is not in the folder. Everything else of the path exists.

Any fix? Version 2.0.11 doesn't seem to work anymore in my project.

@khalil2099
Copy link

The error still persists for me, even after successfully setting the NuGet path to C:\NuGet. When I go to the path described in Visual Studio, the file "client_load_reporting_filter.h" is not in the folder. Everything else of the path exists.

Any fix? Version 2.0.11 doesn't seem to work anymore in my project.

first enable long path using power shell

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

Then in visual studio, Package Manager Console:
dotnet build --framework net8.0-android
or
dotnet build --framework net8.0-ios

After that, you can build your project using visual studio (gui) without having to command line again.

@erossini
Copy link
Author

erossini commented Mar 3, 2024

After setting the registry, I continue to have the same error. I tried to download the NuGet package and unpack on the NuGet directory but the result is the same.

@logikonline
Copy link

The error still persists for me, even after successfully setting the NuGet path to C:\NuGet. When I go to the path described in Visual Studio, the file "client_load_reporting_filter.h" is not in the folder. Everything else of the path exists.
Any fix? Version 2.0.11 doesn't seem to work anymore in my project.

first enable long path using power shell

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

Then in visual studio, Package Manager Console: dotnet build --framework net8.0-android or dotnet build --framework net8.0-ios

After that, you can build your project using visual studio (gui) without having to command line again.

THis does not work - I already had that enabled and use the same folder for nugets - I wish they would shorten the path OR work with Microsoft to address this.

@AdamEssenmacher
Copy link
Collaborator

Make sure to clear your local .nuget cache before running a dotnet restore from command line.

@sergiky
Copy link

sergiky commented May 12, 2024

Hey guys, I change LongPathsEnabled to 1 then I clean the .nuget cache, rebuild the project via package command line and when I install the package the problem persist.

Some idea?
imagen

@elvato87
Copy link

Hello, i'm having a similar problem in Net 8 upgrading from V2.0.13 to 3.0.0, same error but with different file
Could not find part of the path 'C:\Nuget\adame.firebase.ios.core\10.24.0\lib\net6.0-ios16.1\Firebase.Core.resources\FirebaseCoreInternal.xcframework\ios-arm64_x86_64-simulator\FirebaseCoreInternal.framework\Modules\FirebaseCoreInternal.swiftmodule\arm64-apple-ios-simulator.private.swiftinterface'.

I already enabled the long Path, changed the environment variables to c:\nuget, cleared nuget cache, ran dot net restore, reboot my computer but the error keeps showing up, any idea?

@AdamEssenmacher
Copy link
Collaborator

I recommend trying to isolate the problem.

If the reported file doesn't exist after running dotnet restore, then the long path issue is either at the OS level or in the dotnet tooling. If this is the case, you can try extracting the contents of the nuget to this directory manually.

If the file does exist, you can try building your iOS app from the command line. If that doesn't work, then the problem is in dotnet build.

If you can build from the command line, but not in Visual Studio, I think that would indicate that the problem is in Visual Studio itself.

Check out: dotnet/maui#17828

@elvato87
Copy link

I recommend trying to isolate the problem.

If the reported file doesn't exist after running dotnet restore, then the long path issue is either at the OS level or in the dotnet tooling. If this is the case, you can try extracting the contents of the nuget to this directory manually.

If the file does exist, you can try building your iOS app from the command line. If that doesn't work, then the problem is in dotnet build.

If you can build from the command line, but not in Visual Studio, I think that would indicate that the problem is in Visual Studio itself.

Check out: dotnet/maui#17828

So I was able to update using CLI, but now when i Try to run the project from Windows, paired to a Mac i get the following errors
clang++ salió con el código 1: ld: warning: Could not find or use auto-linked library 'swiftCore' ld: warning: Could not find or use auto-linked library 'swiftCompatibility50' ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics' ld: warning: Could not find or use auto-linked library 'swiftCoreImage' ld: warning: Could not find or use auto-linked library 'swiftFileProvider' ld: warning: Could not find or use auto-linked library 'swiftOSLog' ld: warning: Could not find or use auto-linked library 'swiftObjectiveC' ld: warning: Could not find or use auto-linked library 'swiftFoundation' ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements' ld: warning: Could not find or use auto-linked library 'swiftDarwin' ld: warning: Could not find or use auto-linked library 'swiftCompatibility51' ld: warning: Could not find or use auto-linked library 'swiftQuartzCore' ld: warning: Could not find or use auto-linked library 'swiftUIKit' ld: warning: Could not find or use auto-linked library 'swif

The errors are similar in the command line
'C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : clang++ salió con el código 1: [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftCore' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftCompatibility50' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftCoreImage' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftFileProvider' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftOSLog' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftObjectiveC' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftFoundation' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftDarwin' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftCompatibility51' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftQuartzCore' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swiftUIKit' [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\targets\Xamarin.Shared.Sdk.targets(1560,3): error : ld: warning: Could not find or use auto-linked library 'swif [C:\Repos\nedchatapp2\NedChatApp\NedChatApp.csproj::TargetFramework=net8.0-ios]'

@AdamEssenmacher
Copy link
Collaborator

#303 (comment)

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

8 participants