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
Hot Topic (More than 8 Replies) "Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException" everywhere! (Read 3059 times)
Flavio
Newbies
*
Offline


Posts: 5
Joined: Dec 26th, 2023
"Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException" everywhere!
Dec 28th, 2023 at 12:47am
Print Post  
Hi everybody!

Updated my VS Micro 1 year license 3 days ago, and updated VSMicro also (an very old version).

Now, nothing works anymore.

1- Creating new projects or building then, I got the errors below.

Code
Select All
*Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at Visual.Micro.Utils.CompilerStringReplacer.replaceFromMapping(String src, Dictionary`2 map, String leftDelimiter, String rightDelimiter, Boolean doubleEscape, Boolean useShortPaths)
   at Visual.Micro.Utils.CompilerStringReplacer.formatAndSplit(String src, Dictionary`2 dict, Boolean recursive, Boolean bDoubleQuotedArgs, Boolean clearUnused, Boolean shortPaths, Boolean escapeStrings)
   at Visual.Micro.Utils.MCUPreferencesMap.getMergeAndEmpty(String pName)
   at Visual.Micro.MiroAppAPI.SketchCompilerArduino.getCommandFromRecipe(String recipe, String avrBasePath, List`1 includePaths, String sourceName, MCUPreferencesMap properties)
   at tForIntellisense(FileInfo codeFile, MCUPreferencesMap boardPreferences, List`1 includePaths, List`1 extraCmdParams, SketchBuilder lsketch)
   at llisense(SketchBuilder lsketch, Board brd, String srcFilename)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp._RefreshIntellisenseOfSketch(Object oProject, SketchBuilder sk)

 



Code
Select All
Compiling debug version of 'Test' for 'ATmega2560 (Mega 2560) (Arduino/Genuino Mega)(mega_atmega2560)'
Visual Studio Version: 2022 [17.0]
Build Folder: "file:///C:/Users/flavi/AppData/Local/Temp/VMBuilds/Test/mega_atmega2560/Debug"
Additional Defines: VM_DBT_HARDWARESERIAL 0;VM_DBT_SOFTWARESERIAL 1;VM_DBT_FASTSERIAL 2;VM_DBT_USB 3;VM_DBT_TEENSY 4;VM_DBT_UART 5;VM_DBT_USART 6;VM_DBT_USBSERIAL 7;VM_DBT_TTYUART 8;VM_DBT_NET_CONSOLE 9;VM_DBT_Uart 10;VM_DBT_COSA 11;VM_DBT_CDCSerialClass 12;VM_DBT_HARDWARESERIAL1 13;VM_DBT_HARDWARESERIAL2 14;VM_DBT_HARDWARESERIAL3 15;VM_DBT_NET_UDP 16;VM_DBT_USBAPI 17;VM_DBT_SERIALUSB 18;VM_DBT_MS430_SERIAL_ 19;VM_DBT_NO_SERIAL 20;VM_DBT_GENERIC_OBJECT 21;VM_DEBUG_ENABLE 1;VM_DEBUG;VM_DEBUG_BANDWIDTH_THROTTLE_MS 50;VM_DEBUGGER_SOFT_TRANSPORT Serial;VM_DEBUGGER_SOFT_TRANSPORT_WRITER Serial;VM_DBT VM_DBT_GENERIC_OBJECT;VM_DEBUG_BREAKPAUSE;
Api: 2.2023.1212-0
Sketch Book: "file:///C:/Users/flavi/Documents/Arduino"
User Libraries: "file:///C:/Users/flavi/Documents/Arduino/libraries"
Build Temp: "file:///C:/Users/flavi/AppData/Local/Temp/VMBuilds/Test/mega_atmega2560/Debug"
Board Support Urls: "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json,https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json,https://adafruit.github.io/arduino-board-index/package_adafruit_index.json,"
Core Include Paths
Include Path ino"
Include Path ega"

Deep search for libraries ...
Error: Unable to resolve macros for include
C:\Users\flavi\AppData\Local\Temp\VMBuilds\Test\mega_atmega2560\Debug\Test.cpp
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at Visual.Micro.Utils.CompilerStringReplacer.replaceFromMapping(String src, Dictionary`2 map, String leftDelimiter, String rightDelimiter, Boolean doubleEscape, Boolean useShortPaths)
   at Visual.Micro.Utils.CompilerStringReplacer.formatAndSplit(String src, Dictionary`2 dict, Boolean recursive, Boolean bDoubleQuotedArgs, Boolean clearUnused, Boolean shortPaths, Boolean escapeStrings)
   at Visual.Micro.Utils.MCUPreferencesMap.getMergeAndEmpty(String pName)
   at Visual.Micro.MiroAppAPI.SketchCompilerArduino.getCommandFromRecipe(String recipe, String avrBasePath, List`1 includePaths, String sourceName, MCUPreferencesMap properties)
   at Visual.Micro.MiroAppAPI.SketchCompilerArduino.CompileRecipeCaptureError(String sRecipe, FileInfo codeFile, MCUPreferencesMap brdPrefs, List`1 includePaths, List`1 extraCmdParams)
   at CUPreferencesMap properties, List`1 includePaths, String srcFilename)
   at String sourceFilePath, Board brd, List`1 includePaths, String targetFileNameNoPath)
   Object reference not set to an instance of an object


	An error was encountered during the 'Deep Search' library discovery process.
Debug build failed for project 'Test'

 



2- Old projects converted with the "Convert Solution To Latest Format (Affects Arduino Project(s) Intellisense Only. Required!) " option, I get the same errors too.

3- Uninstalled and installed VS Studio (Community Edition 2022) with the same options before (described in 
https://www.visualmicro.com/page/User-Guide.aspx?doc=Getting-started.html) and I get the same errors messages.

Any suggestion to fix the problem?
Or any way to use an old version of Visual Micro (before this new Linux stuff) until a new version with fix?

Best regards!


Attached file with logs.
Sent email with all logs and projects.

.
« Last Edit: Dec 28th, 2023 at 1:18pm by Flavio »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: "Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException" everywhere!
Reply #1 - Dec 28th, 2023 at 5:26pm
Print Post  
Thanks for the email with files.

Visual Micro has never supported "folder only" projects. It uses standard Visual Studio projects and solutions.

I see in your zip you have the sketch1 folder. Open the .sln from that folder using "file>open>project or solution". The solution is in "[your project folders]\Sketch1\Sketch1"

« Last Edit: Dec 28th, 2023 at 6:03pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Flavio
Newbies
*
Offline


Posts: 5
Joined: Dec 26th, 2023
Re: "Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException" everywhere!
Reply #2 - Dec 28th, 2023 at 7:06pm
Print Post  
Thanks for reply.

I'm aware of that. I'm using Visual Micro for at least 6 years.

I always open the .sln file, with VS "Open Project or Solution" menu option.
The .zip projects I sent by email are not "folder only" projects.
I zipped them as they were in my File System, to not miss any file for evidence.

"Sketch1" was created using the "New Project" window, like as described here: https://www.visualmicro.com/page/User-Guide.aspx?doc=Create-New-project.html.

As soon the project was created by the IDE, I get the error in log "NewProjectLoadError.txt" in the IDE log window.
And trying to compile it, I get the error in "NewProjectBuildError.txt".

"TesteRele" is an old project I have, that I converted with "Convert Solution To Latest Format (Affects Arduino Project(s) Intellisense Only. Required!)" option, and after that, I' having the same issues of "Sketch1".
(files "OldProjectIntellisenseConvertionError.txt" and "OldProjectBuildError.txt")

I believe these problems are related to the problem exposed here, because it's the same exception:
https://www.visualmicro.com/forums/YaBB.pl?num=1702069374/4#4

Some key that's missing in the .sln file.

.

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: "Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException" everywhere!
Reply #3 - Dec 28th, 2023 at 7:31pm
Print Post  
Are right sorry ignore my prev post.

The projects converted without issue. 

I suspect the errors you see relate to the toolchain you have installed. Visual Micro is expecting a property that is missing. It's possible we need to ignore the error and not show it or it might be a toolchain issue. We don't get the issue.

Please follow the guide in the yellow box near the top of this page so that we can see your config.

Thanks
  
Back to top
IP Logged
 
Flavio
Newbies
*
Offline


Posts: 5
Joined: Dec 26th, 2023
Re: "Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException" everywhere!
Reply #4 - Dec 28th, 2023 at 7:47pm
Print Post  
You mean config information from build with " Show Build Properties" option enabled?

If yes, I already sent it by email when creating the topic yesterday. Files:
NewProjectBuildError.txt (Sketch1)
OldProjectBuildError.txt (TesteRele)


The email also has a print from the Visual Studio Installer options.

Please, check if you need more information.
Thanks.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: "Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException" everywhere!
Reply #5 - Dec 28th, 2023 at 10:18pm
Print Post  
Thanks, I see you are using an old version of arduino IDe we will need to test with that version to see what property was missing

A quick workaround would be to select the Visual Micro (No IDE) app from the toolbar and then installing avr via the Board Manager. Use the Visual Micro (No IDE) app instead of the "Arduino 1.6/1.8" app.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: "Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException" everywhere!
Reply #6 - Dec 31st, 2023 at 10:06pm
Print Post  
Moved new conversation to 

Moved here
« Last Edit: Dec 31st, 2023 at 10:08pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: "Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException" everywhere!
Reply #7 - Jan 2nd, 2024 at 5:17pm
Print Post  
Thanks for the detail around this, can you try the latest release (24.0102.00) which is available from the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
IP Logged
 
Flavio
Newbies
*
Offline


Posts: 5
Joined: Dec 26th, 2023
Re: "Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException" everywhere!
Reply #8 - Jan 3rd, 2024 at 1:36am
Print Post  
Thanks for your reply!

Unfortunately it didn't work.
I got the same errors as before, on new projects and old ones.

This time I tried to build the project with Arduino 1.6.7, 1.8.19, Arduino 2 and "Visual Micro (No IDE)" options.

I sent by e-mail all the logs and prints from my tests with a new project.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: "Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException" everywhere!
Reply #9 - Jan 3rd, 2024 at 9:55am
Print Post  
Thanks for the update and apologies for the incomplete fix, can you try the updated release (24.0102.01)?
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
IP Logged
 
Flavio
Newbies
*
Offline


Posts: 5
Joined: Dec 26th, 2023
Re: "Linux/FolderOnly intelli - System.Collections.Generic.KeyNotFoundException" everywhere!
Reply #10 - Jan 5th, 2024 at 12:49am
Print Post  
It worked!!   Cheesy

Compiled and uploaded new and my projects with Arduino 1.6.7, 1.8.19, Arduino 2 and "Visual Micro (No IDE)" options.

Thanks for your help!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint