GoogleApisForiOSComponents icon indicating copy to clipboard operation
GoogleApisForiOSComponents copied to clipboard

Xamarin.Firebase.iOS.Core 8.10.0.1 installation error

Open vivekscorp opened this issue 2 years ago • 59 comments

Error Could not find a part of the path 'C:\Users\vivek.nuget\packages\xamarin.firebase.ios.core\8.10.0.1\lib\xamarinios10\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_i386_x86_64-simulator\GoogleUtilitiesComponents.framework\PrivateHeaders\GULCCComponentContainerInternal.h'.

System.IO.DirectoryNotFoundException: Could not find a part of the path 'GULCCComponentContainerInternal.h'. at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data) at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost) at NuGet.Packaging.PackageExtractor.<>c__DisplayClass5_0.<<InstallFromSourceAsync>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Common.ConcurrencyUtilities.<ExecuteWithFileLockedAsync>d__51.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at NuGet.Common.ConcurrencyUtilities.<ExecuteWithFileLockedAsync>d__51.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Packaging.PackageExtractor.<InstallFromSourceAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Commands.ProjectRestoreCommand.<InstallPackageAsync>d__16.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at NuGet.Commands.ProjectRestoreCommand.<InstallPackagesAsync>d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Commands.ProjectRestoreCommand.<TryRestoreAsync>d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Commands.RestoreCommand.<ExecuteRestoreAsync>d__62.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Commands.RestoreCommand.<ExecuteAsync>d__45.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Commands.RestoreRunner.<ExecuteAsync>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.Commands.RestoreRunner.<CompleteTaskAsync>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at NuGet.Commands.RestoreRunner.<RunWithoutCommit>d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.PackageManagement.DependencyGraphRestoreUtility.<PreviewRestoreProjectsAsync>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.PackageManagement.NuGetPackageManager.<PreviewBuildIntegratedProjectsActionsAsync>d__86.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.PackageManagement.NuGetPackageManager.<PreviewProjectsInstallPackageAsync>d__73.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.PackageManagement.VisualStudio.NuGetProjectManagerService.<>c__DisplayClass19_0.<<GetInstallActionsAsync>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NuGet.PackageManagement.VisualStudio.NuGetProjectManagerService.<CatchAndRethrowExceptionAsync>d__30`1.MoveNext()

vivekscorp avatar Jun 02 '22 08:06 vivekscorp

I can confirm the issue

Mataboge avatar Jun 02 '22 11:06 Mataboge

Seeing the issue on Windows 11. Path too long? Confirmed that changing my NUGET_PATH system environment variable on my computer allowed the package to install correctly. Refer to this as a temporary solution.

sambasile avatar Jun 02 '22 19:06 sambasile

Hi sambasile, I can't find NUGET_PATH in my system environment variables and in the link you said to refer to. Please let me know in detail if possible. Thanks

vivekscorp avatar Jun 03 '22 02:06 vivekscorp

Hi @vivekscorp. It is not there but by adding it, you can override the default value of c:\users\_currentuser_\.nuget. In my case, I set the value to c:\Nugets which reduces the file path enough for the NuGet to install properly. I also enabled long file paths in my Group Policy. (see here) and changed the manifest of devenv.com as per the same document.

NugetPath

sambasile avatar Jun 03 '22 13:06 sambasile

@sambasile How exactly do you change the manifest of devenv.com ?

tranb3r avatar Jun 22 '22 07:06 tranb3r

I have the same issue

Ruvi1996 avatar Jun 24 '22 14:06 Ruvi1996

@tranb3r my apologies, after reviewing I think I only changed the System Variable for the NuGet Packages

sambasile avatar Jun 24 '22 16:06 sambasile

I've changed my NUGET_PACAKGES path. I'm still having this error: Could not find a part of the path 'C:\Nuget\xamarin.firebase.ios.cloudfirestore\8.10.0.1\lib\net6.0-ios15.4\Firebase.CloudFirestore.resources\grpcpp.xcframework\ios-arm64_i386_x86_64-simulator\grpcpp.framework\PrivateHeaders\src\core\ext\filters\client_channel\lb_policy\grpclb\client_load_reporting_filter.h' Any help ?

tranb3r avatar Jul 04 '22 15:07 tranb3r

Here's what i did:

closed visual studio

  1. in the Environment Variable, added a new path "C:\Nuget" to PATH (PATH already exists, edit and add new path) added "C:\Nuget" to NUGET_PATH added "C:\Nuget" to NUGET_PACKAGES (one of these actually does the trick, dunno which one)

  2. downloaded nuget.exe and moved it to the path C:\Nuget

  3. opened command window

  4. navigated to my project solution (cd ...)

  5. ran command "nuget restore project.sln" (project.sln is the name of my solution)

NB: when ever you do a nuget clear, it will delete the nuget.exe, make sure to copy it back to the folder when you need to do a restore from the command line.

NB: if your restore does not restore and says all projects up to date, make sure to run a nuget clear all and move back the nuget.exe and do a restore again

Mataboge avatar Jul 04 '22 15:07 Mataboge

Increasing the path length limitation (MAX_PATH) solved the issue for me. Here’s how

Ruvi1996 avatar Jul 04 '22 15:07 Ruvi1996

Well, even if I increase the MAX_PATH in the registry, change the NUGET_PACKAGES path to shorten it, use the latest nuget.exe to download packages from command-line, I still end up with this exception in VS:

System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Nuget\xamarin.firebase.ios.cloudfirestore\8.10.0.1\lib\net6.0-ios15.4\Firebase.CloudFirestore.resources\grpcpp.xcframework\ios-arm64_i386_x86_64-simulator\grpcpp.framework\PrivateHeaders\src\core\ext\filters\client_channel\lb_policy\grpclb\client_load_reporting_filter.h'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.IO.File.Create(String path)
   at NuGet.Packaging.StreamExtensions.Testable.MmapCopy(Stream inputStream, String fileFullPath, Int64 size)
   at NuGet.Packaging.StreamExtensions.Testable.CopyToFile(Stream inputStream, String fileFullPath)
   at NuGet.Packaging.PackageFileExtractor.ExtractPackageFile(String source, String target, Stream stream)
   at NuGet.Packaging.PackageArchiveReader.CopyFiles(String destination, IEnumerable`1 packageFiles, ExtractPackageFileDelegate extractFile, ILogger logger, CancellationToken token)
   at NuGet.Packaging.PackageReaderBase.CopyFilesAsync(String destination, IEnumerable`1 packageFiles, ExtractPackageFileDelegate extractFile, ILogger logger, CancellationToken cancellationToken)
   at NuGet.Packaging.PackageExtractor.<>c__DisplayClass5_0.<<InstallFromSourceAsync>b__0>d.MoveNext()

And of course, the mentioned file DOES exist in the filesystem.

tranb3r avatar Jul 04 '22 15:07 tranb3r

@SotoiGhost I would really appreciate some help from the team... Thanks.

tranb3r avatar Jul 19 '22 09:07 tranb3r

Getting the same error as @tranb3r. My "C:\Nugets\xamarin.firebase.ios.cloudfirestore\8.10.0.1\lib\net6.0-ios15.4\Firebase.CloudFirestore.resources\grpcpp.xcframework\ios-arm64_i386_x86_64-simulator\grpcpp.framework\PrivateHeaders\src\core\ext\filters\client_channel\lb_policy\grpclb" folder is empty.

Edit: no errors installing the 8.10.0 build instead of the 8.10.0.1 build.

RSaundersInfo avatar Jul 23 '22 18:07 RSaundersInfo

Is this going to be fixed on the source side with the next version (i.e., package maintainers shorten their strings)? Or we must manually change Nuget env variables etc to make this package work going forward? I'd hope it's the former case here.

mikequ-taggysoft avatar Jul 23 '22 22:07 mikequ-taggysoft

Here is what fixed the issue for me

  1. Close Visual Studio
  2. Open cmd/PowerShell
  3. Change directory to the path of the project
  4. Execute dotnet restore
  5. Open Visual Studio again

Silv-1 avatar Aug 04 '22 10:08 Silv-1

Here is what fixed the issue for me

  1. Close Visual Studio
  2. Open cmd/PowerShell
  3. Change directory to the path of the project
  4. Execute dotnet restore
  5. Open Visual Studio again

Ok it works for me as well.

tranb3r avatar Aug 24 '22 06:08 tranb3r

Same issue here. Following the instructions by Mataboge solved my problem. Enabling the registry key LongPathsEnabled, or doing a dotnet restore did not work for me.

AntHillOracle avatar Sep 05 '22 21:09 AntHillOracle

For me, it was not enough to enble the long paths in the registry. It worked when I closed VS and then executed

dotnet add package Plugin.MauiMTAdmob --version 1.0.1

in the project directory.

zabanet avatar Oct 08 '22 21:10 zabanet

FYI - I tried all of those solutions above to no avail.

Changing nuget_packages environment variable (which broke allot of other things), restarting VS, deleting bin and obj. Nuget package path was changed successfully, did a restore, but still none of those solutions seemed to work. I got this same error when attempting nuget package install both from VS 2022 both in Nuget UX in VS, and in Package Manager Console from VS.

Then.. I closed VS and tried Developer Command prompt "dotnet add package" instead ... and what do you know?

Worked perfectly.

robertev-alchemy avatar Apr 13 '23 14:04 robertev-alchemy

I have this issue, Im using VS 2022 version 17.6.2 and have the latest xamarin ios firebase cloud messaging nuget installed 8.10.0.3. I get

Xamarin.Messaging.IDB.Local.DeployAppMessageHandler Error: 0 : An error occurred while trying to deploy the app 'OrionConnect.app'. Details: Could not find a part of the path 'C:\Users\xxxx\AppData\Local\Temp\Xamarin\HotRestart\Signing\OrionConnect.app\out\Payload\OrionConnect.app\OrionConnect.content\Firebase.CloudMessaging.resources\FirebaseMessaging.xcframework\ios-arm64\FirebaseMessaging.framework\Headers\FirebaseMessaging-umbrella.h'. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\xxxx\AppData\Local\Temp\Xamarin\HotRestart\Signing\OrionConnect.app\out\Payload\OrionConnect.app\OrionConnect.content\Firebase.CloudMessaging.resources\FirebaseMessaging.xcframework\ios-arm64\FirebaseMessaging.framework\Headers\FirebaseMessaging-umbrella.h'

I have tried all solutions on here like enabling long file paths, setting enviromental variables, editing nuget.config paths, runnig dotnet restore and dotnet add package and it still gives me this. It seems vs 2022 uses a hotreload directory to copy over these files and i dont know if its still to long path. I tried disabling hot reload but that doesnt work. Im not sure what to do. I tried running this on remote device and that also fails. I tried runnig it on vs 2022 on mac and it does compile successfully so something is not working right on VS 2022. The nuget or VS needs to get a fix to resolve this

cwilde123 avatar Jun 01 '23 19:06 cwilde123

this is definitely related to Xamarin.Firebase.iOS.Core 8.10.0.1 version, at least directly on Mac. When I downgrade to the v6.x , everything works as before.

EmilAlipiev avatar Jun 06 '23 16:06 EmilAlipiev

Issue for me as well. I can't decide whether it's crazier that Windows 11 still has these filepath limitations, or that Xamarin Firebase felt the need to create a path this absurdly long as part of their build process. 🤷🏼

Meekohi avatar Jun 19 '23 19:06 Meekohi

Hi, the issue also persists for me. Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.6.2. The sample works well with Maui .net6. However, when you use .net7, the Xamarin.Firebase.Ios.Core errors start popping up.

I have tried the following: 1) Changed my Nuget packages folder, NUGET_PACKAGES as suggested above. Didnt help. 2) Set my Windows to use Long file names as suggested above in the registry (LongPathsEnabled). Didnt help. 3) I have tried the dotnet add package suggestion to add the nuget package via the Developer Cmd prompt. Didnt help. 4) I have then tried using older versions of the nuget packages. This worked up to a point. But then the plugin.mtmob package required later Xamarin.Firebase packages, so no, it didnt work.

Unfortunately I have written my whole project using the Communitytoolkit.maui toolkit package, and it has a minimum requirement of .net7 to work. So now I am running out of fresh ideas.

Perhaps if soemone out there could post a sample solution of mtadmob using .net7 it would be great. I will also give it a go myself, but I dont think my skills are at a level where I will be able to get that working.

Any help will be much appreciated.

JohanvanderMerwe avatar Jun 30 '23 16:06 JohanvanderMerwe

Hi, the issue also persists for me. Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.6.2. The sample works well with Maui .net6. However, when you use .net7, the Xamarin.Firebase.Ios.Core errors start popping up.

For me it's Microsoft Visual Studio Enterprise 2022 (64-bit) - Current Version 17.6.4 on Windows 10 Pro 22H2 19045.3086 with the nuget package xamarin.firebase.ios.cloudfirestore version 8.10.0.3 and my maui project using .net7 because of the dependencies.

I don't know why but last week everything was fine and this week it broke.

I tried all solutions above:

  • my user nuget.config is modified to set the nuget folder by using nuget.exe config -set repositoryPath=C:\n and nuget.exe config -set globalPackagesFolder=C:\n
  • my nuget folder is at C:\n and is used during restores
  • my project is at C:\dev\XXXXXXXXXX\XXXXX\XXXXXXXXX\XXXXXXXXX\XXXXXXXXXXXXXXXXXXX.csproj (the count of X is related to the path)
  • I have long-paths enabled
  • I have the env-vars NUGET_PACKAGES and NUGET_PATH set just in case...
  • a fresh nuget.exe resides in C:\n\nuget.exe
  • Visual Studio Package restore fails with the error System.IO.PathTooLongException: 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.
  • a dotnet restore worked flawless
  • a dotnet build worked flawless
  • Visual Studio Build fails with the problem that iOS package can't be copied even the file exists:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4862,5): error MSB3021: Unable to copy file "C:\n\xamarin.firebase.ios.cloudfirestore\8.10.0.3\lib\net6.0-ios15.4\Firebase.CloudFirestore.resources\grpcpp.xcframework\ios-arm64_x86_64-simulator\grpcpp.framework\PrivateHeaders\src\core\tsi\alts\zero_copy_frame_protector\alts_zero_copy_grpc_protector.h" to "bin\Debug\net7.0-ios\iossimulator-x64\Firebase.CloudFirestore.resources\grpcpp.xcframework\ios-arm64_x86_64-simulator\grpcpp.framework\PrivateHeaders\src\core\tsi\alts\zero_copy_frame_protector\alts_zero_copy_grpc_protector.h". Could not find a part of the path 'bin\Debug\net7.0-ios\iossimulator-x64\Firebase.CloudFirestore.resources\grpcpp.xcframework\ios-arm64_x86_64-simulator\grpcpp.framework\PrivateHeaders\src\core\tsi\alts\zero_copy_frame_protector\alts_zero_copy_grpc_protector.h'.

Its about 134 files that can't be copied because of the "can't find file" issue.

For us the nuget package https://www.nuget.org/packages/Plugin.Firebase.Core/ with direct dependency to [Xamarin.Firebase.iOS.Core](https://www.nuget.org/packages/Xamarin.Firebase.iOS.Core/) (>= 8.10.0.3) for net6-ios16.0 is the issue, yet it worked a week before.

Ah yes, we also played around with the dotnet workload restore and dotnet workload repair as well as reairing (actually reset and reinstalling) visual studio just to make the day interesting.

Is there anything we can do?! We ran several times into such issues over the last year yet it was always fixable somehow.

SeriousM avatar Jul 04 '23 17:07 SeriousM

Same problem here, none of the above solutions worked. Or better they did worked and fixed all the packages, except xamarin.firebase.ios.core, that have a extreme long path name. Any ideas?

leowagnersouza avatar Jul 11 '23 05:07 leowagnersouza

Problem occurs because on Windows it'll try to copy Firebase framework files to your bin path on your project's folder, appending paths that will go over the max path length.

Workaround is to put this somewhere on a PropertyGroup:

<BaseOutputPath>c:\temp\build\bin</BaseOutputPath>

It's an ugly hack and won't work with CI builds but makes building/debugging possible on Windows. This will put your bin folder on a shorter path (it can be anything you like!) and builds will complete succesfully.

itoledo avatar Aug 10 '23 21:08 itoledo

Hi, the issue also persists for me. Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.6.2. The sample works well with Maui .net6. However, when you use .net7, the Xamarin.Firebase.Ios.Core errors start popping up.

For me it's Microsoft Visual Studio Enterprise 2022 (64-bit) - Current Version 17.6.4 on Windows 10 Pro 22H2 19045.3086 with the nuget package xamarin.firebase.ios.cloudfirestore version 8.10.0.3 and my maui project using .net7 because of the dependencies.

I don't know why but last week everything was fine and this week it broke.

I tried all solutions above:

  • my user nuget.config is modified to set the nuget folder by using nuget.exe config -set repositoryPath=C:\n and nuget.exe config -set globalPackagesFolder=C:\n
  • my nuget folder is at C:\n and is used during restores
  • my project is at C:\dev\XXXXXXXXXX\XXXXX\XXXXXXXXX\XXXXXXXXX\XXXXXXXXXXXXXXXXXXX.csproj (the count of X is related to the path)
  • I have long-paths enabled
  • I have the env-vars NUGET_PACKAGES and NUGET_PATH set just in case...
  • a fresh nuget.exe resides in C:\n\nuget.exe
  • Visual Studio Package restore fails with the error System.IO.PathTooLongException: 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.
  • a dotnet restore worked flawless
  • a dotnet build worked flawless
  • Visual Studio Build fails with the problem that iOS package can't be copied even the file exists:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4862,5): error MSB3021: Unable to copy file "C:\n\xamarin.firebase.ios.cloudfirestore\8.10.0.3\lib\net6.0-ios15.4\Firebase.CloudFirestore.resources\grpcpp.xcframework\ios-arm64_x86_64-simulator\grpcpp.framework\PrivateHeaders\src\core\tsi\alts\zero_copy_frame_protector\alts_zero_copy_grpc_protector.h" to "bin\Debug\net7.0-ios\iossimulator-x64\Firebase.CloudFirestore.resources\grpcpp.xcframework\ios-arm64_x86_64-simulator\grpcpp.framework\PrivateHeaders\src\core\tsi\alts\zero_copy_frame_protector\alts_zero_copy_grpc_protector.h". Could not find a part of the path 'bin\Debug\net7.0-ios\iossimulator-x64\Firebase.CloudFirestore.resources\grpcpp.xcframework\ios-arm64_x86_64-simulator\grpcpp.framework\PrivateHeaders\src\core\tsi\alts\zero_copy_frame_protector\alts_zero_copy_grpc_protector.h'.

Its about 134 files that can't be copied because of the "can't find file" issue.

For us the nuget package https://www.nuget.org/packages/Plugin.Firebase.Core/ with direct dependency to [Xamarin.Firebase.iOS.Core](https://www.nuget.org/packages/Xamarin.Firebase.iOS.Core/) (>= 8.10.0.3) for net6-ios16.0 is the issue, yet it worked a week before.

Ah yes, we also played around with the dotnet workload restore and dotnet workload repair as well as reairing (actually reset and reinstalling) visual studio just to make the day interesting.

Is there anything we can do?! We ran several times into such issues over the last year yet it was always fixable somehow.

I'm facing in the exact same situation and none of the solutions mentioned in this issue helped. This is extremely disappointing since it makes development practically impossible. Why is there no fix yet (as of September 2023) for this critical issue?

play4uman avatar Sep 09 '23 07:09 play4uman

1- Close all visual studio instances. 2- Run PowerShell as Administrator and exeute this command.

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

3- Create a new folder and name it "nuget" in C drive. 4- Again run PowerShell as Administrator and exeute this command

[Environment]::SetEnvironmentVariable("NUGET_PACKAGES", "C:\nuget" ,"Machine")

that's it ....:)

alzubitariq avatar Sep 12 '23 11:09 alzubitariq

1- Close all visual studio instances. 2- Run PowerShell as Administrator and exeute this command.

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

3- Create a new folder and name it "nuget" in C drive. 4- Again run PowerShell as Administrator and exeute this command

[Environment]::SetEnvironmentVariable("NUGET_PACKAGES", "C:\nuget" ,"Machine")

that's it ....:)

That's it for you. My setup had already all these steps, including an "n" folder on C: just to make the paths as short as possible.

SeriousM avatar Sep 12 '23 13:09 SeriousM

1- Close all visual studio instances. 2- Run PowerShell as Administrator and exeute this command.

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

3- Create a new folder and name it "nuget" in C drive. 4- Again run PowerShell as Administrator and exeute this command

[Environment]::SetEnvironmentVariable("NUGET_PACKAGES", "C:\nuget" ,"Machine")

that's it ....:)

Thank you, this was very helpful and solved the issue for me.

ciara-kyles-williams avatar Sep 12 '23 17:09 ciara-kyles-williams