我在MVC项目中做了一些小的更改,添加了新页面,并且开始出现关于Octopus部署的问题。我找不到问题所在。程序包是在TeamCity中创建的,可在Windows上使用。
Unable to download package:
Unable to read package from path 'Web.Position.1.1.1819.nupkg'.
System.IO.InvalidDataException: Unable to read package from path 'Web.Position.1.1.1819.nupkg'. ---> System.IO.FileFormatException: Format error in package.
at System.IO.Packaging.Package.GetParts()
at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean streaming)
at NuGet.OptimizedZipPackage.EnsureManifest()
at NuGet.LocalPackageRepository.OpenPackage(String path)
--- End of inner exception stack trace ---
at NuGet.LocalPackageRepository.OpenPackage(String path)
at NuGet.LocalPackageRepository.GetPackage(Func`2 openPackage, String path)
at NuGet.LocalPackageRepository.<>c__DisplayClass13.<FindPackage>b__f(String path)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at NuGet.LocalPackageRepository.FindPackage(Func`2 openPackage, String packageId, SemanticVersion version)
at NuGet.PackageRepositoryExtensions.FindPackage(IPackageRepository repository, String packageId, SemanticVersion version, IPackageConstraintProvider constraintProvider, Boolean allowPrereleaseVersions, Boolean allowUnlisted)
at NuGet.DataServicePackage.EnsurePackage(IPackageCacheRepository cacheRepository)
at NuGet.DataServicePackage.GetStream()
at NuGet.FileSystemExtensions.AddFileWithCheck(IFileSystem fileSystem, String path, Func`1 streamFactory)
at NuGet.LocalPackageRepository.AddPackage(IPackage package)
at Octopus.Core.Packages.PackageDownloader.AttemptToFindAndDownloadPackage(Int32 attempt, PackageIdentifier packageIdentifier, IFeed feed, String cacheDirectory, IPackage& downloadedPackage, String& path) in Y:\work\refs\tags\3.3.14\source\Octopus.Core\Packages\PackageDownloader.cs:line 155
at Octopus.Core.Packages.PackageDownloader.AttemptToDownload(PackageIdentifier packageIdentifier, IFeed feed) in Y:\work\refs\tags\3.3.14\source\Octopus.Core\Packages\PackageDownloader.cs:line 101
Octopus.Server version 3.3.14 (3.3.14+Branch.master.Sha.94cbad9d1e5d9a9515a90f390455374b9fbe30f8)
我在本地下载了此软件包,并通过“ Nuget NuPkg Viewer”检查了内容,看起来都很正确。我与以前的软件包进行了比较,没关系,我找不到任何区别。
我不知道该怎么办才能找到问题所在?
答案 0 :(得分:0)
几个小时后,我发现了我的问题。在开发过程中,我已将我的文件夹之一从projectmanager重命名为projectManager(将m更改为大写字母),然后遇到了这个问题。当我下载nuget软件包并将扩展名更改为.zip并尝试解压缩时,我警告说已经解压缩了相同的文件,并且如果我想覆盖此文件。当我打开该zip文件时,我注意到文件夹projectManager中有相同名称的重复文件。这样看来,在打包两个文件夹projectmanager和projectManager中创建的构建服务器,并且在解压缩期间存在重复文件的问题。