-1

Using Visual Studio 2015 with the Xamarin extension, It seems to exhibit a strange behavior, when it comes to using unsafe code.

I have enabled the Unsafe code option in the project properties. Yet, I still get the IDE error, probably coming from intellisense. The code builds fine, however.

I found here, that for ASP.NET web projects, you can/should set the

Allow unsafe code

otherwise - in the web.config file. So for Xamarin, am I doing something wrong, or is it just the IDE bug ?

Sold Out
  • 1,321
  • 14
  • 34
  • 1
    There are two checkboxes you have to check. One for the Debug build, one for the Release build. Note the Configuration combobox at the top of the tab page. Yes, it doesn't make sense that this would be necessary, that is the way it rolled. – Hans Passant Mar 27 '18 at 07:26
  • @Hans Yap, that I have noticed and treated. Now I have noticed another project for iOS though... Good point though. Thanks.. – Sold Out Mar 27 '18 at 08:17

1 Answers1

-1

Strangely enough, after restarting the VSO IDE, I have noticed a new project for iOS. I would bet my back, that before I have only had the .Droid one, where I did allow unsafe code for both Release/Debug.

So now, after allowing unsafe code for all build types in the iOS project, my problem vanished.

There is a third project, which has the allow unsafe switch grayed-out..

... How typically M$ intuitive :)

Sold Out
  • 1,321
  • 14
  • 34
  • O, yeah.. I forgot, the M$ evangelists.. Just let the flames burn... Would you mind providing info what is wrong about my posts other than you dislike my sarcastic tone ? – Sold Out Mar 28 '18 at 19:21