SparkleXrm icon indicating copy to clipboard operation
SparkleXrm copied to clipboard

Cannot use spkl get-webresources

Open aboodh95 opened this issue 5 years ago • 4 comments
trafficstars

Hi,

I'm trying to use the command spkl get-webresources /s:ets where ets is my solution prefix, but I'm getting the error

The application terminated with an error. An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at SparkleXrm.Tasks.DownloadWebresourceConfigTask.ExecuteInternal(String filePath, OrganizationServiceContext ctx) at SparkleXrm.Tasks.BaseTask.Execute(String folder) at SparkleXrmTask.Program.RunTask(CommandLineArgs arguments, IOrganizationService service, ITrace trace) at SparkleXrmTask.Program.Run(CommandLineArgs arguments) at SparkleXrmTask.Program.Main(String[] args)`

aboodh95 avatar Mar 01 '20 12:03 aboodh95

any update

aboodh95 avatar Apr 04 '20 12:04 aboodh95

@aboodh95 This looks like you have some duplicate webresource names (excluding the prefix). There is a match list that is created to try and locate the local webresource by the file path (https://github.com/scottdurow/SparkleXrm/blob/spkl_dev/spkl/SparkleXrm.Tasks/Tasks/DownloadWebresourceConfigTask.cs#L80) - if there are multiple paths that are the same then it will try and add duplicates. I guess we will need to filter this to only get the webresources using the specified prefix

scottdurow avatar Apr 04 '20 13:04 scottdurow

@scottdurow okay, I will try to find if I do have a web resource that shares the same path (without prefix) with other solution

aboodh95 avatar Apr 04 '20 13:04 aboodh95

@scottdurow, for example, I found some, image yo can see, as you say all the files have the same path except for the extension

aboodh95 avatar Apr 04 '20 13:04 aboodh95