VS Arduino
Visual Micro >> Visual Studio 2017, 2019, 2022 >> vMicro solution under source control is unbuildable
https://www.visualmicro.com/forums/YaBB.pl?num=1616609636

Message started by mdevol on Mar 24th, 2021 at 6:13pm

Title: vMicro solution under source control is unbuildable
Post by mdevol on Mar 24th, 2021 at 6:13pm
When a vMicro solution is under TFS source control, a build fails because it gets an "Access Denied" exception trying to copy the .cpp/.h files (build output attached).  When files are under TFS source control, the read only attribute is set unless it has been checked out for edit.  From the error message/stack dump vMicro must be trying to open the file for write access and is denied because of the read-only attribute. A non-source control version of the solution successfully builds .  Any suggestions on how to get vMicro to be compatible with TFS source control?
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=vmicro_build_output_001.txt ( 45 KB | 7 Downloads )

Title: Re: vMicro solution under source control is unbuildable
Post by mdevol on Mar 24th, 2021 at 6:22pm
Forgot to mention that I'm using VS 2017 and vMicro 2021.106.0

Title: Re: vMicro solution under source control is unbuildable
Post by Simon@Visual Micro on Mar 24th, 2021 at 11:28pm
If you run Visual Studio as an Administrator does the error persist?

Title: Re: vMicro solution under source control is unbuildable
Post by mdevol on Mar 25th, 2021 at 3:25am
Yes

Title: Re: vMicro solution under source control is unbuildable
Post by Tim@Visual Micro on Mar 25th, 2021 at 3:36am
The problem is that we can not access the build folder due to a permissions problem. Possibly a virus checker preventing it or just windows permissions. This is unrelated to the permissions/readonly state of the source code.

The error is "System.UnauthorizedAccessException: Access to the path ... is denied"

[code]C:/Users/mark.devol/AppData/Local/Temp/VMBuilds/PhoenixLink/adafruit_adafruit_feather_m0_express/Debug[/code]

Does the build folder exist? It should be automatically created.





Title: Re: vMicro solution under source control is unbuildable
Post by mdevol on Mar 26th, 2021 at 2:28am
Yes the build folder exists and the source files are in it.  If I remove the read-only attributes, the solution builds just fine.

Title: Re: vMicro solution under source control is unbuildable
Post by Tim@Visual Micro on Mar 29th, 2021 at 9:26pm
Thank you, we have replicated this issue and will produce a fix over the next 24 hours.

Title: Re: vMicro solution under source control is unbuildable
Post by Simon@Visual Micro on Mar 29th, 2021 at 10:26pm
Please try the latest release (21.01.06.12) from the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

Title: Re: vMicro solution under source control is unbuildable
Post by mdevol on Apr 2nd, 2021 at 5:45pm
Thank-you, that has fixed my problem.  Will this be incorporated into the next release of VisualMicro?  Also, I noticed with this updated that when I loaded the solution I got the following message in VS studio's status bar at the bottom:  Visual Studio Intellisense - Unable to write intellisense of sketch Access to the path 'D:\Projects\USAEPG\Orion\Development\PLink\Firmware\PhoenixLink\__vm\PhoenixLink.vsarduino.h' is denied.

I checked the file and the read-only attribute is set.  There are 2 other files in that directory and their read-only attribute is not set.

Title: Re: vMicro solution under source control is unbuildable
Post by Tim@Visual Micro on Apr 7th, 2021 at 10:31pm
Thanks, yes it will be in the next release. We do need to write to the files in the _vm folder. I suggest you exclude that folder from source control. The folder does not contain sources that need to be backed up. However for the next release we will see if we can unset the readonly flag when required.

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