[{"data":1,"prerenderedAt":171},["ShallowReactive",2],{"blog:2005:visualstudio2003systemargumentexceptionindebugger":3,"blogMore-Development":157,"comments-visualstudio2003systemargumentexceptionindebugger":170},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"category":11,"tags":12,"excerpt":17,"body":32,"_type":148,"_id":149,"_source":150,"_file":151,"_stem":152,"_extension":153,"url":154,"wordCount":155,"minutes":143,"commentCount":156},"/blog/2005/visualstudio2003systemargumentexceptionindebugger","2005",false,"en","Visual Studio 2003: System.ArgumentException in debugger","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.","2005-09-13T12:06:00+00:00","Development",[13,14,15,16],".NET","debugging","Visual Studio","VB.NET",{"type":18,"children":19},"root",[20,27],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25],{"type":26,"value":9},"text",{"type":21,"tag":22,"props":28,"children":29},{},[30],{"type":26,"value":31},"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:",{"type":18,"children":33,"toc":142},[34,38,45,49,60,65,70,76,81,86,103,109,124,129,134],{"type":21,"tag":22,"props":35,"children":36},{},[37],{"type":26,"value":9},{"type":21,"tag":39,"props":40,"children":42},"h2",{"id":41},"symptoms",[43],{"type":26,"value":44},"Symptoms",{"type":21,"tag":22,"props":46,"children":47},{},[48],{"type":26,"value":31},{"type":21,"tag":50,"props":51,"children":53},"pre",{"code":52},"\u003Cerror: an exception of type: {System.ArgumentException} occurred>\n",[54],{"type":21,"tag":55,"props":56,"children":58},"code",{"__ignoreMap":57},"",[59],{"type":26,"value":52},{"type":21,"tag":22,"props":61,"children":62},{},[63],{"type":26,"value":64},"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.",{"type":21,"tag":22,"props":66,"children":67},{},[68],{"type":26,"value":69},"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…",{"type":21,"tag":39,"props":71,"children":73},{"id":72},"solution",[74],{"type":26,"value":75},"Solution",{"type":21,"tag":22,"props":77,"children":78},{},[79],{"type":26,"value":80},"Close VS and delete all bin and obj directories from all projects in your solution if you want to be totally sure.",{"type":21,"tag":22,"props":82,"children":83},{},[84],{"type":26,"value":85},"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.",{"type":21,"tag":22,"props":87,"children":88},{},[89,91,101],{"type":26,"value":90},"You may think forcing a rebuild with “rebuild solution” would achieve this, but it ",{"type":21,"tag":92,"props":93,"children":94},"strong",{},[95],{"type":21,"tag":96,"props":97,"children":98},"em",{},[99],{"type":26,"value":100},"does not",{"type":26,"value":102},".",{"type":21,"tag":39,"props":104,"children":106},{"id":105},"cause-optional",[107],{"type":26,"value":108},"Cause (optional)",{"type":21,"tag":22,"props":110,"children":111},{},[112,114,122],{"type":26,"value":113},"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 ",{"type":21,"tag":92,"props":115,"children":116},{},[117],{"type":21,"tag":96,"props":118,"children":119},{},[120],{"type":26,"value":121},"used to",{"type":26,"value":123}," take 3, over a week ago.",{"type":21,"tag":22,"props":125,"children":126},{},[127],{"type":26,"value":128},"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.",{"type":21,"tag":22,"props":130,"children":131},{},[132],{"type":26,"value":133},"It must be a reproducible bug because it happened on two different machines.",{"type":21,"tag":22,"props":135,"children":136},{},[137],{"type":21,"tag":96,"props":138,"children":139},{},[140],{"type":26,"value":141},"[)amien",{"title":57,"searchDepth":143,"depth":143,"links":144},2,[145,146,147],{"id":41,"depth":143,"text":44},{"id":72,"depth":143,"text":75},{"id":105,"depth":143,"text":108},"markdown","content:blog:2005:visualstudio2003systemargumentexceptionindebugger.md","content","blog/2005/visualstudio2003systemargumentexceptionindebugger.md","blog/2005/visualstudio2003systemargumentexceptionindebugger","md","/blog/2005/visualstudio2003systemargumentexceptionindebugger/",305,0,[158,162,166],{"title":159,"date":160,"url":161},"HTML5 Video Cheatsheet: Optimizing videos for the web","2025-12-05T00:00:00Z","/blog/2025/html5-video-cheatsheet/",{"title":163,"date":164,"url":165},"Transactions in the MongoDB EF Core Provider","2025-10-25","/blog/2025/mongodb-explicit-transactions/",{"title":167,"date":168,"url":169},"Queryable Encryption with the MongoDB EF Core Provider","2025-09-22","/blog/2025/mongodb-queryable-encryption/",[],1779264598368]