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 Allow for creating of new sketch project within a solution (Read 6258 times)
barnold
Newbies
*
Offline


Posts: 7
Joined: Mar 7th, 2015
Allow for creating of new sketch project within a solution
Mar 7th, 2015 at 1:49pm
Print Post  
At the moment when I want to create a new project within a solution, I open the contextual (right-click menu) on the solution, select 'Add' but there is only the option to 'Add Existing Sketch Project'. There is the standard VS Project menu under 'Add' but 'Sketch Project' does not appear there as a template.

I find myself having to open the Arduino IDE, create a blank sketch located and named how I would like, save it, close the Arduino IDE then adding that project from the Add menu mentioned above.

Is there a way to streamline this? Am I missing something?

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Allow for creating of new sketch project within a solution
Reply #1 - Mar 7th, 2015 at 4:43pm
Print Post  
Hi

Please take a look at the creating a project documentation and let me know if you are missing any menu items such as "file>new>sketch project"

http://www.visualmicro.com/page/User-Guide.aspx?doc=Create-New-project.html

If you are missing menu items then please say which Visual Studio or Atmel Studio Ide version you are using.

Thanks
  
Back to top
IP Logged
 
barnold
Newbies
*
Offline


Posts: 7
Joined: Mar 7th, 2015
Re: Allow for creating of new sketch project within a solution
Reply #2 - Mar 7th, 2015 at 7:00pm
Print Post  
Ah excellent this does work - I have always used the contextual menu in VS (right click on the solution file in the Project Explorer).

However there does not seem to a way to specify which sub-directory within my 'Arduino' folder the new project should be in - it is created at the root. This still means to create the project in the folder of my choosing I have to use the method I use above.

I did find a workaround where I created a new template in VS following this guide http://blogs.msdn.com/b/akirsman/archive/2012/10/11/creating-visual-studio-templ... but it would be nice to have this template included in the VisualMicro plugin by default with the icon and categorised somewhere more accessible than buried deep in the Visual C++ list.

Cheers,

Brendan

  
Back to top
 
IP Logged
 
barnold
Newbies
*
Offline


Posts: 7
Joined: Mar 7th, 2015
Re: Allow for creating of new sketch project within a solution
Reply #3 - Mar 7th, 2015 at 7:30pm
Print Post  
You can organise the template location slightly better into an Arduino category by following this guide

https://msdn.microsoft.com/en-us/library/y3kkate1.aspx

Essentially in VS 2013 you ...
  • File -> New -> Sketch Project
  • File -> Export Template...
  • Hit 'Next' then Add a description e.g. Arduino Sketch
  • Untick 'Automatically import the template into Visual Studio'
  • Hit 'Finish'
  • The folder should appear and it will probably be something like 'My Exported Templates'
  • Move the zip file in this folder to the folder ../Templates/ProjectTemplates/Visual C++ Project/Arduino/ (will need to create the 'Arduino' folder)

    There will now be an 'Arduino' category under Visual C++ projects in the 'New' menu

    When creating a new project though, be sure to create in the Arduino folder (I have Arduino in my Explorer favourites)

    Also if adding to an existing solution, then select 'Add to solution'


     

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


    Posts: 12187
    Location: United Kingdom
    Joined: Apr 10th, 2010
    Re: Allow for creating of new sketch project within a solution
    Reply #4 - Mar 7th, 2015 at 8:44pm
    Print Post  
    Great info for others thanks. We do plan to add some standard templates and some examples but you guide is nice.

    It doesn't matter where you create a new project as long as the folder that contains it and the name of the project and a .ino all have the same name.

    If the above few rules are applied then you could also create an empty win32 C++ application, replace the ProjName.cpp with a ProjName.ino and visual micro should spring to life. 

    I know you have a great solution of your own but thought it might be useful to explain that the projects are just cpp projects with the right combination of file/folder names.

    Thanks again
      
    Back to top
    IP Logged
     
    Page Index Toggle Pages: 1
    Send TopicPrint