Sitecore XPインスタンスにカスタムのソリューションをデプロイする際に、パッケージのサイズが2047MBを超えていると、パッケージのインストールが失敗する場合があります。以下のようなエラーがログに出力されます:
Exception: System.ArgumentOutOfRangeException Message: Specified argument was out of the range of valid values. Parameter name: count Source: System at System.IO.Compression.DeflateStream.ValidateParameters(Byte[] array, Int32 offset, Int32 count) at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count) at Sitecore.Zip.Utils.LimitedReadOnlyStream.Read(Byte[] buffer, Int32 offset, Int32 count) at Sitecore.Install.StreamUtil.Copy(Stream from, Stream to, Int32 bufferSize) at Sitecore.Install.Zip.PackageReader.Populate(ISink`1 sink) at Sitecore.Shell.Applications.Install.Dialogs.InstallPackage.InstallPackageForm.LoadPackage() at Sitecore.Shell.Applications.Install.Dialogs.InstallPackage.InstallPackageForm.ActivePageChanging(String page, String& newpage) at Sitecore.Web.UI.Pages.WizardForm.set_Active(String value)
Exception: System.IO.IOException Message: An attempt was made to move the file pointer before the beginning of the file. Source: mscorlib at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.SeekCore(Int64 offset, SeekOrigin origin) at System.IO.FileStream.Seek(Int64 offset, SeekOrigin origin) at Sitecore.Zip.ZipReader.d__0.MoveNext() at Sitecore.Zip.ZipReader.GetEntry(String entryName) at Sitecore.Install.Zip.PackageReader.Populate(ISink`1 sink) at Sitecore.Shell.Applications.Install.Dialogs.InstallPackage.InstallPackageForm.LoadPackage() at Sitecore.Shell.Applications.Install.Dialogs.InstallPackage.InstallPackageForm.ActivePageChanging(String page, String& newpage) at Sitecore.Web.UI.Pages.WizardForm.set_Active(String value) at Sitecore.Web.UI.HtmlControls.Button.DoClick(Message message)
この問題を解決するには、ソリューションをSitecore XP 10.1.0以降にアップグレードしてください。
または、一つの大きなパッケージを作るのではなく、最大許容サイズの2047MB(1.9GB)未満となるよう調整した、より小さい複数のパッケージに分割して作成することをご検討ください。