[{"data":1,"prerenderedAt":123},["ShallowReactive",2],{"blog:2005:visualstudio2003systemargumentexceptionindebugger":3,"blogMore-Development":109,"comments-visualstudio2003systemargumentexceptionindebugger":122},{"id":4,"title":5,"body":6,"category":89,"commentCount":90,"date":91,"description":12,"excerpt":92,"extension":93,"filenames":94,"hidden":95,"image":94,"meta":96,"minutes":84,"navigation":97,"path":98,"seo":99,"showCategory":94,"stem":100,"tags":101,"updated":94,"url":106,"wordCount":107,"__hash__":108},"content\u002Fblog\u002F2005\u002Fvisualstudio2003systemargumentexceptionindebugger.md","Visual Studio 2003: System.ArgumentException in debugger",{"type":7,"value":8,"toc":83},"minimark",[9,13,18,21,32,35,38,42,45,48,59,63,72,75,78],[10,11,12],"p",{},"I recently ran into a problem while debugging inside Visual Studio 2003.Net. Google couldn’t find me an answer, only a few other people with the same problem. Here’s my solution in the hope it might save somebody else some time.",[14,15,17],"h2",{"id":16},"symptoms","Symptoms",[10,19,20],{},"Whenever debugging a specific VB.NET application that used a C# class library I would receive the following error certain objects in the C# class library:",[22,23,28],"pre",{"className":24,"code":26,"language":27},[25],"language-text","\u003Cerror: an exception of type: {System.ArgumentException} occurred>\n","text",[29,30,26],"code",{"__ignoreMap":31},"",[10,33,34],{},"Strangely only the ASP.NET application was affected, the WinForms application that also used this class library was unaffected. It also seemed to be localized to the debugger only, run-time behavior appeared to be just fine.",[10,36,37],{},"A reboot, rebuild project or a clear down of the ASP temp directory had no effect and another developer on the project had exactly the same problem despite the fact we do not share any binaries…",[14,39,41],{"id":40},"solution","Solution",[10,43,44],{},"Close VS and delete all bin and obj directories from all projects in your solution if you want to be totally sure.",[10,46,47],{},"If you really don’t want to do this, deleting the .pdb’s from the project where the messed up object lives may be enough.",[10,49,50,51,58],{},"You may think forcing a rebuild with “rebuild solution” would achieve this, but it ",[52,53,54],"strong",{},[55,56,57],"em",{},"does not",".",[14,60,62],{"id":61},"cause-optional","Cause (optional)",[10,64,65,66,71],{},"While debugging I noticed that I couldn’t create the messed up object interactively either. It was complaining that no constructor took 4 arguments and that it took 3. Well, it ",[52,67,68],{},[55,69,70],{},"used to"," take 3, over a week ago.",[10,73,74],{},"This leads me to believe that some combination of changing your C# source can make either VS or the C# compiler believe the debugging symbols are still up to date when they are not. This may possibly only affect VB.NET applications compiled against it.",[10,76,77],{},"It must be a reproducible bug because it happened on two different machines.",[10,79,80],{},[55,81,82],{},"[)amien",{"title":31,"searchDepth":84,"depth":84,"links":85},2,[86,87,88],{"id":16,"depth":84,"text":17},{"id":40,"depth":84,"text":41},{"id":61,"depth":84,"text":62},"Development",0,"2005-09-13T12:06:00+00:00","[object Object]","md",null,false,{},true,"\u002Fblog\u002F2005\u002Fvisualstudio2003systemargumentexceptionindebugger",{"title":5,"description":12},"blog\u002F2005\u002Fvisualstudio2003systemargumentexceptionindebugger",[102,103,104,105],".NET","debugging","Visual Studio","VB.NET","\u002Fblog\u002F2005\u002Fvisualstudio2003systemargumentexceptionindebugger\u002F",305,"zaQQcB5_Y0JLdMp-bYLkHE_X23RG-Q8jM_ZTGfVvLVk",[110,114,118],{"title":111,"date":112,"url":113},"Transactions in the MongoDB EF Core Provider","2025-10-25","\u002Fblog\u002F2025\u002Fmongodb-explicit-transactions\u002F",{"title":115,"date":116,"url":117},"Queryable Encryption with the MongoDB EF Core Provider","2025-09-22","\u002Fblog\u002F2025\u002Fmongodb-queryable-encryption\u002F",{"title":119,"date":120,"url":121},"Lazy Loading with EF Core Proxies","2025-04-02","\u002Fblog\u002F2025\u002Fef-proxies\u002F",[],1780900533984]