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 vMicro and Visual Studio WPF project (Read 1704 times)
Isaac Kohn
Newbies
*
Offline


Posts: 2
Location: Israel
Joined: Jan 31st, 2023
vMicro and Visual Studio WPF project
Feb 1st, 2023 at 5:52pm
Print Post  
Hello All,
I am just starting with Arduino and Visual Studio which are installed and working ok.
My aim is to build my App GUI in VS C# to control the Arduino. 
I have a simple VS WPF project with few boxes and buttons and the Arduino sketch uploaded separately from the Arduino IDE.
Both are functioning ok however I must switch between 2 platforms.
Last week I read about vMicro and hoped I can use only one platform, so I installed the free trial and tried to implement both with vMicro – but my  Arduino code is not recognized by VS WPF and pop many curly underlines.
Separately both works fine. I upload with the Arduino sketch from VS  with vMicro plugin, then start my WPF GUI and control the Arduino from my VS WPF project.
I have searched the net for a solution but with no success.
Any advice will be appreciated.
Isaac
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12166
Location: United Kingdom
Joined: Apr 10th, 2010
Re: vMicro and Visual Studio WPF project
Reply #1 - Feb 1st, 2023 at 5:58pm
Print Post  
You can not put arduino code in a wpf project. In Visual Studio you will have two projects in your solution or two seperate solutions. 1 projects for WPf and 1 for Arduino/vMicro.

When you upload you arduino project using vMicro first ensure the toolbar is set to Release and not Debug. The reason for this is the default debugger settings are to use the serial port and I expect your WPF project uses serial to communicate with the board. 

It is possible to use debugging alongside your wpf code but that would be a different discussion/thread after you have visual micro uploading and giving the same functionality you have used in the arduino IDE

  
Back to top
IP Logged
 
Isaac Kohn
Newbies
*
Offline


Posts: 2
Location: Israel
Joined: Jan 31st, 2023
Re: vMicro and Visual Studio WPF project
Reply #2 - Feb 7th, 2023 at 4:06pm
Print Post  
Hello,
Thanks for the reply,
A you suggested, I have added to my VS WPF solution a second code item and pasted in the blinking sketch (which runs ok from Arduino IDE).

When I upload it in release mode - the WPF code is loading not the blink sketch.

Can you advise?

Regards,
Isaac

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


Posts: 2499
Joined: Feb 13th, 2019
Re: vMicro and Visual Studio WPF project
Reply #3 - Feb 7th, 2023 at 4:55pm
Print Post  
Are you uploading your code using the vMicro Build & Upload button or menu item shown in the below documentation?
https://www.visualmicro.com/page/User-Guide.aspx?doc=Upload-and-Run.html

When working with Multiple project in a solution this page is also worth reading as well (linked from above too):
https://www.visualmicro.com/page/User-Guide.aspx?doc=Projects-and-Solutions.html
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint