Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
Visual Micro >> Visual Studio 2017, 2019 >> Output Directory of Shared Code Project
https://www.visualmicro.com/forums/YaBB.pl?num=1563417137

Message started by Glen H on Jul 18th, 2019 at 3:32am

Title: Output Directory of Shared Code Project
Post by Glen H on Jul 18th, 2019 at 3:32am
Hi,

I have a solution with 2 Arduino Shared Code projects.  Within the ino file, the #include statements that reference files in the shared projects do not show indicate any errors, and I'm able to "go to definition" successfully, which indicates the references are found correctly within Visual Studio.  However, when I build, one of the shared projects builds successfully, while other shows this error:

Main.ino: 2:46: fatal error: src/PathToFolder/ImportedFile.h: No such file or directory

It appears that during compilation, the files are copied to this temp folder:

C:\Users\[user]\AppData\Local\Temp\VMBuilds\[ProjectName]\[BuildEnvironment]

For the project that I'm able to compile successfully, I see that the files within the shared project are copied to:

C:\Users\[user]\AppData\Local\Temp\VMBuilds\[ProjectName]\[BuildEnvironment]\Debug\[Path to File]

For the shared project that does not compile, the files are copied to:

C:\Users\[user]\AppData\Local\Temp\VMBuilds\[ProjectName]\[BuildEnvironment]\Debug\[Path to File]\Debug.Shared\[Path to File]

How is this temporary output path determined?  Is there something configured incorrectly in my project that's causing different shared projects to output to different locations?

Thank you for your help,
Glen

Title: Re: Output Directory of Shared Code Project
Post by Visual Micro on Jul 18th, 2019 at 6:59pm
Hi,

Please provide the info requested in the yellow box above.

I don't believe there is any config that you can have made to change this. Please zip and attach or email the .vcxitems file from the shared project folder that failed. Also say what the full path and name is?


Thanks

email address in yellow box above

Title: Re: Output Directory of Shared Code Project
Post by Visual Micro on Jul 22nd, 2019 at 1:08pm
Thanks for the info. You should try to keep arduino project names simple and short. I suggest rename your project called "LinkItOne.Shared" to "LinkItOne_Shared". Make sure you rename the project, folder and any files that use the same format.

Title: Re: Output Directory of Shared Code Project
Post by Glen H on Jul 27th, 2019 at 10:31pm
I recreated the project and folder as LinkItOneShared, copied in the source files, and had the same issue.  I recreated it a second time named Core, and it seems to work.  I've tried with several different names, and it seems to work sometimes and not others.  I haven't noticed any commonalities between the projects that passed/faile, but when it failed it would always copy the main project files to:

C:\Users\drumb\AppData\Local\Temp\VMBuilds\LinkItOne\LinkIt_linkit_arm_linkit_one\Debug

and the shared project files to:

C:\Users\drumb\AppData\Local\Temp\VMBuilds\LinkItOne\LinkIt_linkit_arm_linkit_one\Debug.Shared

Title: Re: Output Directory of Shared Code Project
Post by Visual Micro on Jul 28th, 2019 at 12:11pm
Discussion continued here





SharedProjectMultiExample_001.png (54 KB | 1 )

Visual Studio Ide for Arduino » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2019. All Rights Reserved.