This method implicitly uses CAS policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons
I have just updated my nant script to compile my .net framework 4 solution. And I got the above error while generating commonassemblyinfo.cs in my solution. I visit开发者_JAVA技巧ed msdn website and also added
<NetFx40_LegacySecurityPolicy enabled="true" />
in my web.config under runtime->configuration. But that didn't solve my problem.
Can anyone please suggest what am I missing?
Are you using the latest NAnt build? The 0.91 release is in alpha, and supports building .NET 4 applications.
I had tried just updating the NAnt 0.86 configuration to support .NET 4, but got the error you showed. I downloaded the most recent NAnt build, and it worked. Despite being alpha, it seems stable, so far anyway.
There is an open request for folks to test the new build and report bugs.
精彩评论