... This key is already associated with an element of this collection.
I am trying to create a package... and this cryptic message shows up. Any thoughts???
I am running VB6/SP6.
Printable View
... This key is already associated with an element of this collection.
I am trying to create a package... and this cryptic message shows up. Any thoughts???
I am running VB6/SP6.
Any chance to see your code with pointers to where the error occur?
that's the problem... no code to reference. This is happening in the Package & Deployment Wizard. It just pops this up and that is that.
Pretty useless, don't you think?
Somewhere, you've already added something into that collection the key you are trying to use, i.e.: if you've already used the key "thisismykey" when you added an object to that collection, and you try to add something else with the key of "thisismykey" then it will throw an error becuase that key is already in use.
*upon seeing the near-instantanious replies ahead of mine, and seeing that it doesn't involve the actual code, ignore this post. ;)
yea, but I haven't added anything to any collection!
I have checked my references and components in the application, and see nothing wacky. I will check again.
Do you remember which screen was showing when it happend?Quote:
Originally Posted by realbogus
I found it!
I had a control referenced twice... once as an OCX and again as an OCA.
I removed the OCX reference, recompiled and it seems to be a-ok!
I will test more.
That's very strange. I've created dozens of installation packages using the P&D Wizard without ever getting that error. I think you have two choices to resolve the problem: 1) Use Inno/Inno Script or some other 3rd party installer, or 2) edit the P&D Wizard (Setup1.VBP) and see if there is a collection inside and then use appropropriate debugging techniques.Quote:
Originally Posted by realbogus
it is a strange error, indeed.
I am in the process of creating the package... how does one select a silent install??? hm... time to do more research.
Why do you need to do that?Quote:
Originally Posted by realbogus
for network deployment...
Hi,
This error is usually seen if you kept Error Trapping to "Break on All Errors" instead of "Break on Unhandled Errors".
IN VBE, goto Tools, Options, General Tab, Error Trapping > "Break on Unhandled Errors".
Hi Martin,
I left it because, no matter how old the thread may be, people like me do come across such issues and would like to share the possible solution, if found, with other people.
If its too old for you, you need to make sure to close the thread to avoid further replies. Why have you kept it open?