Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Suddenly error when build: System.ArgumentException: An entry with the same key already exists (Read 3062 times)
GeeTee
Member
***
Offline


Posts: 103
Joined: Nov 10th, 2014
Suddenly error when build: System.ArgumentException: An entry with the same key already exists
Oct 28th, 2015 at 5:13pm
Print Post  
Help

This day I turned on my pc, build my project in Visual Studio and get this messge:

System.ArgumentException: An entry with the same key already exists.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.SortedList`2.Add(TKey key, TValue value)
   at Visual.Micro.MiroAppAPI.SketchBuilder.load()
   at Visual.Micro.MiroAppAPI.SketchBuilder.InitSketchBuilder()
   at Visual.Micro.MiroAppAPI.SketchBuilder..ctor(SketchEditor leditor, String path)
   at Visual.Micro.MiroAppAPI.SketchEditor.LoadSketch(String sketchFullFileName)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.CompileDo(Project oProject, Boolean IsDebugStartCommand)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.Compile(Project oProject, Boolean IsDebugStartCommand)

yet I CAN BUILD it in Arduioino ide.

Help?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Suddenly error when build: System.ArgumentException: An entry with the same key already exists
Reply #1 - Oct 28th, 2015 at 5:23pm
Print Post  
Which version of the arduino ide are you using?
Which board are you using?

« Last Edit: Nov 3rd, 2015 at 1:00pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
PJ
Newbies
*
Offline


Posts: 1
Joined: Nov 16th, 2017
Re: Suddenly error when build: System.ArgumentException: An entry with the same key already exists
Reply #2 - Nov 16th, 2017 at 10:45am
Print Post  
Hi, 

I have the same error :
Error during processing of the command. Please review or post the stack trace in the www.visualmicro.com forumAn entry with the same key already exists. (Visual.Micro.Visual.Studio.Arduino.Helper.SketchCompile)
System.ArgumentException: An entry with the same key already exists.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.SortedList`2.Add(TKey key, TValue value)
   at Visual.Micro.MiroAppAPI.SketchBuilder.load()
   at Visual.Micro.MiroAppAPI.SketchBuilder.InitSketchBuilder()
   at Visual.Micro.MiroAppAPI.SketchBuilder..ctor(SketchEditor leditor, String path)
   at Visual.Micro.MiroAppAPI.SketchEditor.LoadSketch(String sketchFullFileName)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.BuilderWrapperCreate(Object oProject)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.ExecCmd(String commandName)

Visual Studio Community Edition 2015 
Card Arduino M0 Pro
Arduino IDE 1.8.5

Thank by advance
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Suddenly error when build: System.ArgumentException: An entry with the same key already exists
Reply #3 - Nov 18th, 2017 at 1:16pm
Print Post  
Hi,

It sounds like the same file has been added to a project twice. 

You should see a better error but this can only happen if you added a short cut and then the physical file that is in the project already or possibly some other short cuts to files that are included as standard.

I can be more specific if you switch on vmicro>compiler>verbose and also the "show build properties" menu item. Then build and email the output along with a zip of you project to info[at]visualmicro.com

The next release also has better handling and reporting of this issue. The build should continue but a message should be displayed to say what the duplicate file or path is.
« Last Edit: Nov 18th, 2017 at 11:29pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint