Repository navigation
Version 9.0: List<int> seems to always be nulled in transit #4680
Description
Activity
Hi.
List<T>is not serializable. You have to useMobileList<T>to get a list serialized. Same holds for MovileDictionaryHi.
List<T>is not serializable. You have to useMobileList<T>to get a list serialized. Same holds for MovileDictionaryThe documentation implies otherwise? A couple of my other objects use
List<string>andList<int>and don't appear to be failing, but those are only being loaded up from the dal, not edited. This pitfall appears only to be on the client side when the client is setting or modifying the property. If it is not supported, but yet is implied that this type as a primitive should be, perhaps the v9 doc needs adjusted?Also sorry for the lack of pleasantries, I tend to be very dry and emotionless when I'm working - so hello, all.
How you implement these methods is up to you, but you should be aware that the SerializationInfo class is a key/value store, so you can store any "primitive" data in it that can be normally serialized using MobileFormatter. This includes: All .NET primitive types string DateTime, TimeSpan, DateTimeOffset, DateOnly, TimeOnly Guid byte[] char[] List<int>You are correct. The docs suggest that but I think this is out of the box not possible. Maybe @rockfordlhotka can shed some light on it. He wrote the new doc section :D
Nevertheless with MobileList it should definitely work.
Anyway I'll try your code if there's a bug.
Could you please elaborate on the cases where it works? How's the object defined and which ways are the lists being sent?
Thanks in advanceHa! Yeah a documentation bug is what I have my money on.
No worries, I already fixed the issue using a MobileList and did the same to the others just in case. Many thanks though, but perhaps we need a point of clarification and perhaps a modification to the document.
Thanks!
- added 3 commits that reference this issue
on Feb 14, 2026 - linked a pull request that will close this issueClarify MobileFormatter collection type limitations in docs #4822
on Feb 14, 2026 - added a commit that references this issue
on Feb 14, 2026 This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
- locked as resolved and limited conversation to collaborators
on Aug 16, 2026
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Describe the bug
One of my business objects has a List property. It appears to always be lost by the serializer - while my Create() method is RunLocal, the call to Insert() results in a null reference exception when the property is encountered. Even explicitly initializing and optionally setting a test value still results in a null.
The upgrading to v9 document seems to imply that List is explicitly supported?
Version and Platform
CSLA version: 9.0.0
OS: Windows
Platform: ASP.NET Core MVC
Code that Fails
Then the code that sets it:
Stack Trace or Exception Detail
When I replaced the object with a string property, it works, but this is not ideal for type safety.
Additional context
Add any other context about the problem here.