user3179229
user3179229

Reputation: 215

'Access is Denied' error when configuring Visual Studio for debugging

Whenever I try to run some code on VS Express 2013 for Desktop it says that the project is out of date. When I searched for solutions they told me to search for devenv.exe.config but it wasn't there for me so I guessed WDExpress.exe.config was the correct one. I opened it up and pasted in:

<system.diagnostics>
  <switches>
    <add name="CPS" value="4" />
  </switches>
</system.diagnostics>

That didn't help so I pasted in:

<system.diagnostics>
    <sources>
        <source name="CPS" switchName="CPS" switchType="System.Diagnostics.SourceSwitch">
            <listeners>
                <add name="cpsFileLogger"/>
            </listeners>
        </source>
    </sources>
    <switches>
        <add name="CPS" value="Warning"/>
    </switches>
    <sharedListeners>
        <add name="cpsFileLogger" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\temp\devenv-cps.log">
            <filter type="System.Diagnostics.EventTypeFilter" initializeData="Warning"/>
        </add>
    </sharedListeners>
    <trace autoflush="true" indentsize="4" />
</system.diagnostics>

They were both pasted in after . The second block I found here: http://blogs.msdn.com/b/andrewarnottms/archive/2012/06/07/enable-c-and-javascript-project-system-tracing.aspx Whenever I try to save the file, it says some form of access denied. I also downloaded DebugView but it didn't capture anything. When I try to tick "Capture Global Win32" it says access denied. Anyone know how to fix this?

Upvotes: 2

Views: 5750

Answers (1)

Richard Banks
Richard Banks

Reputation: 12546

The config file you're editing is located in the Program Files folder, which will have UAC restrictions on it. You need to run your editor as Administrator in order to have the correct permissions needed to save the changes to the file system.

Upvotes: 4

Related Questions