Write access to the local file system inside a Visual Studio Add-In
I am developing an Add-In (in C#) for Visual Studio 2012 and I am trying
to use NLog to log information from the Add-In code to a local log file
(e.g. in the same local directory that the Add-In is being loaded from).
Nothing was being logged and then when I debugged things some more it
seems that I just do not have write access to the local file system from
inside the Add-In code. Simply trying to open a local file and write a
line to it throws a System.UnauthorizedAccessException:
[System.UnauthorizedAccessException] = {"Access to the path 'C:\\Program
Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\test.txt' is
denied."}
Is this just a basic limitation for Add-Ins? Does VS just not allow write
access to the local file system?
Thanks for any insight you can offer
Alan
No comments:
Post a Comment