title: "unsafe code may only appear if compiling with /unsafe"
body: <p>I have a web application and in one of the classes the following is defined (partial):</p>
  
  <pre><code>public class DllFunction
  {
      [DllImport("CARSDBI.dll", EntryPoint="CARSDBI_EnableLogging")]
      public static extern unsafe void CARSDBI_EnableLogging(int bSetting);
      ....
  }
  </code></pre>
  
  <p>I get the "unsafe code may only appear if compiling with /unsafe" error. Searching for this error message seems to show one solution: to check "Allow unsafe code" on the Project Properties page, in the Build tab.</p>
  
  <p>However, when I right-click on the project and select Properties and then Build option I don't see this checkbox, all I see is: </p>
  
  <p>a drop down list "Before running startup page" with "Build web site" selected, target framework with ".NET Framework 3.5" selected and Build Solution Action with "Build web site as part of solution" checked.</p>