Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> XML Warings from generated code
 

Pages: 1
Bugs & Issues
XML Warings from generated code
Page:1/1 

  Print all messages in this thread  
Poster Message
Stoop
User



Location:
Reno, Nevada
Joined on:
28-Feb-2004 12:01:28
Posted:
66 posts
# Posted on: 08-Feb-2006 10:40:50.  
Hello

We are now using VS 2005. When I generate code (VB.NET) from LLGen and then open up corresponding project to complile I get a TON of XML warnings. I have a rather large project (30 tables) so the sum of the warnings really chews up a lot of resources and also takes forever to complile. Below is an example of one of the warnings which is repeated in all entity classes:

        ''' <summary>Returns true if the original value for the field with the fieldIndex passed in, read from the persistent storage was NULL, False otherwise.
        ''' Should Not be used For testing If the current value Is NULL, use <see cref="TestCurrentFieldValueForNull"> For that.</summary>
        ''' <param name="fieldIndex">Index of the field to test if that field was NULL in the persistent storage</param>
        ''' <returns>true if the field with the passed in index was NULL in the persistent storage, False otherwise</returns>
Public Function TestOriginalFieldValueForNull(fieldIndex As AdditionalPriceTypeFieldIndex) As Boolean
            Return MyBase.Fields(CInt(fieldIndex)).IsNull
        End Function

Apparently the problem is the "<see cref.." part as it doesn't like the "<"

I manually changed one and this is fine:

''' <summary>Returns true if the original value for the field with the fieldIndex passed in, read from the persistent storage was NULL, False otherwise.
''' Should Not be used For testing If the current value Is NULL, use (see cref="TestCurrentFieldValueForNull") For that.
''' </summary>
        ''' <param name="fieldIndex">Index of the field to test if that field was NULL in the persistent storage</param>
        ''' <returns>true if the field with the passed in index was NULL in the persistent storage, False otherwise</returns>
        Public Function TestOriginalFieldValueForNull(fieldIndex As AdditionalPriceTypeFieldIndex) As Boolean
            Return MyBase.Fields(CInt(fieldIndex)).IsNull
        End Function

Can you point me to the template file where I can manually fix this?
Thanks
Stoop



  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37316 posts
# Posted on: 08-Feb-2006 11:40:33.  
It's a thing they introduced in VS.NET 2005, to avoid ambiguity between XML comments, but it turned out to be a true nightmare. If you change the <> into (), you won't get a reference link to the field in the generated documentation, so that's not a proper option I think. So <see cref="TestCurrentFieldValueForNull"> should become TestCurrentFieldValueForNull

to avoid warnings of a given number, you can order the vbc compiler to ignore warnings with a given number: vbc /nowarn:42024
will ignore warning number 42024.

To surpress the useless warnings in C# they added a #pragma precompiler directive directly to the language, though I couldn't find an alternative for VB.NET... I also am not sure how to set the nowarn option in the VS.NET IDE...

If you're using adapter, this is in the template:
SharedTemplates\VB.NET\entityAdapter.template
if you're using selfservicing it's in
SharedTemplates\VB.NET\entityInclude.template



Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Stoop
User



Location:
Reno, Nevada
Joined on:
28-Feb-2004 12:01:28
Posted:
66 posts
# Posted on: 09-Feb-2006 17:35:59.  
Thanks for the reply!

2 things:

1) I made a mistake in my original post. What works is [see cref="TestCurrentFieldValueForNull"] , not (see cref="TestCurrentFieldValueForNull") . sorry..

2) I will just edit the template so that it outputs above..

Yeah - I agree with you. This XML thing they introduced is a nightmare. Especially in projects converted from VB 2003 to 2005. There is a way to set errors and warnings in VB IDE, but it doesn't include turning off (IMHP this useless) XML warnings at least as far as I know.. sigh...

thanks again
Stoop
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37316 posts
# Posted on: 09-Feb-2006 18:21:50.  
Ghostdoc introduces a T: in front of the type, which solves the warnings in C#. Could you try that instead of replacing <> with [], so I can make the general change to the vb.net templates for the next build?

(so it will become: <see cref="T:TestCurrentFieldValueForNull"> )


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.