Hi,
"j" <mr*********@gm ail.comwrote in message
news:11******** *************@4 2g2000cwt.googl egroups.com...
I am getting this error when trying to compile code generated using
xsd.exe:
The type 'TrailerList' already contains a definition for
'rCMSTrailerLis tRow'
c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\photoblob ws\4e7bb29f\6f5 0d4db\App_Code. vnsjeqin.4.cs
What could cause this error in a generated file? What should I look for
in the code file to fix it?
Alvin Bruney [MVP] wrote:
Usually, that error means that the type is already defined in an assembly
somewhere in the project. The easiest way to eliminate this is to do a
search of your project for that type. You should have only one definition.
(could you set your newsreader to insert the signature after the quote?
Or post your reply after the quote? With the current settings, I have to
manually copy/paste the OP's reply. Thanks!)
Actually, this error is not what you describe. In ASP.NET, this error
occurs when the same control is declared twice. This often occurs in
ASP.NET 2.0 because the controls found in the ASPX page are
automatically declared in a partial class contained in the file
<pagename>.aspx .designer.cs. If the OP declared the control in the
<pagename>.aspx .cs page (as it was done in ASP.NET 1.1), the compiler
will throw this error.
The solution is to simply remove the control's declaration (protected
ControlType controlName) from the aspx.cs page.
To the OP: ASP.NET related questions are better at home in
microsoft.publi c.dotnet.framew ork.aspnet
HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch