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) Library Directory missing in build folder (Read 6532 times)
NF1Z
Junior Member
**
Offline


Posts: 57
Joined: Aug 18th, 2013
Library Directory missing in build folder
Mar 2nd, 2023 at 1:39am
Print Post  
Hi,
This error occurs if I select Debug and Debug:Serial, despite the exact same project building OK in Release mode, as well as for hardware debugging.

The missing directory is, in fact, missing, but the parent is there and has several files and directories in it.

AFAIK, the error occurs on the first library, and occurs for cloned and uncloned libraries.

EDIT:  I should have said this has been happening for a long time, not just the most recent update - just got round to reporting it.
« Last Edit: Mar 2nd, 2023 at 1:43am by NF1Z »  

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


Posts: 2709
Joined: Feb 13th, 2019
Re: Library Directory missing in build folder
Reply #1 - Mar 2nd, 2023 at 10:14am
Print Post  
Thanks for the report and the logs.

If you enable vMicro > Compiler > Deep Search for Libraries + Accurate Prototype Insertion (Gcc-E) does this resolve the issue?
  
Back to top
IP Logged
 
NF1Z
Junior Member
**
Offline


Posts: 57
Joined: Aug 18th, 2013
Re: Library Directory missing in build folder
Reply #2 - Mar 3rd, 2023 at 3:06am
Print Post  
Simon,
That did not help, same result.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2709
Joined: Feb 13th, 2019
Re: Library Directory missing in build folder
Reply #3 - Mar 3rd, 2023 at 11:22am
Print Post  
Could you attach or email us the SLN and VCXPROJ Files for us to review?

Can you also try running Build > Clean Solution and recompiling?
« Last Edit: Mar 3rd, 2023 at 1:37pm by Simon@Visual Micro »  
Back to top
IP Logged
 
NF1Z
Junior Member
**
Offline


Posts: 57
Joined: Aug 18th, 2013
Re: Library Directory missing in build folder
Reply #4 - Mar 3rd, 2023 at 6:40pm
Print Post  
Built a simpler example.  I started a new solution, with only the Arduino project, with Deep Search - built fine.

Tried again, with Deep search OFF and the library included as a shared project, cleaned solution - failed as I described.

Same if the library is cloned for the solution.

Unloaded the library project, removed reference, cleaned solution, built OK again 

I will email you the output, SLN and VCXPROj files.
« Last Edit: Mar 3rd, 2023 at 6:54pm by NF1Z »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Library Directory missing in build folder
Reply #5 - Mar 3rd, 2023 at 8:19pm
Print Post  
Please switch to release and then build. Send or post the output thanks
  
Back to top
IP Logged
 
NF1Z
Junior Member
**
Offline


Posts: 57
Joined: Aug 18th, 2013
Re: Library Directory missing in build folder
Reply #6 - Mar 3rd, 2023 at 8:49pm
Print Post  
Attached
  

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: Library Directory missing in build folder
Reply #7 - Mar 3rd, 2023 at 9:12pm
Print Post  
Thanks for the info. It looks like you have at one point cloned the TaskClass library into a 1.0.1 versioned folder and since then made a simpler shared library project for a non versioned one.

That combined with deep search caching has got confused for the "Debug" configurations. Selecting the Debug configuration and then clcking "Build>Clean Solution" should resolve that.

The idea of havig libraries below a project is going to potentially cause a lot of confusion. There is also no point in having a shared library dedicated to a single project.

The best solution for folder layout is as follows:-

- Root folder for Solutions (sln)
  - Libraries
     - Library1
     - Library2
   - Projects
      - Project1
      - Project2
  
Back to top
IP Logged
 
NF1Z
Junior Member
**
Offline


Posts: 57
Joined: Aug 18th, 2013
Re: Library Directory missing in build folder
Reply #8 - Mar 4th, 2023 at 12:52am
Print Post  
Thanks for the response.

I would be lying if I said I understood all that, or if I claimed to know anything about VS configuration files, but are you referring to the existence of two entries for TaskClass.vcxitems in the .sln file, with the same path but different GUIDs?  One of the GUIDs matches the cloned TaskClass.vcxitems, the other is a mystery, as there can be only one file with the name in that folder.  Maybe a red herring.

As an experiment, I created an empty sketch using the VM template and an empty library also using a VM template, and cloned the library into the sketch solution.  There were again two entries in the .sln for the library vcxitems, so that's probably nothing to do with it.   

For this empty solution, the same "folder does not exist" message occurred during a Debug:Serial build, but as I said before, it builds fine for Release and for Debug:Hardware.  Given that, I can't see how it is anything to do with solution organization.

Regarding that, the layout you gave is what I generally use, cloning for the solution if I need to modify a stock library, or if I want to freeze the whole state of the build, even if there is only one sketch/project using the library. Otherwise, I'd probably make it an uncloned shared project so I can more easily browse it if needed.

I'll attach a screenshot of my solution organization.



  

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: Library Directory missing in build folder
Reply #9 - Mar 4th, 2023 at 4:12pm
Print Post  
Move your Libraries folder so that it is not below the project
  
Back to top
IP Logged
 
NF1Z
Junior Member
**
Offline


Posts: 57
Joined: Aug 18th, 2013
Re: Library Directory missing in build folder
Reply #10 - Mar 5th, 2023 at 6:42am
Print Post  
Then there is definitely something I am not getting. 

Firstly, that is where the IDE put it when I selected Clone to Solution.  Might be expected to be correct.

Secondly, if I moved Libraries up a level, it would conflict with the standard Arduino Sketchbook\libraries folder and would overwrite itself?

I tried moving the sketch down a level (actually two, since the sketch has to be in a directory of the same name) to get the attached screenshot, but it was just the same error.

So I don't get what the recommended way to organize the solution is, or how it is going to help this issue in any case - since it only becomes evident on Debug:Serial builds.

Can you reproduce the error if you follow the simple sequence I outlined in my last post?
  

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: Library Directory missing in build folder
Reply #11 - Mar 5th, 2023 at 7:42pm
Print Post  
The idea of having libraries outside of a project folder is to keep things neat. How you have it now is okay. You should see that when you clone a library it is placed in a \Libraries folder below where the the solution (.sln) exists.

Your solution folder does not need to be called Sketch1. The "Projects" folder was only an example in case you have more than one project in the solution. Having a solution in higher level makes it easier when you come to work with GIT or TFS.

I would actually suggest removing shared projects until you have used other visual micro features. Shared projects are more complicated to use.

After removing shared projects use the "vMicro>Show Hidden Files"  to see the sources of core and libraries. That works without shared projects but still gives good visibility of library and core code.

The errror you were getting when using the Debug configuration will probly be solved by clicking "Build>Clean Solution"

Remind us of any other error you have but repost your output as per yellow box above.


  
Back to top
IP Logged
 
NF1Z
Junior Member
**
Offline


Posts: 57
Joined: Aug 18th, 2013
Re: Library Directory missing in build folder
Reply #12 - Mar 6th, 2023 at 6:13am
Print Post  
Tim,
Cleaning solution does not help.  Obviously I've tried that many times.  I do get an error when I clean the solution, which looks harmless, but I will attach it, as well as the build output.

As for VM and shared projects, I have been using VM for close to 10 years and shared code/libraries for about 4 or 5, so while I cannot claim any great knowledge of the internals (just a user), I have managed to successfully develop three large solutions, with multiple projects and lots of shared code and cloned libraries, and the only issue I have that I cannot blame on myself is this build failure in the very specific situation of a cloned library in debug configuration, but only with the Serial debugger enabled.  For all solutions, from the trivial to pretty large.  For ESP32, Uno and ATMega2560 at least.  And it's been going on for quite a while.  I just tested with VS 2019 (VM version 1.2022.0607), and get the same result.

So, you did not respond to my earlier question: can you reproduce this error?  I think that has to be the first question.
« Last Edit: Mar 6th, 2023 at 6:15am by NF1Z »  

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


Posts: 2709
Joined: Feb 13th, 2019
Re: Library Directory missing in build folder
Reply #13 - Mar 6th, 2023 at 1:40pm
Print Post  
Thanks for the update, we are currently struggling to reproduce the issue.

Can you ZIP the entire Solution folder and send it over to us so we can investigate further?
  
Back to top
IP Logged
 
NF1Z
Junior Member
**
Offline


Posts: 57
Joined: Aug 18th, 2013
Re: Library Directory missing in build folder
Reply #14 - Mar 6th, 2023 at 6:26pm
Print Post  
Sent you email
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2709
Joined: Feb 13th, 2019
Re: Library Directory missing in build folder
Reply #15 - Mar 7th, 2023 at 11:35am
Print Post  
Thanks for the detail.

If you disable the Library Debugging this should resolve the issue:
Tools > Options > Visual Micro > Micro Debugging -- Set to False
  
Back to top
IP Logged
 
NF1Z
Junior Member
**
Offline


Posts: 57
Joined: Aug 18th, 2013
Re: Library Directory missing in build folder
Reply #16 - Mar 8th, 2023 at 12:56am
Print Post  
Simon,
Thanks, that does seem to eliminate the error.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2709
Joined: Feb 13th, 2019
Re: Library Directory missing in build folder
Reply #17 - Apr 24th, 2023 at 4:56pm
Print Post  
Please download the latest version (23.0424.0) from the board below which should resolve the issue:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
IP Logged
 
JML53
Newbies
*
Offline


Posts: 1
Joined: Apr 30th, 2023
Re: Library Directory missing in build folder
Reply #18 - Apr 30th, 2023 at 7:20pm
Print Post  
I was having the same issue.  This fixed it, thanks!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint