UserControl not marked as serializable

Hello,
I have a 2 projects in a C++ solution. First project has a form with user control. User control class (deriving from UserControl,  has  [Serializable] attribute; its List<Byte> private field has [NonSerialized]) is in second DLL project.
When I build any project, the error message is following: Code generation for property 'Tag' failed. Error was: 'Type'System.Windows.Forms.UserControl; in Assembly 'System.Windows.Forms,Version=2.0.0.0, Culture=neutral, PublicKeyToken=...' is not marked as
serializable.' It appears 2 times. When I click OK after last message, the compilation starts.
How can I get rid of it?

Hi px2195,
I understand that the visual studio will give this error message when you mark it as with the SerializableAttributeattribute. But why you want to mark the custom control with the SerializableAttributeattribute?
If you want to serialize the property of the custom control at design time, then you should read the following two articles,
http://msdn.microsoft.com/en-us/library/ms171834.aspx
http://msdn.microsoft.com/en-us/library/ms171833.aspx
Best Regards,
Bob Wu [MSFT]
MSDN Community Support | Feedback to us

Similar Messages

  • Exception Thrown 'System.Xml.XmlNode' in Assembly 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable

    I get the following exception when trying to send a message, this is happening in the orchestration while sending the message, can anyone help.
    ------------------------------------------Exception-----------------------------------------------------------------
    Exception occurred. Exception Description:Type 'System.Xml.XmlNode' in Assembly 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable..    at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType
    type)  
        at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)  
        at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()  
        at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, SerializationBinder
    binder)  
        at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, SerializationBinder
    binder)  
        at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteArray(WriteObjectInfo objectInfo, NameInfo memberNameInfo, WriteObjectInfo memberObjectInfo)  
        at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)  
        at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)  
        at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)  
        at Microsoft.XLANGs.Core.ObjectSerializer._serialize(Object graph, StringLookup sl)  
        at Microsoft.XLANGs.Core.ObjectSerializer.SerializeStateManager(IStateManager stateMgr, StringLookup lookup)  
        at Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx, Boolean idleRequired, Boolean finalPersist, Boolean bypassCommit, Boolean terminate)  
        at Microsoft.XLANGs.Core.ServiceContext.PendingCommit(Boolean ignore, XMessage msg)  
        at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean ignoreCommit, XMessage msg)  
        at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean ignoreCommit, XMessage msg)  
        at Microsoft.XLANGs.Core.ServiceContext.PendingCommit(Boolean ignore, XMessage msg)  
        at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean ignoreCommit, XMessage msg)  
        at Microsoft.XLANGs.Core.ServiceContext.PendingCommit(Boolean ignore, XMessage msg)  
        at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean ignoreCommit, XMessage msg)  
        at Microsoft.XLANGs.Core.ServiceContext.PendingCommit(Boolean ignore, XMessage msg)  
        at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean ignoreCommit, XMessage msg)  
        at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean ignoreCommit, XMessage msg)  
        at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean ignoreCommit, XMessage msg)  
        at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32 iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[] followCorrelations, SubscriptionWrapper& subscriptionWrapper, Context cxt, Segment seg, ActivityFlags
    flags)  
        at Microsoft.XLANGs.Core.PortBase.SendMessage(Int32 iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[] followCorrelations, SubscriptionWrapper& subscriptionWrapper, Context cxt, Segment seg)  
        at MyOrchestrationNamesegment3(StopConditions stopOn)  
        at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp) 

    Hi Madhu,
    Lets be clear here. If the first message is different to the second one, then the second message could be a non-serializable message. So we can't consider working of first message as proof to prove it would also work for send message.
    If this orchestration is working for a while and failed all in sudden, then we need to investigate why? See how do you construct the second message. Trace the orchestration and see what's been sent/created for second message. Check whether the second message
    is a valid XMLDocument. Also as said before, try to make the shape into an atomic scope and see whether it makes any difference.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Using Azure 2.5 cspack throws System.Runtime.Serialization.SerializationException: Type 'System.Xml.Linq.XElement' in Assembly 'System.Xml.Linq Not marked as serializable

    Hi,
    I am using Azure SDK 2.5 package, and when I run cspack from build window it throws me below error:
     error MSB4018: The "CSPack" task failed unexpectedly.
    System.Runtime.Serialization.SerializationException: Type 'System.Xml.Linq.XElement' in Assembly 'System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.
    But when I use the 2.4 SDK it works fine for me. Please advice how to fix this issue.
    Thanks,
    Ravi

    Hi,
     I am not sure about the root cause, but I did find a workaround for this at the following stackoverflow article
     http://stackoverflow.com/questions/26910773/azure-2-5-sdk-upgrade-causes-cspack-fail
     "Copy the Azure SDK 2.4 version cspack.exe, ServiceDescription.dll & Microsoft.ServiceHosting.Tools.MsBuildTasks.dll to Azure SDK 2.5 cspack.exe location and replace. This would using cspack 2.4 to pack with Azure SDK 2.5 runtimes."
     Let us know if this helps.
    Regards,
    Nithin Rathnakar

  • Mail going to junk folder is not marked as junk

    I have an automated email that I get occasionally. Without exception it ends up in the junk folder. However, even sitting in the junk folder, the message itself is not marked as junk.
    I've turned off all rules, and they still go to the junk folder. Any ideas?
    may be relevant: the email address is a google business apps email address.

    There are quite a few threads discussing this.
    Google is likely moving the items into it's spam folder which shows up as "Junk" in Mail.
    Since Mail did not put them there, it doesn't mark them as Junk as it has no idea why they were put there.
    As Gmail is IMAP-ish, your local copy matches what is on the server. Since it is in Spam on the server, it shows up in Junk in Mail.

  • Maverick 10.9.2 - Mail not marking Gmail emails as read when marked as such in Gmail website

    Since upgrading to 10.9.x, I have been having issues with OSX Mail application such that it is not marking emails as read when I have done so in Gmail website.
    Example:
    1). Received a new email in my Gmail account
    2). In mail.google.com, the email is shown as "New"
    3). In the Apple Mail application in my MacBook Air (MBA), the email is shown as "New"
    4). In mail.google.com, I opened the email, which is now marked as read (NOT new)
    5). In the Apple Mail application, the email is STILL shown as "New".
    I have tried syncing the Mail app, pressing "Go Offline", and leaving the Mail app open for hours, but no go.
    HOWEVER, if after step #4 above, I CLOSE the Mail app and opened it again, the Mail app will detect the change and immediately marked the same email as read (NOT new).
    It seems that the Mail app having trouble syncing with Gmail and marking read email as...well, read.
    My configuration:
    1). OSX 10.9.2
    2). Three (3) Gmail accounts configured using IMAP
    Anyone know the workaround to this?

    No one using Apple's own Mail program with Gmail?

  • Mail on iOS 5 and iCloud sync (Mails are not marked as read when I read them on my MacBook)

    Hello everyone,
    I am an iOS 5 and OS X Lion User in Germany and I have following question concering Mail on iOS 5 and iCloud.
    I have a MacBook Pro 13" with OS X Lion 10.7.2 and an iPhone 4 with iOS 5. I also have an iCloud account (I switched yesterday from MobileMe).
    When I receive a new e-Mail it will be pushed immediately to my iPhone an my MacBook. When I open this new e-mail on my iPhone, it is immediately marked as read on my MacBook. But when I open the new e-mail on my MacBook, it is not marked as read on my iPhone. I have manually to sync mail first.
    Does anyone know if this feature is not supported on iCloud and iOS 5? Thanks for your help!

    Add me to the list of people having this problem.
    I have 1 Gmail account a 2 Google Apps accounts and this happens with all 3. If I read a messaging in Mail.app, it DOES get marked read on my iPod Touch, though.
    If I read the emails on my iPod Touch, BlackBerry, or Gmail web interface, the read status does not get synced back to Mail.app unless I close and re-open it.
    Not sure if this is an Apple issue or a Gmail issue, but it's VERY annoying and somewhat defeats the purpose of using IMAP.

  • Native mapping with JPA doesn't work by default - not marked cascade persi

    I started to use our old TopLink native mapping but via JPA instead of EclpseLink native API.
    But at first execution it's already complaining of my mappings. When using the native mappings shouldn't EclipseLink interpret it to keep old behavior?
    What are the other expected changes of behavior so that I can fix them proactively?
    What is the workaround for this specific problem?
    The error is:
    java.lang.IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST: Id: 0
    DateTime: Mon Jun 08 02:00:00 EDT 2009
    Entry Type: 10009
    Entry Type In/Out: 10014
    calendarDate: Mon Jun 08 00:00:00 EDT 2009
    businessDate: Mon Jun 08 00:00:00 EDT 2009
    origin: timecard
    Inserted: true
    Changed: false
    Deleted: false
    Mon Jun 08 02:00:00 EDT 2009.
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.discoverAndPersistUnregisteredNewObjects(UnitOfWorkImpl.java:4016)
         at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.discoverUnregisteredNewObjects(RepeatableWriteUnitOfWork.java:182)
    persistence.xml is:
    <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
         <persistence-unit name="AllInOne" transaction-type="JTA" >
         <description>This represent all CITYADM schema mappings. It does include pmsi.</description>
              <exclude-unlisted-classes>false</exclude-unlisted-classes>
              <properties>
                   <property name="eclipselink.session-name" value="AllInOne"/>
                   <property name="eclipselink.sessions-xml" value="sessions.xml"/>
              </properties>
         </persistence-unit>
         <persistence-unit name="DataServices" transaction-type="JTA">
         <description>This represent all REPORTADM schema mappings</description>
              <exclude-unlisted-classes>false</exclude-unlisted-classes>
              <properties>
                   <property name="eclipselink.session-name" value="DataServices"/>
                   <property name="eclipselink.sessions-xml" value="sessionsDataServices.xml"/>
              </properties>
         </persistence-unit>
    </persistence>

    Hello Sebastien,
    You are using em.persist instead of uow.regsiterObject, which has different behaviour as mandated by the JPA specification. EclipseLink/TopLink automatically registered referenced objects through registerObject, but the JPA specification states that persist will only cascade if the mapping is marked cascade persist - otherwise it is required to throw the exception you see.
    If you wish to use the JPA with a project defined through native api, you will need to modify your mappings to match how you want to use the API. In this case, to get the same effect as you would from registerObject, you will need to mark your mappings as cascade persist. Depending on how you merge your entities (shallow, deep etc) you might also need to evaluate how you plan to use the JPA merge method and mark mappings as cascade merge appropriately.
    See setCascadeMerge on ForeignReferenceMapping.
    Best Regards,
    Chris

  • Iweb page asking my friend for mobile me id to see page not marked private

    After several days of trying, I got Iweb to publish my site. I sent the link provided. I tried the link myself...opens fine. Also opens on an XP / IE laptop after typing in the url.
    Now my friends can't open it. I did not mark it private and don't know why she can't open the site.
    It's asking for a mobile me id and password. I did not set one up.
    Now what.
    thanks.

    Welcome to the Apple Discussions. What's the URL for the site? What operating system is your friend using?
    OT

  • How do I set up hotmail in mail app to not mark every message it syncs to be new?

    Hello,
    Using Mail App Version 5.2 on OSX Lion.
    How do I set up hotmail in mail app to not mark every message it syncs to be new? (as in if if I check my mail on the browser and I have a new message.. and I read it.. but then open my mail app it syncs that email but says its new and unread)Here are my setting... what do I change?

    irodalgo wrote:
    but how come it does on my iphone?
    What do you mean it does on your iPhone?
    If you download a new email to your computer and read that mail and then download it to the iPhone it sees it as already read? Then maybe the iPhone is using the Hotmail IMAP system? Not sure.

  • Exchange Activesync, messages replied or forwarded are not marked

    I notice with the iPhone that when I reply or forward a message it is not marked on the server as such. So when returning to the office and browsing my messages it can be sometimes difficult to evaluate my status of inbox emails.
    Activesync does have this capability, I know it works with all versions of Windows Mobile/Windows CE.
    This post discussed the same topic, but I could not reply to it.
    http://discussions.apple.com/message.jspa?messageID=7635417

    The iPhone doesn't support replied/forwarded tags on emails via Exchange.
    You can submit feedback to Apple: http://www.apple.com/feedback/iphone.html.

  • Watched Episodes Are Not Marked Watched

    I have a new MacBook Pro with Snow Leopard and all updates are installed. My only problem now is that any TV shows or movies that I watch in Front Row are not marked watched in iTunes. The blue dot appears half full as if I've only watched part of each episode and there is no date indicated that it was last watched on this date.
    If I select an episode and play it from within iTunes, it gets marked watched along with the date it was last watched.
    Is there a fix for this? Thanks

    I've got the same problem. I'll watch shows with Front Row, and come back into iTunes only to see them marked as 'partially watched'. When I play them in iTunes, it starts at random places. I thought it might have been related to where I pause a podcast (so I can fast forward in 10second hops instead of 30-60), but I've let podcasts play right through, and it still does it.
    Is there anyway to fix this or do we just have to wait for an update an HOPE they actually fix it? Any place to submit this bug officially?
    My setup has been working fine for the last 1-1.5 years, until I upgraded to 10.6 and iTunes 9.

  • HEY ! I AM GETTING JUST A MUSIC NOTE MARK WHILE PLAYING TRAILERS IN ITUNES STORES

    HEY ! I AM GETTING JUST A MUSIC NOTE MARK WHILE PLAYING TRAILERS IN ITUNES STORES.PLEASE HELP!

    Shadow--hey thanks for the reply. No all the songs are in C drive on my computer. I do have an external drive as backup (Sync-Toy) but all my songs are on C. I was thinking of trying to delete ITUNES and Quiktime and reinstall. Do you think that would work? Jeff

  • Old photos not marked as duplicates, constantly imported

    I'm using photos on iCloud, linking two Macs, an iPhone and an iPad. As such, all photos show up on all devices, but aren't downloaded to them all: I use one of the macs as the "master" photo repository.
    However, when I look at a certain group of old photos on the iPad or iPhone - all taken in approximately 2002 with one old digital camera - they are downloaded to the iDevice and then treated by Photos as "new" whenever I connect the iDevice to the mac for syncing. If I import them I end up with multiple copies of the photos in my libraries, and even then they are once again marked as new and ready for importing from the iDevice. For some reason the various programs are not marking these photos as duplicates, even though they are.
    What this means is that around 250 of my old photos are constantly showing up as new photos. I've imported them and deleted the imported photos, but they still show up in the Mac Photos application as new photos - no matter what I do.
    My guess is that there is something about the metadata or file type of these old photos that means that the Photos app can't realise that these are duplicates of ones already in the library. Anyone else experienced this and found a solution?

    Welcome to the Apple Discussions.
    Option 1
    Back Up and try rebuild the library: hold down the apple and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    Regards
    TD

  • Front Row not marking video as watched properly

    I kept hoping that this issue would be resolved with one of the point releases, but here we are at 10.6.3 and it's still the same for me, so here's the problem.
    Before installing 10.6 I was running 10.5.8 and when using Front Row to watch a video (say a TV show I downloaded on iTunes) I'd watch it all the way to the end and the status circle next to it would show that it's been watched. iTunes would report the same status.
    Since installing 10.6 when I watch a video in Front Row all the way, the status shows up as if it's only partially watched instead of completely watched. I'm sure the video was over since I let it play all the way through until it comes back to Front Row.
    This is very annoying. Has anyone else experienced this? Is there some way to fix it? If not, I hope Apple can address this in 10.6.4.

    Bump.
    I have tried multiple solutions and non have solved this issue. I am rather disappointed that watching content on my AppleTV or via FrontRow does not mark the show as "watched" in iTunes. FrontRow will mark it part watched and AppleTV does not effect the watched status flag at all.
    I do believe this is an iTunes 10 issue though as I only saw it after upgrading to iTunes 10.
    Can anyone point me to a solution?

  • Music in library, why are some songs not marked with cloud?

    Music in library, why are some songs not marked with cloud icon?

    Welcome to the Apple Community.
    Where exactly are you looking and what do they look like, there are several iCloud icons used in iTunes.
    Maybe a screenshot.

Maybe you are looking for

  • Download tutorial "How to Use Stateful IFrames in an Web Dynpro for Java"

    Hi, This article is very nice: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10aae7db-2e08-2d10-1f97-86a221a9ea46?quicklink=index&overridelayout=true regarding iFrames and Google Maps integration. I'm wondering where I can downlo

  • Creating a Double[][]

    Hello, I am trying to make a Double[][] like so..... Double[][] size = {{200,200,200,200},{50,50,50,50,50,50,300}};I have done this before in other programs. however when i try it now i get this error..... mohadib@mohadib ~/java_restore/contacts_act-

  • PSE6 Error when using Brushes or doing "too much"

    I get the error " Adobe Photoshop Elements 6.0 (Editor) has encountered a problem and needs to close" anytime I use the brush tool or if I try to do too many layers (I'm doing digital scrapbook pages)  I'm running Windows XP SP3 and have 2.7 GHz proc

  • Dictionary: no entries found, why ?!

    I have the icon, but when I enter the .app and type in a word (any word) I gt "no entries found."  The only one that works is after I click Wikipedia. Why is that? How can I download whatever files I am missing?  And no, I do not have an installation

  • My 'enter' key doesn't work in the web-adress bar

    It just acts like I didn't press the key at all! I've even tried the virtual keyboard! Please help me