The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Warnings after upgrade to v2007.0.0730.0

Last post 07-28-2008, 3:39 AM by DanM. 6 replies.
Sort Posts: Previous Next
  •  07-30-2007, 7:37 PM 4189

    Warnings after upgrade to v2007.0.0730.0

    I just upgraded my developer edition of ES to v2007.0.0730.0 (uninstalled both ES and MyGeneration, deleted both directories and reinstalled) and I now see several warnings upon compile to the effect of: Warning 8 [classname]' does not need a CLSCompliant attribute because the assembly does not have a CLSCompliant attribute. What would cause this?

    Also, regarding ES upgrades, when ES is upgraded, I assumed that I need to delete my current references to the four ES libraries and re-add them, but is that all I need to do? I'm just starting this project, so I went ahead and deleted all of the previously created generated and custom class files as well, then recreated them. Could that have caused my problem? If so, how might I go about fixing it?

    Lastly, I understand that the custom classes only need to be generated once, but does that apply even if there are columns added/removed/renamed in the table? How about when ES is upgraded?


     

  •  07-30-2007, 8:07 PM 4191 in reply to 4189

    Re: Warnings after upgrade to v2007.0.0730.0

    The CLS compliance warnings can be safely ignored, and will be fixed in the next maintenance release.

    The release notes on the Support menu will give detailed upgrading instructions. Typically, if just updating from one release to the next, the only thing you need to do is regenerate from the Generated Master template.

    The Custom Master template just generates an empty partial class where you can add your custom code. You would usually not want to regenerate these, and wipe out all your hard work. Wink In fact, if you generate them into the same folder, the template has code in it that will prevent it from accidentally over-writing existing Custom classes.

    You would definitely want to remove and re-add references if you are converting from the Trial to the purchased version. But, once you reference assemblies in the redistributables folder, any upgrade should over-write the old assemblies, and not require removing or re-adding references. Again, the release notes will contain specific instructions. For example, we changed the folder structure for the Ce assemblies after the 2007.0.0328 release.


    David Neal Parsons
    www.entityspaces.net
  •  07-31-2007, 2:18 AM 4193 in reply to 4189

    Re: Warnings after upgrade to v2007.0.0730.0

    Rich, if you're disturbed by the CLSCompliant warnings, you could add the following lines to the AssemblyInfo.cs:

    Code:
    using System;
    
    [assembly:CLSCompliant(false)]
    
    The warnings should disappear.

    Marcel Roma
    soft-xpress.de
  •  07-31-2007, 6:22 AM 4198 in reply to 4193

    Re: Warnings after upgrade to v2007.0.0730.0

    maro158:

    Rich, if you're disturbed by the CLSCompliant warnings, you could add the following lines to the AssemblyInfo.cs:

    Code:
    using System;
    
    [assembly:CLSCompliant(false)]
    
    The warnings should disappear.

    Strangely enough, that's the line of code triggering the warning in several classes, only there is a difference. Mine does not have the "assembly:" reference:

    Code:
    [CLSCompliant(false)]

    When I change it to match what you suggested, I get the following warning: "Warning 1 'assembly' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'field'. All attributes in this block will be ignored."

    Oddly enough, when I opened the project the morning, I right-clicked on the project file and selected "Build", and the warnings were gone. Scratching my head, I right-clicked on the project file and selected "Rebuild", and they all reappeared. Kind of difficult to wrap my mind around this one with this sort of behavior. Hmm

     

  •  07-31-2007, 6:25 AM 4199 in reply to 4191

    Re: Warnings after upgrade to v2007.0.0730.0

    Thanks for the tips, David.

     

  •  07-31-2007, 6:43 AM 4201 in reply to 4199

    Re: Warnings after upgrade to v2007.0.0730.0

    You're welcome, and here's one more Smile

    You do not need to edit each of the offending Properties/Methods. The valid attribute location of that line is towards the top of the file at the assembly level, just below the "using" statements. By adding it above the namespace for just one of your Custom class files, it should eliminate the warning for all in that namespce, including the Generated classes.

    Code:
    using EntitySpaces.Interfaces;
    using EntitySpaces.Core;
    
    [assembly: CLSCompliant(false)]
    namespace BusinessObjects

    David Neal Parsons
    www.entityspaces.net
  •  07-28-2008, 3:39 AM 10384 in reply to 4201

    Re: Warnings after upgrade to v2007.0.0730.0

    Just a note here that it says that this will be fixed in an update, but I got a load of these warnings running the latest version of EntitySpaces 2008 this morning. So not fixed then, or should we just continue to use the tips already mentioned in the thread to kill the warnings?

    Thanks, Dan

    Filed under:
View as RSS news feed in XML