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) Unable to start debugging (Read 4939 times)
557Torino
Junior Member
**
Offline


Posts: 11
Joined: Aug 30th, 2018
Unable to start debugging
Aug 30th, 2018 at 3:32pm
Print Post  
After loading VisualMicro tools into Visual Studio,  I have been able to use Visual Studio as an IDE for the Arduino and it works great.   Now when I try to execute a C# project I get the following error message:


"Unable to start debugging.  The startup project cannot be launched. Ensure that the correct project is set at the startup project.  The start up project can be changed by selecting the 'Set as Startup Project' command from the right click menu in Solution Explorer."

How do I fix this to allow both C# code and Arduino code to be worked with and executed?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to start debugging
Reply #1 - Aug 30th, 2018 at 3:43pm
Print Post  
Are asking how to have both a c# project and an arduino project in the same solution? 

Do you only get an error with C# files when you have a c# and an arduino project in the same solution?

Based on your answers I will know what else to ask or tell you.
  
Back to top
IP Logged
 
557Torino
Junior Member
**
Offline


Posts: 11
Joined: Aug 30th, 2018
Re: Unable to start debugging
Reply #2 - Aug 31st, 2018 at 11:16pm
Print Post  
I am using the C# independent of the Arduino.  I am guessing that the IDE is still looking at the serial connection for use with the Arduino, in lieu of executing the C# code as a console application.

Last time this happened, I removed Visual Studio and reloaded it, without installing the Visual Micro Libraries.

  I started using Visual Studio for writing C# .net and console applications.  Recently I found out that Visual Studio could be used for programming the Arduino (using Visual Micro) and have been using it that way for sometime.  When I tried jumping back into writing a C# console application, the error message occurred.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to start debugging
Reply #3 - Sep 1st, 2018 at 1:08pm
Print Post  
Hi,

Visual Micro does not look for a serial port in this way and I can't reproduce an issue with a c# project and if this was a problem we would have heard much louder reports over the past 8 years of producing visual micro in VS.

Can you please email a zipped solution containing one or more projects that had this issue.

It's not clear if, with visual micro installed, if you open the ide, create a c# project and build you get a problem? No arduino project loaded at all during the ide session? This is a clear test for me. 

Thanks
« Last Edit: Sep 1st, 2018 at 1:09pm by Tim@Visual Micro »  
Back to top
IP Logged
 
557Torino
Junior Member
**
Offline


Posts: 11
Joined: Aug 30th, 2018
Re: Unable to start debugging
Reply #4 - Sep 2nd, 2018 at 9:18pm
Print Post  
Hi Tim;

  Attached is a screen shot of the error message and the C# code (which is very simple).
I appreciate your help.  It must be something simple that I am not understanding...
Thank You
« Last Edit: Sep 3rd, 2018 at 9:14pm by Tim@Visual Micro »  

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


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to start debugging
Reply #5 - Sep 3rd, 2018 at 9:14pm
Print Post  
Please change the output window from package to build so we can see what is happening
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to start debugging
Reply #6 - Sep 3rd, 2018 at 9:18pm
Print Post  
I tried your .net core project and it starts and debugs fine with visual micro installed.

Maybe a vs2017 bug please make sure you are on the latest release of visual studio

Thanks
  
Back to top
IP Logged
 
557Torino
Junior Member
**
Offline


Posts: 11
Joined: Aug 30th, 2018
Re: Unable to start debugging
Reply #7 - Sep 5th, 2018 at 3:57pm
Print Post  
I ran the update for Visual Studio and 15.8.2 is now installed.  Same error occurs.  I created a new project using the Console App (.NET Framework) template and it works fine. I then created another new project using the Console App (.NET Core) template and it failed with the same error, so it appears to be related to the templates being used to create the files.  I must have used the .NET Core template.    I don't understand what the difference between .NET core and .NET Framework are, but now I know "not what to do".



Thanks for your help
Mike
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to start debugging
Reply #8 - Sep 7th, 2018 at 10:42am
Print Post  
Hi,

.Net core is the new platform from Microsoft. It will eventually replace .net framework.

.Net core can run windows, mac and linux.

The error encountered is probably missing .net core debug tools but I am not entirely sure. Visual Micro doesn't have any connection to it.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint