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) Latest vMicro update creates extra folder layer? (Read 2632 times)
FrankP
Senior Member
****
Offline


Posts: 251
Joined: Oct 19th, 2011
Latest vMicro update creates extra folder layer?
Oct 8th, 2023 at 7:07pm
Print Post  
I just created a new Arduino project using the latest vMicro version (2.2023.1006) and discovered my 'board.txt' custom build script was no longer being honored.

After playing around for a while, I discovered that the new project creation process creates another [project-name] folder under the [project-name] folder and puts all the project-name files there.  Now my 'board.txt' file is in the wrong place (or the build system to see it.   

So for my 'WallE3_Quicksort_V1' project I have the following folder tree

Arduino --> WallE3_Quicksort_V1 --> WallE3_Quicksort_V1 --> WallE3_Quicksort_V1.ino (and other files)

In all my previous projects it would look like

Arduino --> WallE3_Quicksort_V1 -->  WallE3_Quicksort_V1.ino (and other files)

Why is this extra folder layer being created?

TIA,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Latest vMicro update creates extra folder layer?
Reply #1 - Oct 8th, 2023 at 7:21pm
Print Post  
Before we answer it would be useful to unstand the process you followed to add the board.txt to the new project?
  
Back to top
IP Logged
 
FrankP
Senior Member
****
Offline


Posts: 251
Joined: Oct 19th, 2011
Re: Latest vMicro update creates extra folder layer?
Reply #2 - Oct 8th, 2023 at 7:53pm
Print Post  
Tim,

Thanks for looking at this so quickly.  I just sent a reply to your email sent from 'forum_admin@visualmicro.com'.  If that's not the right way, please let me know and I'll fix it  Grin

OK, I figured out how to put everything (except the TeensyOTA.ttl file) into the forum reply  Grin

Frank
« Last Edit: Oct 8th, 2023 at 8:02pm by FrankP »  
Back to top
 
IP Logged
 
FrankP
Senior Member
****
Offline


Posts: 251
Joined: Oct 19th, 2011
Re: Latest vMicro update creates extra folder layer?
Reply #3 - Oct 8th, 2023 at 8:01pm
Print Post  
I have been using this particular 'board.txt' (and the companion 'TeensyOTA1.ttl' script on my robotics projects for years to implement Over-the-Air programming for my Teensy 3.5 controllers.   

The above files are actually in C:\Users\Frank\Documents\Arduino\Robot Common Files, and for each new project I create shortcuts to those files in the 'C:\Users\Frank\Documents\Arduino\[project-name] folder.

See this post for an explanation of how I used the vMicro 'board.txt' file to run the TeensyOTA.ttl Teraterm script, post for the details of the TeensyOTA.ttl TeraTerm script file, and post for the details for creating the shortcuts in each project folder.  I have also attached my 'board.txt' file if that helps.
  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Latest vMicro update creates extra folder layer?
Reply #4 - Oct 8th, 2023 at 8:08pm
Print Post  
Thanks for sending the info

Each project can have ites own board.txt, therefore you should always place it in the project folder.

There can be a lot of confusion for users when the solution is in the same folder as the first project they create in a new solution. All other (secondary) projects in the same solution would often be either in a ..\parent folder or in a sub folder below the "first" project, neither is ideal for many reasons. For example, working with source control, confusion over includes paths, local library locations etc. Therefore, the "File>New>Arduino Project" command ensurs that the solution is out of the way of the main project by being a level up. This is similar to how vs usually works when "create separate folder for solution" is enabled.

If you need to create a new arduino project and solution that share a single folder you can use the standard Visual Studio "File>New>Project" command. When you use that window there is a checkbox called "create separate folder for solution is enabled" that you should uncheck. Vs will remember your selection.

We do recommend a solution in a parent folder, that also works well with the new feature that supports "special" folders below a solution for core, libs, sketchbook etc. The special folders makes it easier to use single source control for all sources and tools used to build the code.

To move your current code you should be able to move the project code up a level, and delete the .sln. Then select "File>Open>Arduino Project"

edit: Your board.txt is using the solution property variables for intermediate and final path. In you current two folder scenario you should verify the variables are set correctly. They should default to how VS normall works.

« Last Edit: Oct 8th, 2023 at 9:10pm by Tim@Visual Micro »  
Back to top
IP Logged
 
FrankP
Senior Member
****
Offline


Posts: 251
Joined: Oct 19th, 2011
Re: Latest vMicro update creates extra folder layer?
Reply #5 - Dec 26th, 2023 at 3:27pm
Print Post  
>>>> If you need to create a new arduino project and solution that share a single folder you can use the standard Visual Studio "File>New>Project" command. When you use that window there is a checkbox called "create separate folder for solution is enabled" that you should uncheck. Vs will remember your selection.<<<<


I don't see this option at all with what I think is the latest version (2.2023.1212).  Here's a screenshot showing what I get when I select 'File->New Arduino Project'


What am I doing wrong here?

TIA,

Frank


  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Latest vMicro update creates extra folder layer?
Reply #6 - Dec 26th, 2023 at 5:54pm
Print Post  
"File>New>Project" is different option to "File>New>Arduino Project"

File>New>Project uses the standard Visual Studio new project wizard which also includes some Visual Micro new project templates such as Blank/empty project. That creates the same type of project as the "File>New>Arduino Project" but gives more control over the location.



  
Back to top
IP Logged
 
FrankP
Senior Member
****
Offline


Posts: 251
Joined: Oct 19th, 2011
Re: Latest vMicro update creates extra folder layer?
Reply #7 - Dec 26th, 2023 at 8:47pm
Print Post  
Tim@Visual Micro wrote on Dec 26th, 2023 at 5:54pm:
"File>New>Project" is different option to "File>New>Arduino Project"



You are right Tim, they are different, but I always use the 'File->New -> Arduino Project' option, as the screenshot shows Wink

Frank
« Last Edit: Dec 26th, 2023 at 8:48pm by FrankP »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Latest vMicro update creates extra folder layer?
Reply #8 - Dec 27th, 2023 at 6:33pm
Print Post  
We are considering a setting to allow the new arduino project to work in a single folder but it can be confusing for many users.

The problem comes when cloning a library or creating a shared code projects. In this case, the separate code or library (s) would end up located below the project folder. 

That becomes confusing when a 2nd project needs to use the same shared code or library.

By having a separate solution the following folder layout can be achieved, this also makes is easier to use with source control.

Solution Folder
      Misc Docs
      Shared code 1
      Cloned library 1
      Arduino Project 1
      Arduino Project 2

  
Back to top
IP Logged
 
FrankP
Senior Member
****
Offline


Posts: 251
Joined: Oct 19th, 2011
Re: Latest vMicro update creates extra folder layer?
Reply #9 - Dec 27th, 2023 at 8:26pm
Print Post  
I understand (I think) the issues surrounding  the use of a single folder for both solution and project, but there is another side to this story.  I have built literally hundreds of Arduino projects over the years, and they are ALL single folder projects.  Your current default behavior therefore represents a degradation to Visual Micro, not an enhancement.  Not a killer by any means, but something I have to remember to address whenever I start a new project.

What happened to the idea of a checkbox on the 'New Arduino Project' dialog to maintain the old behavior, if desired?

TIA,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Latest vMicro update creates extra folder layer?
Reply #10 - Dec 28th, 2023 at 5:17pm
Print Post  
The arduino project is still in a single folder. The arduino ide will be happy with the lower folder where the .ino files are. That is an arduino project.

The .sln solution folder is a Visual Studio thing. It's not actually needed for the project. The .vcxproj can be opened directly with Visual Studio which would auto create a solution when you save or exit. The same project can be inmultiple solutions.

Unfortunately, windows does not have a prompt with a checkbox on it. We have to create an entire WPF tool window to provide that functionality. There is a lot of confusion caused by having the solution in the same location, especially if you have a project open and then click "File>Add>New..."

If we made the WPF window with the checkbox, most users would turn it on without really understanding the impact. It's another issue with making options too easy.


« Last Edit: Dec 28th, 2023 at 6:21pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Latest vMicro update creates extra folder layer?
Reply #11 - Jan 4th, 2024 at 5:09pm
Print Post  
I looked at the release notes and there is already a global option that allows you to control this behaviour.

Use the RELEASES button near top right of visualmicro.com to see change history

Update: Add global  option to keep project and solution in same folder. (Tools > Options > vMicro > User Interface > Keep project and Solution Together)

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