Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

173
Views
Unsafe code won't compile on Visual Studio 2015

I'm trying to compile a program on the new DNX4.6 core, but it won't compile due to:

error CS0227: Unsafe code may only appear if compiling with /unsafe

This is my code:

    [CompilerGenerated]
    public unsafe class GrayscaleQuantizer : PaletteQuantizer
    {
I've looked online, and I can't get any source with the same problem as I have. I can't tick the 'Allow Unsafe Code' at the Build tab of the Project Properties, because there is no option to do so...

Does anyone know a solution?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

You need to set "allowUnsafe": true in the build options in project.json.

over 4 years ago · Santiago Trujillo Report

0

I wasn't smart enough to be able to figure it out with the help above. I did find that if you go to the solution explorer window and right click on properties, the one just above references, there will be an option to open. Click that one and then click on Build on the left. Allow unsafe code is on about the fifth line.

over 4 years ago · Santiago Trujillo Report

0

Thanks for your help 5 years into the future. I couldn't find it either. I didn't know you needed to do your steps above for the "Allow unsafe code" check box to appear in the "Build" section on the left. It shows up just below "Prefer 32-bit" check box, after you follow the above instructions.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!