Article ID: 941863 - Last Review: December 3, 2007 - Revision: 1.2 You may receive a System.ArgumentException exception when you use the XmlSerializer constructor to serialize a custom data type in a .NET Framework 2.0 applicationSYMPTOMSConsider the following scenario:
System.ArgumentException
Item has already been added. Key in dictionary: temp, Key being added: temp CAUSEThis problem occurs because two environment variables have the same name. For example, one environment variables is named temp, and another is named TEMP. RESOLUTIONTo resolve this problem, use one of the following methods:
STATUSREFERENCES
For more information about environment variables, click the following article numbers to view the articles in the Microsoft Knowledge Base:
310519
(http://support.microsoft.com/kb/310519/
)
How to manage environment variables in Windows XP
311933
(http://support.microsoft.com/kb/311933/
)
How to specify environment variables in project settings by using Visual C++ .NET or Visual C++ 2005
195050
(http://support.microsoft.com/kb/195050/
)
How to clear environment variables using Setx.exe
For more information about the Sgen.exe tool, visit the following Microsoft Developer Network (MSDN) Web site:http://msdn2.microsoft.com/en-us/library/bk3w6240(VS.80).aspx
(http://msdn2.microsoft.com/en-us/library/bk3w6240(VS.80).aspx)
| Article Translations
|
Back to the top
