From 74709f73df1b87a1d4d3997da947dac3dea3697f Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Fri, 6 May 2022 16:44:03 -0400 Subject: [PATCH] Package publish crash fix and package files pre-populate bug fix (#12859) * refresh deps * accept nulls --- .../ViewModels/PackageManager/PublishPackageViewModel.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs index aa33a0be90e..ce79accf616 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs @@ -930,6 +930,10 @@ public static PublishPackageViewModel FromLocalPackage(DynamoViewModel dynamoVie } } + //after dependencies are loaded refresh package contents + vm.RefreshPackageContents(); + vm.UpdateDependencies(); + if (assembliesLoadedTwice.Any()) { vm.UploadState = PackageUploadHandle.State.Error; @@ -1339,7 +1343,7 @@ private void RemoveItem(object parameter) } PackageContents.Remove(PackageContents - .First(x => x.FileInfo.FullName == packageItemRootViewModel.FileInfo.FullName)); + .First(x => x.FileInfo?.FullName == packageItemRootViewModel.FileInfo.FullName)); } private bool CanShowAddFileDialogAndAdd()