Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile unsafe code in VS2012 [closed]

How to resolve this error in VS2012 "Unsafe code may only appear if compiling with /unsafe”? I am not compiling from the command-line so I cannot simply add /unsafe. How can I compile unsafe code in VS2012?

like image 579
Shilpa Soni Avatar asked Jul 15 '13 09:07

Shilpa Soni


People also ask

How to allow unsafe code in Visual Studio 2019 Mac?

In Visual Studio for Mac, right click the project in the Solution window and select Options. In the Project Options window select Build - General. On that page there should be the allow unsafe code check box. Thank you for your feedback!


2 Answers

Right click on your project. Select "Properties". Switch to the "Build" tab. Check "Allow unsafe code".

like image 166
nvoigt Avatar answered Oct 09 '22 06:10

nvoigt


Open project properties, select Build tab and click on Allow unsafe code.

like image 30
Dayal rai Avatar answered Oct 09 '22 07:10

Dayal rai