- Home /
add two compile instruction into "smcs.rsp",lead to internal compile error!
1.add two compile instruction; -unsafe -warnaserror
2.restart unity project
3.error CS0618 System.Security.Permissions.SecurityPermissionAttribute
is obsolete:`CAS support is not available with Silverlight applications` error CS0618:`System.Security.Permissions.SecurityAction` is obsolete:`CAS support is not available with Silverlight applications.`
4.if only add any one compile instruction,unity can't report anything error.
Answer by Bunny83 · Jul 13, 2016 at 04:26 PM
Well, you haven't said what's your targetplatform. It's generally not recommended to use unsafe code however on some platforms it's not supported at all.
Furthermore you use -warnaserror
so every warning that a compiler would raise is interpreted as error. Errors will make the compilation fail on purpose.
So under the line you probably use some code that uses the "SecurityPermissionAttribute" on some class. This attribute is marked as obsolete and will cause a warning when used. Since you use -warnaserror
that error will cause the compiler error.
You haven't given enough information on your problem. If you want more information you should tell us:
your target platform
Why you actually want to use unsafe code
if you use any additional thirdparty frameworks / libraries
Answer by tonny201411 · Jul 20, 2016 at 02:26 PM
thanks,your answer!
1.Target Platform:Android 2.use protobuf-net library ,contains unsafe code. 3.create a new empty,add two compile instruction; -unsafe -warnaserror,unity reports the same as error.