Thanks to visit codestin.com
Credit goes to github.com

Skip to content

New command fails with error: System.ArgumentNullException: Value cannot be null. (Parameter 'source') #435

@sdellysse

Description

@sdellysse

Brief description of your issue

I was trying out wingetcreate for the first time so I might be messing this up due to lack of knowledge, but when I ran the new command with the url of the zip file I wanted to package up, i got the error

Steps to reproduce

wingetcreate version = 1.5.1.0

> wingetcreate new --out ~\Source\wingetcreate 'https://github.com/martinvonz/jj/releases/download/v0.8.0/jj-v0.8.0-x86_64-pc-windows-msvc.zip'

Expected behavior

Not sure, still a noob at this, but I figure it should download the file and move on to the next step

Actual behavior

❯ wingetcreate new --out ~\Source\wingetcreate 'https://github.com/martinvonz/jj/releases/download/v0.8.0/jj-v0.8.0-x86_64-pc-windows-msvc.zip'
Downloading and parsing: https://github.com/martinvonz/jj/releases/download/v0.8.0/jj-v0.8.0-x86_64-pc-windows-msvc.zip...
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at Microsoft.WingetCreateCore.PackageParser.ParsePackageAndGenerateInstallerNodes(InstallerMetadata installerMetadata, Manifests manifests)
   at Microsoft.WingetCreateCore.PackageParser.ParsePackage(InstallerMetadata installerMetadata, Manifests manifests)
   at Microsoft.WingetCreateCore.PackageParser.ParsePackages(List`1 installerMetadataList, Manifests manifests)
   at Microsoft.WingetCreateCLI.Commands.NewCommand.Execute()
   at Microsoft.WingetCreateCLI.Program.Main(String[] args)

Environment

❯ wingetcreate --help
Windows Package Manager Manifest Creator v1.5.1.0

Copyright (c) Microsoft Corporation. All rights reserved.

The manifest creation command line utility generates manifest for submitting
apps to the Windows Package Manager repo.

  new         Launches a series of questions to help generate a new manifest
  update      Updates fields of an existing manifest
  submit      Submits a valid manifest directly to the Windows Package Manager repo
  settings    Open settings
  token       Modifies the GitHub auth token cache
  cache       Manage downloaded installers stored in cache

More help can be found at: https://aka.ms/winget-create
Privacy statement: https://aka.ms/privacy
~
❯ winget --info
Windows Package Manager v1.5.1881
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.2134
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.1881.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions