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) Build does not find Nmake (Read 13514 times)
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Build does not find Nmake
Oct 3rd, 2011 at 8:35pm
Print Post  
Hi,
Firstly, the new release looks great. I am so pleased that finally we have a decent IDE.
I compiled with the new release and found this error.
It would seem to not compile at all.


>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(37,5): warning MSB8005: The property 'NMakeBuildCommandLine' doesn't exist.  Skipping...
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Build does not find Nmake
Reply #1 - Oct 3rd, 2011 at 8:44pm
Print Post  
Thanks

That error means the addin is not handling the compile but instead leaving Visual Studio to try and fail.

So we just need to know why. Are you using a project and solution created by the previous add-in or did you create a new project using a new menu item or did you create an empty c++ project?

An important point is that Arduino features for a project will be disabled if the add-in thinks the project is not an arduino project. The name of the folder containing the [sketch] must match the name of the [sketch].pde. The name of the Visual Studio project must match the name of the [sketch]

Please tell me more and I will tell you the solution. Send me a screen shot of your project open in Visual Studio. 
  
Back to top
WWW  
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: Build does not find Nmake
Reply #2 - Oct 4th, 2011 at 4:41am
Print Post  
1: I uninstalled the previous Add-in via the control panel and installed the new add-in.
2: I used the "right click" menu in the explorer - "Convert it to VC++ project"
3: VS did not open automatically so I opened VS and opened the project. 
4: First time round the toolbars did not show and the PDE's syntax was not in colour. I ran the command as suggested on the code page and the toolbars are fixed.
5: I tried to edit the size of the toolbars and their contents disappeared.
6: I re-ran the fix command- all is fixed again.
7: I compiled and received the error as reported.

I will try to email the screenshot as I cant find a way to attach a pic here.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Build does not find Nmake
Reply #3 - Oct 4th, 2011 at 7:50am
Print Post  
Thanks for a great overview of what you did. The problem seems to be that your project name is different to the sketch name. However it is best to perform the tests outlined in the "new users" global annoucement. (above)

Some more info for you

Everything is installed and working correctly, we know this because we can see the arduino tool bars in visual studio

Here are a few rules that will allow the arduino compiler to take over from visual studio normal compile

1) sketch name muct match the name of the containing folder
2) project name must match the sketch name

It's okay to create arduino projects manually in visual studio but not needed because there are so many automatic options provided by the arduino add-in. 

If you do create projects manually then you must understand the arduino rules and also start with an empty C++ project

The arduino for visual studio will only provide sketch functionality and compile if the rules are met. This is to ensure that visual studio continues to work for normal (non arduino) c++ projects  Smiley

Try opening arduino blink.pde example in a new visual studio solution and see what happens. Do not use the windows convert. Just open the file!

The Arduino for Visual Studio add-in should detect the opeing of a single .pde and guide you through the corect processes

Please let us know how you get on. Thanks
« Last Edit: Oct 4th, 2011 at 1:59pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Build does not find Nmake
Reply #4 - Oct 4th, 2011 at 1:23pm
Print Post  
For anyone other first time users that are reading this, after you have set your "tools>options>visual micro>arduino location" please test arduino in visual studio these ways:-

Method A - Create new arduino sketch

Open visual studio. Fom the "File>New" menu select "Arduino project". When prompted, enter the name of a new arduino sketch such as "MyFirstSketch". Click OK

You should see a new arduino project is created containing an arduino sketch called MyFirstSketch.pde

Add your own arduino code to the void loop() {}

Select an arduino board from the list and click "Build Solution"  from the "Project" menu

You should see a successful arduino compile in the "Sketch Build" output window


Method B - Open an existing sketch

In visual studio select "File>Open" then click "Arduino Project". You will be presented with an "Open File" window which will display your arduino sketch folder. Select a sketch and click OK.

A project will be automatically created for the sketch and the arduino source codes automatically added to the project.

Add your own arduino code to the void loop() {}

Select an arduino board from the drop down list of boards and click "Build" solution from the "Project" menu

You should see a successful arduino compile in the "Sketch Build" output window


Method C - Open an existing sketch

In Visual studio selected "File>Open>File". Navigate to an arduino sketch folder and select a .pde file. Click OK

You will be asked if you would like to Open or Create a project for the arduino sketch. Click OK.

Add your own arduino code to the void loop() {}

Select an arduino board from the drop down list of boards and click "Build" solution from the "Project" menu

You should see a successful arduino compile in the "Sketch Build" output window

Method D - Manual creation of a new arduino project

In Visual Studio create a new empty C++ project called "MySketch3" in a folder called "MySketch3"

Add a new text file to the project and call it "MySketch3.pde"

Add your own arduino code to the void loop() {}

Select an arduino board from the boards list

Select an arduino board from the drop down list of boards and click "Build" solution from the "Project" menu

You should see a successful arduino compile in the "Sketch Build" output window
« Last Edit: Oct 4th, 2011 at 4:26pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: Build does not find Nmake
Reply #5 - Oct 4th, 2011 at 3:36pm
Print Post  
Thanks for the great explanation.
You mentioned that the project name and the pde sketch file was not the same. I checked, and they are the same. It would seem that there ius a problem with the windows convert as I tried the methods that you suggested and the sketch compiled first time. I sent you a screen shot to look at. It is identical to the first one. This one works though.

Now I am excited about this tool!!!!!
  
Back to top
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: Build does not find Nmake
Reply #6 - Oct 4th, 2011 at 3:43pm
Print Post  
One thing I did notice. The PDE files are still not color coded for C++ style. They are just plain black text. This only happens on the first opening of the file (when you create the project) If you close the file and reopen, it is color coded.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Build does not find Nmake
Reply #7 - Oct 4th, 2011 at 4:22pm
Print Post  
Thanks for letting us know things are working now.

When you say the pde is not color coded the first time it opens ...

do you mean a pde was not color once after first installation? 

or do you mean a pde is always never color coded when a project opens (until the pde is closed and reopened)?
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Build does not find Nmake
Reply #8 - Oct 4th, 2011 at 4:45pm
Print Post  
I have now seen your 2nd screen shot and can see the color coding is not showing as expected. 

I would like to understand why this is. 

The installer adds registry keys to inform Visual Studio that .pde files can be treated as C++ files and can be color coded. Visual Studio does the rest! The fact that you see color coding after a .pde is re-opened suggests the registry settings are in place.

So I think the problem must be a Visual Studio problem as opposed to Arduino problem.

For speed, I know that Visual Studio caches all the registry settings that it uses in its own settings file which. Visual Studio refreshes the settings file when you click OK on Tools>Options.

Can you please try opening Tools>Options and click OK? Does that fix it?

Thanks
« Last Edit: Oct 4th, 2011 at 4:46pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: Build does not find Nmake
Reply #9 - Oct 5th, 2011 at 4:36am
Print Post  
This happens only once ever when you use "open arduino project" and it is a new project (first time with VC++) and if VS has not loaded another Arduino project already.
The main pde of the sketch is opened automatically in VS and this one is not colour coded.
I did the tool->options->save thing, but it had no effect. 
To fix - I saved the file, closed and re-opened.
I suggest the work around for now is to do just that.
« Last Edit: Oct 5th, 2011 at 4:41am by Marius »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint