Visual Studio Unable to Copy File …Access to the Path is Denied

Visual Studio Unable to Copy File …Access to the Path is Denied



I am unable to build my project when the Solution Configurations dropdown is set to 'Test'. Multiple errors appear, most of which read 'Unable to copy file [File location] to [copy file location] Access to the path [copy file location] is denied.
I have already checked or attempted the following, and the issue is still unresolved:





Did you try running VS as admin?
– Ziv Weissman
Aug 24 at 17:30





Sorry, I forgot to include in my list that I have tried running Visual Studio as an Admin
– Be-All
Aug 24 at 18:14





Since TEST isn't a standard configuration, we can't be expected to know much about it or what it may entail. We really need an MCVE. In this case, we need a set of steps - start from VS running with no solution loaded, create new projects and get us to the point where we have a TEST configuration and can see these errors.
– Damien_The_Unbeliever
Aug 24 at 18:21


TEST





If you manually go to the build folder (for TEST) can you access it? can you access the files there?
– Ziv Weissman
Aug 24 at 18:28






I deleted all the files in the ...bin/Test folder some time ago, in hopes that this might solve the problem.
– Be-All
Aug 24 at 19:34




3 Answers
3



Based upon what you have provided, to me it seems like a permissions/access issue.



Are you logged in as a Local Admin? If not you may want to get elevated privileges or see if you have other security related items holding you back (e.g. group policy coming down that may be inhibiting you etc).



Speaking of elevate privileges, have you tried right clicking on the Visual Studio exe and doing "Run As Admin"? This may help as well.



You could also download ProcMon (Process Monitor) and do a trace while you are trying to build. This may provide answers to what is going on.
ProcMon is now owned by Microsoft (used to be SysInternals, but they got bought by MS many moons ago) --- I would download it, run a trace, then do a filter for "Access Denied" for the results to see what you may not have access to.



Perhaps try logging in as a different user to see if that helps?



Hope this helps!!



It might be because the file your trying to write already open in another program like Notepad.



I clicked properties, added Full Control and Modify permissions for users, and then did a clean and rebuild on my project. I did this at the folder level, and parent folder levels before the issue was resolved.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)