尝试安装 Visual Studio 2010 的 Productivity Power Tools 时出错
我已在两台不同的计算机上尝试过,并多次尝试下载,但每当我尝试在 VS 2010 Premium (10.0.30139.1 RTMRel) 中安装 Productivity Power Tools 扩展时,都会收到错误“该文件不是有效的 VSIX 包” ”。搜索显示只有一两个人遇到过这个问题。我该如何诊断这个问题?
编辑:为了响应下面亚伦的建议,我运行了代码,结果如下:
at MS.Internal.IO.Zip.ZipIOLocalFileDataDescriptor.ParseRecord(BinaryReader reader, Int64 compressedSizeFromCentralDir, Int64 uncompressedSizeFromCentralDir, UInt32 crc32FromCentralDir, UInt16 versionNeededToExtract)
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.ParseRecord(BinaryReader reader, String fileName, Int64 position, ZipIOCentralDirectoryBlock centralDir, ZipIOCentralDirectoryFileHeader centralDirFileHeader)
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.SeekableLoad(ZipIOBlockManager blockManager, String fileName)
at MS.Internal.IO.Zip.ZipIOBlockManager.LoadLocalFileBlock(String zipFileName)
at MS.Internal.IO.Zip.ZipArchive.GetFile(String zipFileName)
at MS.Internal.IO.Zip.ZipArchive.GetFiles()
at System.IO.Packaging.ZipPackage.ContentTypeHelper..ctor(ZipArchive zipArchive, IgnoredItemHelper ignoredItemHelper)
at System.IO.Packaging.ZipPackage..ctor(Stream s, FileMode mode, FileAccess access, Boolean streaming)
at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean streaming)
at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess)
at VSIXReadTest.Program.Main(String[] args) in C:\\Development\\WebSockets\\PowerTools\\Program.cs:line 17
我已经多次下载该文件,每次都有相同的结果,这表明我的文件系统或 打包
库。
I have tried on two different machines, and tried the download several times, but whenever I try and install the Productivity Power Tools extension in VS 2010 Premium (10.0.30139.1 RTMRel), I get the error "The file is not a valid VSIX package." A search reveals only one or two other people have ever experienced this issue. How can I go about diagnosing this issue?
EDIT: In response to Aaron's suggestion below, I ran the code with the following result:
at MS.Internal.IO.Zip.ZipIOLocalFileDataDescriptor.ParseRecord(BinaryReader reader, Int64 compressedSizeFromCentralDir, Int64 uncompressedSizeFromCentralDir, UInt32 crc32FromCentralDir, UInt16 versionNeededToExtract)
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.ParseRecord(BinaryReader reader, String fileName, Int64 position, ZipIOCentralDirectoryBlock centralDir, ZipIOCentralDirectoryFileHeader centralDirFileHeader)
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.SeekableLoad(ZipIOBlockManager blockManager, String fileName)
at MS.Internal.IO.Zip.ZipIOBlockManager.LoadLocalFileBlock(String zipFileName)
at MS.Internal.IO.Zip.ZipArchive.GetFile(String zipFileName)
at MS.Internal.IO.Zip.ZipArchive.GetFiles()
at System.IO.Packaging.ZipPackage.ContentTypeHelper..ctor(ZipArchive zipArchive, IgnoredItemHelper ignoredItemHelper)
at System.IO.Packaging.ZipPackage..ctor(Stream s, FileMode mode, FileAccess access, Boolean streaming)
at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean streaming)
at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess)
at VSIXReadTest.Program.Main(String[] args) in C:\\Development\\WebSockets\\PowerTools\\Program.cs:line 17
I have downloaded the file several times, each with the same result, suggesting to me that there is something different or wrong with my file system or the Packaging
library.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我是为 Visual Studio 2010 编写 VSIX/扩展管理器的团队中的一名开发人员,所以也许我可以在这里提供帮助。 VSIX 文件是一个 OPC 容器(基本上是一个带有一些额外约束的 zip 文件)。正如您所期望的,我们使用托管 OPC API 来打开文件(即 .NET 中的 System.IO.Packaging 命名空间)。仅当对 ZipPackage.Open 的调用失败时,才会出现此错误消息。
您能否尝试将以下代码编译到您计算机上的 C# 控制台应用程序(针对 .NET 4.0)并查看结果是什么?您还需要添加对 WindowsBase 的程序集引用。如果这里有错误,我们当然想了解更多信息!
I'm a developer on the team that wrote the VSIX/Extension Manager for Visual Studio 2010, so perhaps I can help out here. A VSIX file is an OPC container (basically a zip file with a few extra constraints). As you might expect, we use the Managed OPC API's to open the file (i.e. the System.IO.Packaging namespace in .NET). This error message should only occur if the call to ZipPackage.Open fails.
Could you try compiling the following code into a C# console application (targetting .NET 4.0) on your machine and seeing what the results are? You'll need to also add an assembly reference to WindowsBase. If there is a bug here, we'd certainly like to know more about it!
.VSIX 文件实际上是一个 .ZIP 文件。尝试重命名它,看看里面有什么。也许这只是下载损坏的问题?我已经尝试过此链接 http://visualstudiogallery.msdn.microsoft.com /d0d33361-18e2-46c0-8ff2-4adea1e34fef/ 我自己,它似乎工作正常。
A .VSIX file is in fact a .ZIP file undercovers. Try to rename it and see what you have inside. Maybe it's just a corrupted download issue? I have tried this link http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/ myself and it seems to work fine.