Skip to content

Unable to install packages with long names #688

@CDTR-MattConroy

Description

@CDTR-MattConroy

Description

Trying to install Microsoft.Extensions.Logging (or any package with a more descriptive name) into a project in a folder with a similarly descriptive name, e.g. Organisation.Technology.Functionality, fails with the following Exception:

Unable to install package Microsoft.Extensions.DependencyInjection.Abstractions 8.0.2
System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\git\Organisation.Technology.Functionality\Organisation.Technology.Functionality\Packages\nuget-packages\InstalledPackages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.2\buildTransitive\netcoreapp2.0\Microsoft.Extensions.DependencyInjection.Abstractions.targets"
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <ecf276dcb8654fa5bed2c5ea1a4ad870>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in <ecf276dcb8654fa5bed2c5ea1a4ad870>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean useAsync) [0x00000] in <ecf276dcb8654fa5bed2c5ea1a4ad870>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool)
  at System.IO.Compression.ZipFileExtensions.ExtractToFile (System.IO.Compression.ZipArchiveEntry source, System.String destinationFileName, System.Boolean overwrite) [0x00024] in <b0d4c9927a2d4e4fa232200926d965fe>:0 
  at NugetForUnity.PackageContentManager.ExtractPackageEntry (System.IO.Compression.ZipArchiveEntry entry, System.String baseDir, System.Int32 skipEntryLength) [0x000e5] in .\Library\PackageCache\com.github-glitchenzo.nugetforunity@4.2.0\Editor\PackageContentManager.cs:326 
  at NugetForUnity.NugetPackageInstaller.Install (NugetForUnity.Models.INugetPackage package, System.Boolean refreshAssets, System.Boolean isSlimRestoreInstall, System.Boolean allowUpdateForExplicitlyInstalled) [0x00695] in .\Library\PackageCache\com.github-glitchenzo.nugetforunity@4.2.0\Editor\NugetPackageInstaller.cs:293 
UnityEngine.Debug:LogErrorFormat (string,object[])
NugetForUnity.NugetPackageInstaller:Install (NugetForUnity.Models.INugetPackage,bool,bool,bool) (at ./Library/PackageCache/com.github-glitchenzo.nugetforunity@4.2.0/Editor/NugetPackageInstaller.cs:357)
NugetForUnity.NugetPackageInstaller:Install (NugetForUnity.Models.INugetPackageIdentifier,bool,bool,bool) (at ./Library/PackageCache/com.github-glitchenzo.nugetforunity@4.2.0/Editor/NugetPackageInstaller.cs:74)
NugetForUnity.NugetPackageInstaller:Install (NugetForUnity.Models.INugetPackage,bool,bool,bool) (at ./Library/PackageCache/com.github-glitchenzo.nugetforunity@4.2.0/Editor/NugetPackageInstaller.cs:181)
NugetForUnity.NugetPackageInstaller:Install (NugetForUnity.Models.INugetPackageIdentifier,bool,bool,bool) (at ./Library/PackageCache/com.github-glitchenzo.nugetforunity@4.2.0/Editor/NugetPackageInstaller.cs:74)
NugetForUnity.NugetPackageInstaller:Install (NugetForUnity.Models.INugetPackage,bool,bool,bool) (at ./Library/PackageCache/com.github-glitchenzo.nugetforunity@4.2.0/Editor/NugetPackageInstaller.cs:181)
NugetForUnity.NugetPackageInstaller:Install (NugetForUnity.Models.INugetPackageIdentifier,bool,bool,bool) (at ./Library/PackageCache/com.github-glitchenzo.nugetforunity@4.2.0/Editor/NugetPackageInstaller.cs:74)
NugetForUnity.Ui.NugetWindow:DrawPackage (NugetForUnity.Models.INugetPackage,UnityEngine.GUIStyle,bool) (at ./Library/PackageCache/com.github-glitchenzo.nugetforunity@4.2.0/Editor/Ui/NugetWindow.cs:1133)
NugetForUnity.Ui.NugetWindow:DrawPackages (System.Collections.Generic.IEnumerable`1<NugetForUnity.Models.INugetPackage>,bool) (at ./Library/PackageCache/com.github-glitchenzo.nugetforunity@4.2.0/Editor/Ui/NugetWindow.cs:721)
NugetForUnity.Ui.NugetWindow:DrawOnline () (at ./Library/PackageCache/com.github-glitchenzo.nugetforunity@4.2.0/Editor/Ui/NugetWindow.cs:626)
NugetForUnity.Ui.NugetWindow:OnGUI () (at ./Library/PackageCache/com.github-glitchenzo.nugetforunity@4.2.0/Editor/Ui/NugetWindow.cs:352)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
  • NuGet Package: Microsoft.Extensions.Logging
  • NuGetForUnity Version: 4.2.0
  • Unity Version: 2023.2.20f1
  • Operating System: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions