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) How to change the new project folder location? (Read 12781 times)
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
How to change the new project folder location?
Apr 20th, 2012 at 8:12pm
Print Post  
Hi,

My new Arduino projects keep getting created at the same file location. 

I would like to be able to browse to the file location for my new projects...  Cool

Any ideas?

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to change the new project folder location?
Reply #1 - Apr 20th, 2012 at 10:26pm
Print Post  
hi,

yep at the moment vm uses the arduino ide>preferences>sketch folder. You will need to re-start vm if you make the change in the arduino ide.
  
Back to top
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: How to change the new project folder location?
Reply #2 - Apr 23rd, 2012 at 6:26pm
Print Post  
Why?

Why not use the standard Visual Studio way of just browsing to the location??
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to change the new project folder location?
Reply #3 - Apr 23rd, 2012 at 10:21pm
Print Post  
well it is supposed to maintain compatibility with arduino so that you can easily switch to the arduino ide and open/compile the program. new users would expect to see any sketches created in visual studio on their arduino sketch menu. and same the other way round, if you create a sketch in the arduino ide they would expect the "file open sketch" in visual studio to show the same diectory.

There is another important consideration. arduino allows libraries in the arduinoide/libraries folder and also the sketchbook/libraries folder. "Core and User libraries".

I agree there should be some options here but I am not sure what they should be??
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to change the new project folder location?
Reply #4 - Apr 23rd, 2012 at 10:26pm
Print Post  
ps: You can use the standard visual studio "file new" or "file open" or "project open" systems if you want. 

To create a new sketch project > create an empty c++ project, add an .ino or .pde with the same name, pick a board and it should all work. The vm addin doesn't really care where sketch files/projects are opened from.

Otherwise you can simply open a .pde/ino or vs project  (sketch) normally, as you would any visual studio project.

The "Arduino" menu items are just to make things easier for newer users.

VM isn't very fussy, the only rules for vm to treat any c++ project as an arduino sketch are the following items must have the same name:-

The Project folder
The Project
A .pde or .ino
« Last Edit: Apr 23rd, 2012 at 10:28pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to change the new project folder location?
Reply #5 - Apr 24th, 2012 at 4:08pm
Print Post  
Did you try this? What is your conclusion?

Thanks
  
Back to top
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: How to change the new project folder location?
Reply #6 - Apr 25th, 2012 at 6:23am
Print Post  
I think the assumption that users expect it is not accurate. Did you get direct feedback on this or is it your assumption?

If I understand correctly, VM is still bound to the same directory locations as the Arduino IDE? If so, is there any way to change that?

It's just not realistic to expect users to put all their projects under the same root folder. It's an over-simplification that hurts advanced users. I have a couple of root folders my projects are located under. (Tests, Public/open source, private etc).

Could VM not provide a the same 'Create Project' dialog as it does now, but with a browse button that allows the user to change the default location?

Also it would be very logical to also provide the path to the root folder in the options dialog (that needs some work too Wink )

I moved one of my VM projects around and now it wont compile any more. All directory settings seem to be ok. 

What is the purpose of that .[projectname].vsarduino.h file? Looks like its generated dynamically..?

Thanx,
Marc
  
Back to top
 
IP Logged
 
Marc Jacobi
Junior Member
**
Offline


Posts: 28
Location: Netherlands
Joined: Feb 28th, 2012
Re: How to change the new project folder location?
Reply #7 - Apr 25th, 2012 at 6:55am
Print Post  
I have the project file one directory lower than the solution file.  Is that possible or does that create the errors I'm seeing?

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to change the new project folder location?
Reply #8 - Apr 25th, 2012 at 2:43pm
Print Post  
i'm not sure the error are related. I've answered your post about the errors let's see if that fixes it.

I can't remeber if a project in a lower folder works or not. for now I suggest you test this one step at a time.

First off let's follow the rules outlined in my msg below...

Folder name, project name and an ino/pde with all the same name. don't forget that vs has a project file name and also the internal name of the project. keep them all the same. 

This should compile correctly from any location? Does it?

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to change the new project folder location?
Reply #9 - Apr 25th, 2012 at 5:47pm
Print Post  
the [projectname].vsarduino.h file should be re-created whenever you make a significant change to what vm believes is an arduino project. It foces the vs intellisense to work. It is not used during compilation and is managed by vm so it can be ignored.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to change the new project folder location?
Reply #10 - Apr 25th, 2012 at 5:50pm
Print Post  
As far as the advanced/new user discussion goes I haven't been able to firmly conclude how many experienced arduino users are using the system. 

Considering that the create sketch option is just a simple option for less experienced users and that you can simply create a new empty win32 C++ project and add a textfile/.pde of same name I am not entirely sure how important the sketch book location is.

Hopefully when you have the project in the same folder you find it all works well in any folder?

Not too distant future versions of vm will include a vs project template enabling expert users to have a .pde file created automatically when they create a new Arduino C++ project. but for now, as i have said, it is very easy to create an empty c++ win32 project (without ATL not that it really matters)
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint