SparkleXrm
SparkleXrm copied to clipboard
Cannot use spkl get-webresources
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)`
any update
@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 okay, I will try to find if I do have a web resource that shares the same path (without prefix) with other solution
@scottdurow, for example, I found some,
yo can see, as you say all the files have the same path except for the extension