oleg-shilo / cs-script.npp

CS-Script (C# Intellisense) plugin for Notepad++ (x86/x64)
MIT License
248 stars 52 forks source link

Cant Compile with Unsafe Code #40

Closed jaredaj3 closed 9 months ago

jaredaj3 commented 5 years ago

I am trying to compile a project that needs to use the unsafe keyword. However the compiler is sending an error(CS0227) whenever I do. I looked this error up and it seems that the usual fix to this is to change a setting to allow unsafe to be used(if this was visual studio). However i don't see where I can change this in this plugin. Any help on getting this to work would be appreciated.

oleg-shilo commented 5 years ago

You will need to pass compiler option unsafe.

In Visual Studio you do it indirectly, by ticking the checkbox "Allow unsafe code". In CS-Script you specify the option directly in the code with the "compiler option" directive (e.g. //css_co -unsafe )

image

jaredaj3 commented 5 years ago

Thanks it works!