Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

DownloadLatestCUs.ps1 - Broken - Change Int32 to Long

Open
#627 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
powershell
Domain
tooling

Research direction

Start with DownloadLatestCUs.ps1 and inspect how it invokes MSCatalog, then review MSCatalogUpdate.Class.ps1 at line 22 where SizeInBytes is assigned. Reproduce the download with an update larger than the Int32 range and verify that the update completes without the conversion error.

Written by the indexing model from the issue text.

Description

Looks like a problem downloading updates now.

I tend to get this error:

Cannot convert value "3212082007" to type "System.Int32". Error: "Value was either too large or too small for an Int32."
At C:\Program Files\WindowsPowerShell\Modules\MSCatalog\0.27.0\Classes\MSCatalogUpdate.Class.ps1:22 char:9
+         $this.SizeInBytes = [Int] $Cells[6].SelectNodes("span")[1].In ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvalidCastFromStringToInteger
Dominant language
PowerShell
Stars
1.3k
Forks
304
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/MSLab

All issues in microsoft/MSLab

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.