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) Can not open or create Arduino porjects - VS2012 (Read 11469 times)
Uhu
Newbies
*
Offline


Posts: 7
Joined: Aug 3rd, 2016
Can not open or create Arduino porjects - VS2012
Aug 3rd, 2016 at 9:03pm
Print Post  
Hi 
I am using VS2012 and Visual Micro 1607.31.0.

When I click "New Arduino Project" or "Open Arduino Project"  nothing happens, the project does not show up in the solution explorer (it shows 0 projects). There are no messages in the output window. 

Interestingly the arduino .ino file and .vcxproj files are created in the correct folder. 

I have been using visual micro successfully and can still work on existing solutions.

Help would be very much appreciated.

Regards
« Last Edit: Aug 9th, 2016 at 10:44am by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can not open or create Arduino porjects
Reply #1 - Aug 3rd, 2016 at 9:23pm
Print Post  
Hi,

Can you please confirm the version of vs 2012 you are using and version of .net framework?

Also try to create a project using File>New>Project>Visual C++>Arduino Project

Thanks

  
Back to top
IP Logged
 
Uhu
Newbies
*
Offline


Posts: 7
Joined: Aug 3rd, 2016
Re: Can not open or create Arduino porjects
Reply #2 - Aug 3rd, 2016 at 9:36pm
Print Post  
Hi 
Thanks a lot for the fast reply.
I am using Microsoft Visual Studio Professional 2012 version 11.0.61219.00 Update 5 with .NET Framework version 4.6.01055.

If I try File>New>Project>Visual C++>Arduino Project I get an error message window:

Unable to read the project file "Test2.vcxproj".
D:\Sour....\ test2.vcxproj(18,3): The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct and that the file exists on the disk.


Not sure what that means.

Regards


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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can not open or create Arduino porjects
Reply #3 - Aug 3rd, 2016 at 9:56pm
Print Post  
That normally means that C++ isn't installed.

Can you create an empty c++ win32 console project without using the visual micro commands?
  
Back to top
IP Logged
 
Uhu
Newbies
*
Offline


Posts: 7
Joined: Aug 3rd, 2016
Re: Can not open or create Arduino porjects
Reply #4 - Aug 3rd, 2016 at 10:00pm
Print Post  
Yes, I just managed to create and C++ console application project.

File > New > Project > Win32 Console Application

The project shows up in the solution explorer as expected with header files and etc.

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can not open or create Arduino porjects
Reply #5 - Aug 3rd, 2016 at 10:06pm
Print Post  
Hmm. The Visual Micro templates a standard msbuild macro called VCTargetsPath

I found a similar report on stackoverflow and would appreciate if you could try to look into the solution

http://stackoverflow.com/questions/8497931/msbuild-does-not-contain-a-value-for-...
« Last Edit: Aug 3rd, 2016 at 10:07pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Uhu
Newbies
*
Offline


Posts: 7
Joined: Aug 3rd, 2016
Re: Can not open or create Arduino porjects
Reply #6 - Aug 3rd, 2016 at 10:56pm
Print Post  
I had a look into the registry and the two entries suggested in the solution on stackoverflow do exist and are correct. 
The next solution suggested to change HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\4.0 from 2.0 to 4.0
which I tried too but that seemed to make no difference as well. 

I compared the vcxproj files from a working solution and a newly created one (that would not add to a solution) and found some differences:

<PlatformToolset> was empty so I set it to v110 as in the working one.

<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
The 14.0 is a 4.0 in the working one so I changed that one too.

Once I had done those changes the project loaded fine. 

I do not understand how these differences made it into the project file. But it would be good to know how to fix that.

Regards
M


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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can not open or create Arduino porjects
Reply #7 - Aug 3rd, 2016 at 11:18pm
Print Post  
Great thanks.

Platform tool set can be empty but the 14.0 version is VS2015

I had to edit all the templates for the last release and vs 2015 must have crept in with its version stamping Smiley

I will clear the property at the weekend. There are a couple of minor fixes scheduled so hopefully all together.

thanks for the very useful detective work. Email me if you need a pro licence.
  
Back to top
IP Logged
 
Uhu
Newbies
*
Offline


Posts: 7
Joined: Aug 3rd, 2016
Re: Can not open or create Arduino porjects
Reply #8 - Aug 3rd, 2016 at 11:25pm
Print Post  
Now I have the problem that the Visual Micro does not show up in the tool bar (as in build and upload etc.). 
I think the project or solution is not recognised as a visual micro one.

The menu "VMICRO" does not offer the build option either.

Any suggestions?

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can not open or create Arduino porjects
Reply #9 - Aug 3rd, 2016 at 11:36pm
Print Post  
Does the issue continue if you select the project in the solution explorer.

If you click into active code?

Is this an existing or new project?

The project, the folder and a .ino file must have the same name and the vsproj and .ino must be in the same folder.. 

EDIT: You also need to ensure the .ino file is actually included in the project in the filtered solution view is best to see that.
« Last Edit: Aug 3rd, 2016 at 11:37pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can not open or create Arduino porjects
Reply #10 - Aug 3rd, 2016 at 11:46pm
Print Post  
If renaming project files it's possible the cache has remembered the project wasn't arduino. 

Restarting the ide will sort it. 

It is an area that has recently changed due to the new "arduino deep search for includes" which required a higher level of caching because it's a slow thing for intellisense.

If still an issue then zip and email the vcxproj file. email to info[at]visualmicro.com

  
Back to top
IP Logged
 
Uhu
Newbies
*
Offline


Posts: 7
Joined: Aug 3rd, 2016
Re: Can not open or create Arduino porjects
Reply #11 - Aug 4th, 2016 at 1:01am
Print Post  
Hi
Thanks a lot for the help so far.
It was the project name in the project file that was wrong. Once I fixed that everything is working fine. 

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can not open or create Arduino porjects
Reply #12 - Aug 4th, 2016 at 1:08am
Print Post  
Great thanks for letting me know.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can not open or create Arduino porjects
Reply #13 - Aug 4th, 2016 at 1:11am
Print Post  
By the way now you see you can take any .vcxproj file. If the name rules are met then you have a sketch project.

So while waiting for the update you can create or open existing sketch projects by adding a .vcxproj to any sketch folder rename and then open

That's pretty much what the Open Arduino Project does if a vcxproj doesn't exist
  
Back to top
IP Logged
 
Uhu
Newbies
*
Offline


Posts: 7
Joined: Aug 3rd, 2016
Re: Can not open or create Arduino porjects
Reply #14 - Aug 4th, 2016 at 1:32am
Print Post  
Thanks a lot for that information. Good to know I can create my own project file if needed.

I have one more question which is a bit off topic. I am trying to run a pre build script (to automatically create a svn version number string define) either from the Pre-build event or custom build step under the projects properties, but that never gets started. Any advice on this?

Regards
M
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint