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 Output Directory (Read 7913 times)
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Output Directory
Nov 9th, 2016 at 9:23pm
Print Post  
Hi,

Until recently, the output files from my project were being placed in the /Debug subdirectory of my project.

I must have changed something recently because the output files are now being placed in the users directory as shown from the output of the compiler below.

Quote:
 

Compiling debug version of 'dummy' for 'Generic ESP8266 Module'
Build folder: file:///C:/Users/Neil/AppData/Local/Temp/VMicroBuilds/dummy/esp8266_generic

Program size: 224,825 bytes (used 23% of a 958,448 byte maximum) (6.94 secs)
Minimum Memory Usage: 31864 bytes (39% of a 81920 byte maximum)




The Output Directory setting in Project>Properties has not changed and remains at the default setting : 

Quote:
 

$(SolutionDir)$(Configuration)\



which should lead to the output files being placed in the /Debug subdirectory of my project directory. 

So something must be overriding this location choice. 

What I am I doing wrong here? I am using VisualMicro 1611.5.1

Thanks

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Output Directory
Reply #1 - Nov 9th, 2016 at 9:41pm
Print Post  
Hi,

The users directory is actually the temp build folder unique to the project and is where the files have always been created.

At the end of the build process the output files are copied to the output directory set in the project properties as you have correctly stated.

However, $(Configuration), means use the currently configuration name to make a directory. This meas that if you have Release selected on the toolbar instead of "Debug" then the /Release sub directory will be used and not \Debug

$(SolutionDir) means the directory where the solution has been created, which can differ from the project folder because, depending on how you created or opened the project, Visual Studio can prompt you to save the solution in the folder above or below the project or in mydocuments\projects or based on tools>options settings.

So I suspect either the configuration is not set to debug or more likely the solution has been saved to a different folder than the project.

There is a big list of VS $(macro) names available. You can find the more common ones here
  
Back to top
IP Logged
 
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Re: Output Directory
Reply #2 - Nov 9th, 2016 at 11:15pm
Print Post  
Hi Tim,

Thanks - I think I get how it's supposed to work. 

And I think you are right that the solution must, at some stage, have been saved to a different folder than the project because the .sln file in my project folder has not been modified recently.

However, from within VS I can't see a way to determine the location of the current .sln file - nor can I see how I could have saved it to a different location - ie I do not see a ' Save Solution as...' option anywhere. How could I have saved the Solution File elsewhere? How can I locate it and re-save it to its correct location?? 

..

I have now deleted all the VS generated files from my project folder and regenerated them - and I now have partial success! If I set the 'Solution Configuration' to 'Release' then all is well and the output files are present in the /Release subfolder of my project folder. However, if I choose 'Debug' then it still does not work - there is no /Debug subfolder generated. 

The above is is also true for a clean, empty dummy project - I must still be doing something wrong.

Any ideas?

Thanks

n


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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Output Directory
Reply #3 - Nov 9th, 2016 at 11:23pm
Print Post  
Thanks for the update. 

You can save as many solutions as you like, each can include the same project, that's pretty much all that a .sln file does.

They are just notepad text files so easy to edit and change/remove paths if ever required.

Clicking the solution in the solution explorer and the clicking "File>Save as" also allows you to save to a new location.

There is often a tick box in the file>new project window which causes solutions to be saved in a different location to the project.

If you create or open a project using the visual micro menu items as opposed to file>new>project then:- clicking file "save all" will save the newly created solution to the project folder. as does clicking "yes" when prompted to save when a new project is closed.

Please try creating the \Debug folder yourself then building with Debug config set. Maybe it's a bug in visual micro that doesn't copy files if the folder doesn't exist. It rings a bell but maybe I only fixed it in the atmel studio version. Check you are on up to date visual micro build in tools>extensions and updates
  
Back to top
IP Logged
 
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Re: Output Directory
Reply #4 - Nov 9th, 2016 at 11:57pm
Print Post  
Hi Tim,

Yes - if I create the \Debug folder prior to build then VMicro populates it correctly. 

Interestingly, if choose 'Release' as the configuration option then the \Release folder is automatically created and populated. However as already discussed, the \Debug folder is NOT automatically generated with the 'Debug' configuration selected. However all is well if the \Debug folder already exists.

Perhaps something for you to look into?

Thanks for the info about the .sln file - I will play with it some more...

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Output Directory
Reply #5 - Nov 10th, 2016 at 12:02am
Print Post  
Thanks, vs sometimes creates the folder automatically.

Which version of visual micro are you using?
  
Back to top
IP Logged
 
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Re: Output Directory
Reply #6 - Nov 10th, 2016 at 12:38am
Print Post  
Hi Tim,

I am using 1611.5.1
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Output Directory
Reply #7 - Nov 10th, 2016 at 1:19am
Print Post  
Ok thanks
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint