I seem to be getting this error when I try to profile a specific WP7 project using the EQATEC Profiler
* ERROR: Could not process xap-file MusicApp.xap: An item with the same key has already been added. at
System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue
value, Boolean add) at Ionic.Zip.ZipFile.InternalAddEntry(String
name, ZipEntry entry) at
Ionic.Zip.ZipFile._InternalAddEntry(ZipEntry ze) at
Ionic.Zip.ZipFile.AddEntry(String entryName, Stream stream) at
Ionic.Zip.ZipFile.AddEntry(String entryName, Byte[] byteContent)
at EQATEC.AssemblyInjector.Engine.XAP.XAPPackage.Save(XAPPackage xap)
at
EQATEC.AssemblyInjector.Engine.Assembly.AssemblyScout.VisitDirectory(DirectoryInfo
inputdir, DirectoryInfo outputdir, String subpath)
EQATECProfilerEngine.ProcessApp: An item with the same key has already
been added.
Has anyone experienced this or know why this happens? Or perhaps knows a solution?
The new release 3.8.20 of EQATEC Profiler has this fixed. See the release history.
The problem would occur for WP7 or Silverlight apps if the xap-file contained the same file name more than once, maybe even using different path-separators. Here is a real example from another user’s xap-file:
The profiler would try to add the same file twice to the instrumented xap-file and fail. The new 3.8.20 will now simply skip any further duplicated files. Of course, you probably didn’t mean to add the same file twice to your MusicApp.xap so you should check your project for duplicate file entries.