VS Arduino
>> >> Removing reference of shared item project is only effective after rebuild
https://www.visualmicro.com/forums/YaBB.pl?num=1653827547

Message started by herman on May 29th, 2022 at 12:32pm

Title: Removing reference of shared item project is only effective after rebuild
Post by herman on May 29th, 2022 at 12:32pm
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 ?
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=vmicrolog.zip ( 43 KB | 1 Download )

Title: Re: Removing reference of shared item project is only effective after rebuild
Post by Simon@Visual Micro on May 30th, 2022 at 2:59pm
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.

Title: Re: Removing reference of shared item project is only effective after rebuild
Post by Simon@Visual Micro on May 31st, 2022 at 4:23pm
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

Title: Re: Removing reference of shared item project is only effective after rebuild
Post by herman on Jun 1st, 2022 at 12:46pm
Confirmed working OK now.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.