You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.
If the users deletes the package cache folder in most cases, a simple KPM restore will fix this back up. This seems to be a fairly common scenario when using * versioning to ensure a new version is picked up.
I routinely delete this folder while VS is still running. When I do that, any DLL that was loaded at the time won't be delete-able due to the file handles open to it. That means I end up with package directories that ONLY contain something like this:
C:\Users\mattgal\.k\packages\Microsoft.Framework.Logging\1.0.0-beta4-10858\lib\aspnet50\Microsoft.Framework.Logging.dll (because I was running something using this DLL at the time...)
Now, I've put my machine into a state that kpm command line tools don't know how to handle and which do not get a helpful error message:
System.IO.FileNotFoundException: Could not find file 'C:\Users\mattgal\.k\packages\Microsoft.Framework.Logging\1.0.0-beta4-10858\Microsoft.Framework.Logging.nuspec'.
File name: 'C:\Users\mattgal\.k\packages\Microsoft.Framework.Logging\1.0.0-beta4-10858\Microsoft.Framework.Logging.nuspec'
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 se
cAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at NuGet.PhysicalFileSystem.OpenFile(String path)
at NuGet.UnzippedPackage.EnsureManifest()
at NuGet.UnzippedPackage..ctor(IFileSystem fileSystem, String manifestPath)
at NuGet.PackageInfo.get_Package()
at Microsoft.Framework.Runtime.NuGetDependencyResolver.FindCandidate(String name, SemanticVersionRange versionRange)
at Microsoft.Framework.Runtime.NuGetDependencyResolver.GetDescription(LibraryRange libraryRange, FrameworkName targetFramework)
at Microsoft.Framework.PackageManager.LocalWalkProvider.FindLibrary(LibraryRange libraryRange, FrameworkName targetFramework)
at Microsoft.Framework.PackageManager.RestoreOperations.<>c__DisplayClass8_0.<FindLibraryByVersion>b__2(IWalkProvider provider)
at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibrary>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
When such an invalid state is detected, either a corrective action should be suggested via error text, or (I'd be fine with this) just blow away that package folder if you can find a version-matching package.
The text was updated successfully, but these errors were encountered:
ChengTian
changed the title
KPM restore behavior needs to accommodate corrupted k package cache
"dnu restore" should check whether an installed package is corrupted
Jul 23, 2015
If the users deletes the package cache folder in most cases, a simple KPM restore will fix this back up. This seems to be a fairly common scenario when using * versioning to ensure a new version is picked up.
I routinely delete this folder while VS is still running. When I do that, any DLL that was loaded at the time won't be delete-able due to the file handles open to it. That means I end up with package directories that ONLY contain something like this:
Now, I've put my machine into a state that kpm command line tools don't know how to handle and which do not get a helpful error message:
When such an invalid state is detected, either a corrective action should be suggested via error text, or (I'd be fine with this) just blow away that package folder if you can find a version-matching package.
The text was updated successfully, but these errors were encountered: