Bug 10474 - System.SerializableAttribute is missing in Xamarin.iOS for Windows
Summary: System.SerializableAttribute is missing in Xamarin.iOS for Windows
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.0.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Marek Habersack
Depends on:
Reported: 2013-02-20 14:22 UTC by Alexey Sednev
Modified: 2013-02-20 15:30 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Alexey Sednev 2013-02-20 14:22:24 UTC
I have a project that compiles fine on Mac but when I open it using new Xamarin.iOS on Windows, I get an error:

Error	8	The type or namespace name 'Serializable' could not be found (are you missing a using directive or an assembly reference?)	[...]\ZXing.Net\common\BigInteger\BigIntegerException.cs	9	5	zxing.monotouch
Comment 1 Marek Habersack 2013-02-20 14:38:49 UTC
Please take a look inside the .csproj file and check whether includes our .targets file:

<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.MonoTouch.CSharp.targets" />

if instead of the above line you see:

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

or similar, please replace it with the one including our .targets file and try again. Please let us know if it fixed the issue!
Comment 2 Alexey Sednev 2013-02-20 15:24:04 UTC
I checked, it already was 

  <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.MonoTouch.CSharp.targets" />
Comment 3 Alexey Sednev 2013-02-20 15:28:04 UTC
Looks like I wasn't getting all of the errors when I tried to compile the project originally. I also discovered another error that helped me to explain what's going on. Specifying System.Serializable fixed the problem.

[...]\BigIntegerException.cs(9,5,9,17): error CS0104: 'SerializableAttribute' is an ambiguous reference between 'System.SerializableAttribute' and 'ZXing.SerializableAttribute'

Sorry for the false alert.
Comment 4 Marek Habersack 2013-02-20 15:30:22 UTC
Good that you sorted it out :)