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 Removing reference of shared item project is only effective after rebuild (Read 1625 times)
herman
Junior Member
**
Offline


Posts: 47
Joined: Jan 11th, 2017
Removing reference of shared item project is only effective after rebuild
May 29th, 2022 at 12:32pm
Print Post  
I am evaluating the use of shared item projects.

Way of work.

I have a Solution (MyLibraries) which includes a Shared item project (LocalUtils1).
In the LocalUtils project there is a file LocalDefines1.h
Create another Solution (NewSP9SLN) with a Arduino project (NewSP9).
Add as existing project the Shared items project LocalUtils1.vcxitems file.
Add reference to LocalUtils1 within NewSP9

Compile OK (see initial compile)
Add #include "LocalDefines1.h" to NewSP9.ino
Compile OK 
Remove reference from project NewSP9

Intellisense shows that include file is not availabe
But still compiles -> expected to fail


Clean project 

Build Clean 'NewSP9'
Deleted temporary build folder 'C:\Users\Herman\AppData\Local\Temp\VMBuilds\NewSP9\ArduinoCores_d32\Debug'
Solution Clean Complete

Intellisense show that include file is not available
But still compiles

Rebuild project

Compile fails as expected

See build logs in attached zip

Edit : When creating the vcxitems file for a library, are you using a utility program or did you build it yourself ?
« Last Edit: May 30th, 2022 at 12:02pm by herman »  

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


Posts: 2145
Joined: Feb 13th, 2019
Re: Removing reference of shared item project is only effective after rebuild
Reply #1 - May 30th, 2022 at 2:59pm
Print Post  
Thanks for the report.

When the reference was removed and it still compiled OK, this is due to the LocalDefines1.h still being cached in the build folder.

The issue with the Clean appears to be due to the "Build In Project Intermediate" option being enabled in vMicro > General > Global Options.

The Clean has cleared the folder in 'C:\Users\Herman\AppData\Local\Temp\VMBuilds\NewSP9\ArduinoCores_d32\Debug', although with the above option enabled your code was actually being built into 'C:\Userdata\VMicro\Projects\NewSP9SLN\NewSP9\Debug\', so the clean had cleared the wrong folder in this scenario, which the rebuild correctly picked up.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Removing reference of shared item project is only effective after rebuild
Reply #2 - May 31st, 2022 at 4:23pm
Print Post  
The latest release (22.04.29-5) should resolve the issues with the Clean action when using the Build In Project Intermediate, and is available from the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
 
IP Logged
 
herman
Junior Member
**
Offline


Posts: 47
Joined: Jan 11th, 2017
Re: Removing reference of shared item project is only effective after rebuild
Reply #3 - Jun 1st, 2022 at 12:46pm
Print Post  
Confirmed working OK now.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint