Anyone know how to change the compiler switches in visual studio.net? I have been looking as I keep getting this error
": Unsafe code may only appear if compiling with /unsafe:
Printable View
Anyone know how to change the compiler switches in visual studio.net? I have been looking as I keep getting this error
": Unsafe code may only appear if compiling with /unsafe:
Here you go, this will get you started:
http://msdn.microsoft.com/library/de...harpspec_A.asp
When this loads up, you will get just a general description of unsafe code. To get more detailed about it, click on the sub items on the left hand side. There are 8 different topics under the unsafe heading.
read through it- I understand what unsafe code is... I just can't figure out how to set compiler switches from inside the visual studio environment to allow the compilation of unsafe code.
Sorry, I misunderstood your post. I haven't had to do this yet, so I don't have the answer for you. Sorry. Maybe this reply will bump up this thread so others that have done it will reply.
To set the unsafe switch, you will need to look at the project properties. Under the configuration properties\build there is a property allow unsafe code blocks which needs to be set to true to compile unsafe code.
hummm I hunted around for any of those terms... am I looking in the right window? I don't even see those headers in the menu bar.....
Right click on your project (looks like you clicked on the solution) in the Project Explorer and choose "properties."
You should see this. Make sure you choose "For All Configurations" otherwise it will only work on Debug or Release.
awesome thanks I have been hunting for that for some time now!