Bug 4777 - Serializer exception from type service
Summary: Serializer exception from type service
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: Low normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-04-30 16:58 UTC by Mikayla Hutchinson [MSFT]
Modified: 2012-05-05 06:36 UTC (History)
1 user (show)

Tags:
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 or GitHub 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:
Status:
RESOLVED FIXED

Description Mikayla Hutchinson [MSFT] 2012-04-30 16:58:03 UTC
Does AspNetParsedDocument (and all its fields) have to be serializable? We don't need to persist them, we can parse them as needed.

ERROR [2012-04-30 16:54:18Z]: Error while writing type system cache. (object:ICSharpCode.NRefactory.CSharp.CSharpProjectContent)
System.Runtime.Serialization.SerializationException: Type MonoDevelop.AspNet.Parser.AspNetParsedDocument is not [Serializable].
  at ICSharpCode.NRefactory.Utils.FastSerializer.CreateScanner (System.Type type) [0x0034b] in /Users/michael/Mono/monodevelop/main/contrib/ICSharpCode.NRefactory/Utils/FastSerializer.cs:435 
  at ICSharpCode.NRefactory.Utils.FastSerializer.GetScanner (System.Type type) [0x00013] in /Users/michael/Mono/monodevelop/main/contrib/ICSharpCode.NRefactory/Utils/FastSerializer.cs:345 
  at ICSharpCode.NRefactory.Utils.FastSerializer+SerializationContext.Scan () [0x000ca] in /Users/michael/Mono/monodevelop/main/contrib/ICSharpCode.NRefactory/Utils/FastSerializer.cs:151 
  at ICSharpCode.NRefactory.Utils.FastSerializer.Serialize (System.IO.BinaryWriter writer, System.Object instance) [0x0001b] in /Users/michael/Mono/monodevelop/main/contrib/ICSharpCode.NRefactory/Utils/FastSerializer.cs:774 
  at MonoDevelop.Ide.TypeSystem.TypeSystemService.SerializeObject (System.String path, System.Object obj) [0x00027] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs:457
Comment 1 Mike Krüger 2012-05-01 09:08:09 UTC
This needs to be build differently. 

Can the asp.net document contain members invoked from a code behind file ?

-> If yes the data needs to be inserted in the project content.
-> If no the data shouldn't be inserted and asp.net needs to use an own project content.

But in any case it needs to be represented differently. When I revisit the asp.net completion I'll take a look at it.
Comment 2 Mikayla Hutchinson [MSFT] 2012-05-01 13:47:53 UTC
No, the project cannot reference any content from the aspx file directly. The aspx file is compiled into an assembly that references the project assembly. The CodeBehind/designer files are compiled into a class in the project assembly, and the aspx class subclasses the CodeBehind class. The designer file can contain fields that are assigned in the aspx subclass - this is the only way that the project can access objects from the aspx file.
Comment 3 Mike Krüger 2012-05-05 06:36:32 UTC
should be fixed.