Access denied when applying PostSharp attribute

0

When compiling a project with a Postsharp MethodInterceptionAspect, I get the following error:

Unhandled exception (postsharp-net40-x86-srv.exe release | .NET Framework 4.7.1): System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
      at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
      at ^nIsIyZ7TTJqY.GetKeyInfo(^8gP93Xsl\+Imn _0)
      at ^Up6wxUIUnN6a.^3w8852HL()
      at ^Up6wxUIUnN6a.^VfvrABjR()
      at ^Up6wxUIUnN6a.^SkiT()
      at ^Up6wxUIUnN6a.^8KD6D2SV(String _0)
      at ^cyC/TYSlPGB/.^wvPm(^RtksFin57NJ8 _0, ^8gP93Xsl\+Imn _1)
      at PostSharp.Sdk.Extensibility.Tasks.CompileTask.Execute()
      at PostSharp.Sdk.Extensibility.Project.ExecutePhase(String phase)
      at PostSharp.Sdk.Extensibility.Project.Execute()
      at PostSharp.Hosting.PostSharpObject.ExecuteProjects()
      at PostSharp.Hosting.PostSharpObject.InvokeProject(ProjectInvocation projectInvocation).

I'm not running Visual Studio (and do not want to) as admin.

This possible solution did not work: https://stackoverflow.com/a/43182648/201019

When I do run VS ad admin, I have no issue.

I have tried changing the project targeting framework from 4.6.1 to 4.5.1 to no avail.

postsharp
asked on Stack Overflow Feb 2, 2018 by Robert Sirre

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0