Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program Crash while adding a Dependency #386

Closed
erikiorai opened this issue Jun 16, 2023 · 1 comment
Closed

Program Crash while adding a Dependency #386

erikiorai opened this issue Jun 16, 2023 · 1 comment
Assignees
Labels
dependencies Pull requests that update a dependency file Issue-Bug

Comments

@erikiorai
Copy link

Brief description of your issue

when trying to create a new manifest and then add a dependency an error shows up

 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.ArgumentException: Object of type 'System.Linq.Enumerable+SelectListIterator`2[System.String,System.String]' cannot be converted to type 'System.Collections.Generic.List`1[System.String]'.
   at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
   at System.Reflection.MethodBase.CheckArguments(StackAllocedArguments& stackArgs, ReadOnlySpan`1 parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
   at System.Reflection.RuntimeMethodInfo.InvokeOneParameter(Object obj, BindingFlags invokeAttr, Binder binder, Object parameter, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
   at Microsoft.WingetCreateCLI.PromptHelper.PromptList[T](String message, Object model, String memberName, IEnumerable`1 instance, Int32 minimum, Object validationModel, String validationName)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Microsoft.WingetCreateCLI.PromptHelper.PromptPropertyAndSetValue[T](Object model, String memberName, T instance, Int32 minimum, Object validationModel, String validationName)
   at Microsoft.WingetCreateCLI.PromptHelper.PromptPropertiesWithMenu[T](T model, String exitMenuWord, String modelName)
   at Microsoft.WingetCreateCLI.PromptHelper.PromptSubfieldProperties[T](T field, PropertyInfo property, Object model)
   at Microsoft.WingetCreateCLI.PromptHelper.PromptValue[T](String message, Object model, String memberName, T instance)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Microsoft.WingetCreateCLI.PromptHelper.PromptPropertyAndSetValue[T](Object model, String memberName, T instance, Int32 minimum, Object validationModel, String validationName)
   at Microsoft.WingetCreateCLI.PromptHelper.PromptPropertiesWithMenu[T](T model, String exitMenuWord, String modelName)
   at Microsoft.WingetCreateCLI.PromptHelper.DisplayInstallersAsMenuSelection(InstallerManifest installerManifest)
   at Microsoft.WingetCreateCLI.Commands.NewCommand.PromptPropertiesAndDisplayManifests(Manifests manifests)
   at Microsoft.WingetCreateCLI.Commands.NewCommand.Execute()
   at Microsoft.WingetCreateCLI.Program.Main(String[] args)```

### Steps to reproduce

In "Would you like to modify the optional default locale fields?" press Y and then go to dependency add a windows feature type NetFx3

### Expected behavior

The manifest file should be created

### Actual behavior

Program Crashes

### Environment

```shell
Windows Package Manager Manifest Creator v1.2.6.0
@ryfu-msft ryfu-msft added Issue-Bug dependencies Pull requests that update a dependency file labels Jun 22, 2023
@ryfu-msft ryfu-msft self-assigned this Jun 22, 2023
@ryfu-msft
Copy link
Contributor

Fixed by #390

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Issue-Bug
Projects
None yet
Development

No branches or pull requests

2 participants