CodeSmith Community
Your Code. Your Way. Faster!

Partial declarations must not specify different base classes AND Type already defines a member with the same parameter types

Latest post 02-05-2008 3:51 PM by bgjohnso. 6 replies.
  • 02-04-2008 12:19 PM

    Partial declarations must not specify different base classes AND Type already defines a member with the same parameter types

    Version 2.2.0 generates a solution that returns the following errors for most of the entities I've declared in the database.  On top of not supporting output parameters, version 2.2.0 seems very difficult to use compared to the previous version. Any help with these issues would be greatly appreciated.

     

    Partial declarations of 'Entity' must not specify different base classes.

    Type 'Entity' already defines a member called 'Entity' with the same parameter types

    Filed under: , ,
    • Post Points: 35
  • 02-04-2008 12:42 PM In reply to

    • bgjohnso
    • Top 10 Contributor
    • Joined on 09-15-2005
    • Spokane, WA
    • Posts 764
    • Points 22,530

    Re: Partial declarations must not specify different base classes AND Type already defines a member with the same parameter types

    Are you generating to a new directory, or are you generating to a directory that contained a solution generated from an older version of netTiers.  There have been some breaking changes in the past, so depending on how old your previous version was you may have problems.  Try generating to a clean directory and see what happens.

     Also, "seems very difficult to use compared to the previous version" is pretty vague.  We can't do much to help with that statement, so if you can elaborate it would be beneficial.  Are you having issues other than the ones described here?  What version were you using before (specific version from changes.log would be very helpful)?  What version are you using now (again, check changes.log to get the exact build version).

    Ben Johnson
    ------------------------------
     Member of the .NetTiers team
     Visit http://www.nettiers.com
    ------------------------------

    • Post Points: 35
  • 02-04-2008 2:34 PM In reply to

    Re: Partial declarations must not specify different base classes AND Type already defines a member with the same parameter types

    Yes, I have used .netTiers v2.1.0.511 for a couple years and within the past few months I've tried to acclimate to the newest versions.  The current version I'm having issues with is .netTiers v2.2.0.603.  So, I am generating to a new directory and opening the new solution which creates the identified errors upon compilation.  Another issue I've run into is the support of output parameters in custom stored procedures, which I've noted in other posts.  As far as I know this is still outstanding, although a user wrote a patch for v2.1 of Nettiers.  Let me know if anymore information can help.

    • Post Points: 35
  • 02-04-2008 2:37 PM In reply to

    Re: Partial declarations must not specify different base classes AND Type already defines a member with the same parameter types

    Here is a link to the Output Parameters bug from several months ago.  I actually got an email from another user today with the same issue.

    http://community.codesmithtools.com/forums/p/7027/26776.aspx#26776

    • Post Points: 5
  • 02-04-2008 4:28 PM In reply to

    • bgjohnso
    • Top 10 Contributor
    • Joined on 09-15-2005
    • Spokane, WA
    • Posts 764
    • Points 22,530

    Re: Partial declarations must not specify different base classes AND Type already defines a member with the same parameter types

    Well, if you are going to upgrade I would suggest going to one of the latest nightly builds.  There have been almost 100 builds since version 603 and the largest portion of those were bug fixes (very little additional functionality).  By using such an old build, we could spend a ton of time tracking down issues that have most likely already been fixed.

    I can't say anything about the output parameters for views.  Unfortunately, I don't have the time to dig in and figure out what would need to change.  Most times, the code base for views and tables is very similar so it might just be a matter of looking at the implementation for tables and copying it for views (and changing the necessary schema objects).

    Ben Johnson
    ------------------------------
     Member of the .NetTiers team
     Visit http://www.nettiers.com
    ------------------------------

    • Post Points: 35
  • 02-05-2008 3:40 PM In reply to

    Re: Partial declarations must not specify different base classes AND Type already defines a member with the same parameter types

    Thanks.  I was using the Nettiers 2.2 version promoted on the site, but per your recommendation I downloaded last night's build (2008.02.04) and get the same errors.  Here are a couple code snippets with the error commented if anyone else is interested:

    ********************************************************************************************

    ********************************************************************************************

    #region Using directives

    using System;

    #endregion

    namespace NamespaceName.Biz

     ///<summary>
     /// An object representation of the 'ViewEntityName_Base' view. [No description found in the database] 
     ///</summary>
     /// <remarks>
     /// This file is generated once and will never be overwritten.
     /// </remarks> 
     [Serializable]
     [CLSCompliant(true)]
     public partial class EntityNameBase : EntityNameBaseBase
     {
      #region Constructors

      ///<summary>
      /// Creates a new <see cref="EntityNameBase"/> instance.
      ///</summary>
            public EntityNameBase() : base() { } //Type 'EntityNameBase' already defines a member called 'EntityNameBase' with the same parameter types C:\..\Views\EntityNameBase.cs

      
      #endregion
     }
    }

    ********************************************************************************************

    ********************************************************************************************

    #region using directives

    using System;
    using System.ComponentModel;
    using System.Collections;
    using System.Xml.Serialization;
    using System.Runtime.Serialization;

    #endregion

    namespace NamespaceName.Biz
    {
     ///<summary>
     /// An object representation of the 'EntityName' table. [No description found the database] 
     ///</summary>
     [DataContract]
     [Serializable, DataObject]
     [CLSCompliant(true)]
        public abstract partial class EntityNameBase : EntityBase, Burgess.Biz.IEntityName, IEntityId<EntityNameKey>, System.IComparable, System.ICloneable, IEditableObject, IComponent, INotifyPropertyChanged //Partial declarations of 'EntityNameBase' must not specify different base classes C:\..\EntityNameBase.generated.cs
     {  
      #region Variable Declarations
      
      /// <summary>
      ///  Hold the inner data of the entity.
      /// </summary>
      private EntityNameEntityData entityData;

    • Post Points: 35
  • 02-05-2008 3:51 PM In reply to

    • bgjohnso
    • Top 10 Contributor
    • Joined on 09-15-2005
    • Spokane, WA
    • Posts 764
    • Points 22,530

    Re: Partial declarations must not specify different base classes AND Type already defines a member with the same parameter types

    This looks like a naming collision based on your view and table names.  You have a view called ViewEntityName_Base and a table called EntityName.  The view object is getting created as EntityNameBase (stripping View from the prefix based on StrippedTablePrefixes(?) and _ based on naming rules).  Also, the way netTiers works is it creates a base class for your entity which in your case becomes EntityNameBase.  Hence, the conflict.  You can either rename your view to something that doesn't conflict or use the mapping.config (or Alias file) to provide an alternative name for the view.

    Ben Johnson
    ------------------------------
     Member of the .NetTiers team
     Visit http://www.nettiers.com
    ------------------------------

    • Post Points: 5
Page 1 of 1 (7 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems