Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Error opening/creating Arduino project (VS2015) (Read 531 times)
Xfer
Newbies
*
Offline



Posts: 9
Error opening/creating Arduino project (VS2015)
Jun 1st, 2019 at 4:46pm
 
Hello everyone.
First post but long time licensed VisualMicro user. Great tool.

Just updated my VM extension (Visual Studio Community 2015 here) and now I can't open/create Arduino projects anymore. Worked fine before the last update.

Visual Studio 2015 in itself works fine (I can create/open Windows C++ projects just fine).

Reported error is:

Code:
Error during processing of the command. Please review or post the stack trace in the www.visualmicro.com forumObject reference not set to an instance of an object. (Visual.Micro.Visual.Studio.Arduino.Helper.SolutionOpenArduinoSketch)
System.NullReferenceException: Object reference not set to an instance of an object.
   at Visual.Micro.MiroAppAPI.SketchUtils.OpenSketchFilePicker(MCUApplication mcuApp)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.ExecCmd(String commandName)
 



Visual Micro version:
1903.18.1

Operating system is:
Windows 10 Pro (64 bit)
Version 1809
Build 17763.529

Visual Studio is:
Visual Studio Community 2015
Version 14.0.2543101 Update 3

Things I tried:
Close/reopen Visual Studio
Restart the PC
Unistall/reinstall Visual Micro

Nothing worked.  Sad

What could I try? Is there a previous version of VM available?

Thanks
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10478
United Kingdom
Re: Error opening/creating Arduino project (VS2015)
Reply #1 - Jun 1st, 2019 at 5:25pm
 
hi

Previous versions are in the releases section of this gallery.

questions

Is visual micro showing okay apart from that?

Does file>open>project work?

Does file>new>project work?

Are you using the community version of visual studio?
Back to top
 
WWW  
IP Logged
 
Xfer
Newbies
*
Offline



Posts: 9
Re: Error opening/creating Arduino project (VS2015)
Reply #2 - Jun 1st, 2019 at 5:28pm
 
1) Yes all VM-related menus are showing ok

I already stated what you asked:
2) Yes but only non-Arduino projects
3) Yes but only non-Arduino projects
4) Yes, VS Community 2015, so I downloaded the appropriate 2012-2015 version of VM extension
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10478
United Kingdom
Re: Error opening/creating Arduino project (VS2015)
Reply #3 - Jun 1st, 2019 at 5:39pm
 
Sorry but there is some confusion.

You only have to use File>Open Arduino Project" to open an Arduino project for the very first time. This allows Visual Micro to create the solution/project for you. After you have opened a sketch once you can open with File>Open or any other vs command to open the project or solution,

So it is possible to create a new project using File>New>Project>C++>Arduino Project
and
it is possible to open a project you have already worked on using File>Open>Project

These two options do not use the functions you have reported an error for.

Does file>open>project work?
Does file>new>project work?




Back to top
 
WWW  
IP Logged
 
Xfer
Newbies
*
Offline



Posts: 9
Re: Error opening/creating Arduino project (VS2015)
Reply #4 - Jun 1st, 2019 at 6:13pm
 
File->Open->Project->Arduino Project does not work
File->New->Project->Arduino Project does not work

Used to work with the previous VM version.

All other project types work (C++ etc.)

I always opened existing Arduino projects (even if created with VM) via File->Open->Arduino Project.

Never tried (not even with previous VM versions) to open an Arduino project another way, so not sure what you are asking.
Back to top
 
 
IP Logged
 
Xfer
Newbies
*
Offline



Posts: 9
Re: Error opening/creating Arduino project (VS2015)
Reply #5 - Jun 1st, 2019 at 6:20pm
 
I'm happy to report that version:

1811.24.0

works well with VS 2015 Community.
I uninstalled the last version (1903.18.1), installed 1811.24.0, and now everything's back to normal: I can open and create Arduino Projects just fine.

Thanks for the support.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10478
United Kingdom
Re: Error opening/creating Arduino project (VS2015)
Reply #6 - Jun 1st, 2019 at 6:54pm
 
Thanks for the info.

A point to note that might save you some time. When you have opened an arduino .ino the first time then visual micro creates a c++ project file for you (vcxproj). This is a standard Visual Studio project which Visual Micro will open on future occasions using "file>open>arduino project".

When you subsequently use File>Open>Project or any of the standard VS open commands you will be able to navigate to where your arduino project is and open the project. Then visual studio will put the project on the "File>Recent>Project/Solutions" menu. It gives you one click access to your project, arduino projects are no different from a c++ project.

To create a new project don;t you use "file>new>project>c++>arduino project"?


ps: you should upgrade to vs2017 community. The visual micro version for 2012-2015 is now obsolete on a slow updates cycle if any. 2017 is better than 2015 anyway.
Back to top
« Last Edit: Jun 1st, 2019 at 6:55pm by Visual Micro »  
WWW  
IP Logged
 
Xfer
Newbies
*
Offline



Posts: 9
Re: Error opening/creating Arduino project (VS2015)
Reply #7 - Jun 1st, 2019 at 9:00pm
 
Can't update to VS2017 due to legacy (non-Arduino) projects I have to work with (distributed team all stick to VS2015 etc.).

To create a new project Arduino I use:
File->New->Arduino Project

which now works again, with the older 1811.24.0.
It's a bit disappointing the new 1903.18.1 does not work, but not a big issue after all.  Wink

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



Posts: 10478
United Kingdom
Re: Error opening/creating Arduino project (VS2015)
Reply #8 - Jun 1st, 2019 at 9:14pm
 
Yes not idea why the open doesn't work. There haven't been other reports and it works okay for me in 2012-2015. It's a simple function that opens the standard windows file dialog. The only thing that has changed is the .net version we build for.

The open really isn't required unless you are opening an arduino .ino for the first time in which case file>open>file does the same thing.

We will try to add some more diagnostics for the next release
Back to top
 
WWW  
IP Logged
 
Xfer
Newbies
*
Offline



Posts: 9
Re: Error opening/creating Arduino project (VS2015)
Reply #9 - Jun 2nd, 2019 at 8:53am
 
To give more details, I temporarely reinstalled the problematic last version on VS2015

When I select "File->Open->Arduino Project" or "File->New->Arduino Project", an error popup occurs:

"Visual Micro
This feature requires an ide application to be selected"


and after that, the error I reported in the first post.

Hope this helps.
As I said, reverting to the 1811.24.0 brings everything working again.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10478
United Kingdom
Re: Error opening/creating Arduino project (VS2015)
Reply #10 - Jun 2nd, 2019 at 12:31pm
 
Oh I see that is useful thanks. Which IDE and board do you have selected on the vMicro menu or toolbar?

What I am looking for is if you reinstall also required you to setup your arduino ide location again and if the setup dialog was failing to appear with the newer version. Now that you have run the older version did the setup dialog appear? Was it empty and you had to reapply the location of the arduino ide? Maybe waste of your time but if you now go back to the newer release do things work okay? and if not the n which ide is selected (arduino 1.6 etc)?
Back to top
« Last Edit: Jun 2nd, 2019 at 2:37pm by Visual Micro »  
WWW  
IP Logged
 
Xfer
Newbies
*
Offline



Posts: 9
Re: Error opening/creating Arduino project (VS2015)
Reply #11 - Jun 2nd, 2019 at 3:16pm
 
With the new version of vMicro, the IDE chooser box always remains as "Ide Setup".
If I select it, the IDE setup dialog appears, with the right IDE version and path; but still, accepting the dialog (OK), the IDE (Arduino 1.8.8 in my case) does not appear in the box!

Screenshots attached
Back to top
 
 
IP Logged
 
Xfer
Newbies
*
Offline



Posts: 9
Re: Error opening/creating Arduino project (VS2015)
Reply #12 - Jun 2nd, 2019 at 3:24pm
 
With the old version (even if reinstalled after trying the new one), the correct IDE version appears in the box, without having to open the IDE setup dialog again.
Hope this helps.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10478
United Kingdom
Re: Error opening/creating Arduino project (VS2015)
Reply #13 - Jun 2nd, 2019 at 3:35pm
 
Ah thanks, yes the settings are not removed when you uninstall or upgrade. The issue in vs2015 with the new release is that it is failing to load the tool chains which is why it is in setup more and no IDE's are known.

I will look into some exception protection and reporting. It is most likely a json exception reading the package index files during load. The new/open won't work without an ide being available because those two functions use the sketch book folder to prompt the correct file location for the arduino ide. That's the difference between using the standard VS open and new v's the special "sketch" menus.


Thanks for the testing that is very useful.
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10478
United Kingdom
Re: Error opening/creating Arduino project (VS2015)
Reply #14 - Jun 2nd, 2019 at 3:52pm
 
+ if you can give me a list of the board package json files you have installed that would be useful. There is a list on the IDE locations dialog in Visual Micro and also maybe some you have added to File>Preferences in the Arduino IDE

Thanks
Back to top
 
WWW  
IP Logged
 
Xfer
Newbies
*
Offline



Posts: 9
Re: Error opening/creating Arduino project (VS2015)
Reply #15 - Jun 2nd, 2019 at 4:58pm
 
You mean the "boards.txt" files? Attaching them now...
Back to top
 

boards_teensy.zip (5 KB | 1 )
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10478
United Kingdom
Re: Error opening/creating Arduino project (VS2015)
Reply #16 - Jun 4th, 2019 at 1:23pm
 
Thanks, please also confirm what folder names you have, if any, below myDocuments\Arduino\Hardware

Also confirm the version of teensy and the arduino ide version

Thanks
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print