SecurityAction.RequestMinimum is obsolete in .Net 4.0

后端 未结 2 1608
北海茫月
北海茫月 2021-02-07 11:19

Recently, our .Net client libaray is upgrading to compile against Net 4.0. After change the target framework to 4.0, the application has some compilation error.

In

相关标签:
2条回答
  • 2021-02-07 11:32

    Some searching led me here for a similar VB.net rdlc error (so yes, I know the question was tagged C#). I did not utilize the offending code, but I did find that a stray underscore caused this error, for example: in a textbox expression you might accidentally put:

    "This is a " & _
    "test"
    

    thinking you are in some code behind, but alas this generates this same error as listed above and once removed, the error was gone.

    0 讨论(0)
  • 2021-02-07 11:34

    From MSDN:

    In the .NET Framework version 4, runtime support has been removed for enforcing the Deny, RequestMinimum, RequestOptional, and RequestRefuse permission requests. These requests should not be used in code that is based on .NET Framework 4 or later.

    So, just remove it.

    0 讨论(0)
提交回复
热议问题