marcojak / MauiMTAdmob

MIT License
104 stars 17 forks source link

Getting error when installing Nuget package #1

Closed supershopping closed 1 year ago

supershopping commented 1 year ago

Hi,

I am getting below error when installing this nuget package. Did I miss anything here? How to resolve? Thanks,

Severity Code Description Project File Line Suppression State Error Could not find a part of the path 'C:\Users\XXXX.nuget\packages\xamarin.firebase.ios.core\8.10.0.1\lib\net6.0-ios15.4\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_i386_x86_64-simulator\GoogleUtilitiesComponents.framework\Headers\GoogleUtilitiesComponents-umbrella.h'.

JeroenMBooij commented 1 year ago

@supershopping this is because the path is too long. I am assuming you don't use Windows Pro or don't have long path enabled. Check out this comment and the referenced issue: https://github.com/marcojak/MTAdmob/issues/102#issuecomment-1193099575

marcojak commented 1 year ago

As this is not linked to the plugin but the configuration on the user's machine, I'm closing the issue.

jfversluis commented 1 year ago

I have the same error and long paths is enabled.

When I install version 8.10.0.1 of the xamarin.firebase.ios.core package manually I get the same error, installing version 8.10.0 does work, but that version is too low to work with this plugin.

Interestingly enough this only seems to happen on Windows. When doing this on Visual Studio for Mac it just work.

More people are reporting this in the mentioned package repo: https://github.com/xamarin/GoogleApisForiOSComponents/issues/555

They do state that it's due to the long path, but I enabled it and still doesn't seem to solve it.

marcojak commented 1 year ago

I've solved this changing my NUGET_PACAKGES path. (to c:\nugets).

marcojak commented 1 year ago

I fixed this issue on my machine following this comment: https://github.com/xamarin/GoogleApisForiOSComponents/issues/555#issuecomment-1145943195

marcelbeeker commented 1 year ago

Execute dotnet add packages package Plugin.MauiMTAdmob from the command prompt solved this issue on my system

leowagnersouza commented 12 months ago

Hello! Same issue of @jfversluis here, with xamarin.firebase.ios.core 8.10.0.3. MAX_PATH don't work for this package, its name is extremely long. Any ideas?

jfversluis commented 11 months ago

@leowagnersouza see the comment right above you, if you install it through the command-line it does work.

leowagnersouza commented 11 months ago

Hello, @jfversluis !

I created a new project from scratch, and installed Firebase.iOS.Core 8.10.0.3 from the command line, and I'm still getting the error below:

image

As you can see in the image above, the Nuget path was updated to "C:\Nuget", but it still didn't work. It fixed the path error to several other packages, but not to this one. As someone said, it has an absurdly long path name...

I used: dotned add Plugin.Firebase

I will give it another try and update the question. I would appreciate any help. I need debug iOS notifications on the physicall device.

leowagnersouza commented 11 months ago

Hello, @jfversluis !

I confirm that add Firebase.iOS.Core 8.10.0.3 using the command line does not work. I created another brand new MAUI project to test it.

It may work, however, for the Plugin.MauiMTAdmob cited above by @marcelbeeker

Any help is appreciated, I need to debug iOS notifications, and do not have a local Mac.

JamesHalldorsson commented 5 months ago

Here is how I fixed the problem, it's a combination of some of the aforementioned methods.

firstly go into your registry editor, run as an administrator navigate to this path Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem

change the LONGPATHSENABLED to 1 (true) and save changes.

Reset your computer

once you have reset, go to the Developer Command Prompt for visual studio.

Change directory to the directory containing your .csproj file with the command cd /d and then followed by the path

once you are in this directory, execute the command: dotnet add package Plugin.MauiMTAdmob --version 1.0.4

If you follow these steps in sequence, this should install the package.