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

Error when installing 0.9.0 #356

Closed
lipkau opened this issue Jun 2, 2018 · 1 comment
Closed

Error when installing 0.9.0 #356

lipkau opened this issue Jun 2, 2018 · 1 comment

Comments

@lipkau
Copy link

lipkau commented Jun 2, 2018

Description

When installing platyPS version 0.9.0 from the gallery with Install-Module, I get the following error:

WARNING: NuGet: System.IO.InvalidDataException: Unable to read package from 
path 'platyPS.0.9.0.nupkg'. ---> System.IO.FileFormatException: File contains 
corrupted data.
WARNING: NuGet:    at 
MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Read(Byte[] buffer, Int32 
offset, Int32 count)
WARNING: NuGet:    at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Read(Byte[] 
buffer, Int32 offset, Int32 count)
WARNING: NuGet:    at System.Xml.XmlTextReaderImpl.InitStreamInput(Uri baseUri,
 String baseUriStr, Stream stream, Byte[] bytes, Int32 byteCount, Encoding 
encoding)
WARNING: NuGet:    at System.Xml.XmlTextReaderImpl.FinishInitStream()
WARNING: NuGet:    at System.Xml.XmlReaderSettings.CreateReader(Stream input, 
Uri baseUri, String baseUriString, XmlParserContext inputContext)
WARNING: NuGet:    at NuGet.XmlUtility.LoadSafe(Stream input, Boolean 
ignoreWhiteSpace)
WARNING: NuGet:    at NuGet.Manifest.ReadFrom(Stream stream, IPropertyProvider 
propertyProvider, Boolean validateSchema)
WARNING: NuGet:    at NuGet.LocalPackage.ReadManifest(Stream manifestStream)
WARNING: NuGet:    at NuGet.OptimizedZipPackage.EnsureManifest()
WARNING: NuGet:    at NuGet.LocalPackageRepository.OpenPackage(String path)
WARNING: NuGet:    --- End of inner exception stack trace ---
WARNING: NuGet:    at NuGet.LocalPackageRepository.GetPackage(Func`2 
openPackage, String path)
WARNING: NuGet:    at 
NuGet.LocalPackageRepository.<>c__DisplayClass13.<FindPackage>b__f(String path)
WARNING: NuGet:    at 
System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
WARNING: NuGet:    at 
System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
WARNING: NuGet:    at NuGet.LocalPackageRepository.FindPackage(Func`2 
openPackage, String packageId, SemanticVersion version)
WARNING: NuGet:    at 
NuGet.PackageRepositoryExtensions.FindPackage(IPackageRepository repository, 
String packageId, SemanticVersion version, IPackageConstraintProvider 
constraintProvider, Boolean allowPrereleaseVersions, Boolean allowUnlisted)
WARNING: NuGet:    at 
NuGet.DataServicePackage.EnsurePackage(IPackageCacheRepository cacheRepository)
WARNING: NuGet:    at NuGet.DataServicePackage.get_FrameworkAssemblies()
WARNING: NuGet:    at NuGet.PackageExtensions.HasProjectContent(IPackage 
package)
WARNING: NuGet:    at NuGet.PackageWalker.GetPackageInfo(IPackage package)
WARNING: NuGet:    at NuGet.PackageWalker.ProcessPackageTarget(IPackage 
package)
WARNING: NuGet:    at NuGet.PackageWalker.Walk(IPackage package)
WARNING: NuGet:    at NuGet.InstallWalker.ResolveOperations(IPackage package)
WARNING: NuGet:    at NuGet.PackageManager.Execute(IPackage package, 
IPackageOperationResolver resolver)
WARNING: NuGet:    at NuGet.PackageManager.InstallPackage(IPackage package, 
Boolean ignoreDependencies, Boolean allowPrereleaseVersions)
WARNING: NuGet:    at NuGet.Commands.InstallCommand.InstallPackage(IFileSystem 
fileSystem, String packageId, SemanticVersion version)
WARNING: NuGet:    at NuGet.Program.Main(String[] args)

Environment

Powershell 3
PowershellGet 1.0.0.1
PackageManagement 1.0.??
(Installation of PSv3 agent on TeamCity @ build.powershell.org)

Fix

By installing PackageManagement 1.6.5 (with a .msi installer), the module installs fine

@vors
Copy link
Collaborator

vors commented Jun 2, 2018

Thank you! Looks like PackageManagement issue. OneGet/oneget#363
I will try to publish new version from windows to reduce possible problems on older PS versions.

@vors vors closed this as completed Jun 2, 2018
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

3 participants
@vors @lipkau and others