Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many Warnings in the build output with PetaPoco.cs (Core) #245

Closed
MamadouSy opened this issue Jan 28, 2016 · 4 comments
Closed

Many Warnings in the build output with PetaPoco.cs (Core) #245

MamadouSy opened this issue Jan 28, 2016 · 4 comments
Assignees

Comments

@MamadouSy
Copy link

Hi,

I've a little request.
I'm using PetaPoco Core install from Nugets in Visual Studio 2013 (so the single file Models/PetaPoco.cs).

I'm generating the XML Documentation file with my project (Project Properties > Build > Output > XML Documentation file)

Once it's activated, I have a bunch of Warnings in the build output.
Below some of them (repeated several times):

Models\PetaPoco.cs(2500,93,2500,99): warning CS1066: The default value specified for parameter 'onFail' will have no effect because it applies to a member that is used in contexts that do not allow optional arguments
Models\PetaPoco.cs(3296,22,3296,28): warning CS1591: Missing XML comment for publicly visible type or member 'PetaPoco.IQuery'
Models\PetaPoco.cs(5709,9,5709,108): warning CS1570: XML comment on 'PetaPoco.Sql.Select(params object[])' has badly formed XML -- 'End tag 'member' does not match the start tag 'param'.'
Models\PetaPoco.cs(4627,69,4627,81): warning CS1573: Parameter 'allowDefault' has no matching param tag in the XML comment for 'PetaPoco.DatabaseProvider.Resolve(string, bool)' (but other parameters do)

I know that the PetaPoco.cs file is auto-generated, so I guess you can't fix all of the XML comments and little annoying warnings.

My suggestion, to bypass the issue, is to simply disable some warnings for the PetaPoco.cs file.

Below an MSDN article which describe how to disable warnings for a given file:
https://msdn.microsoft.com/fr-fr/library/441722ys.aspx

I've already test that in my PetaPoco.cs and that drops all warnings for PetaPoco.cs

Only add this line of code before the namespace PetaPoco

#pragma warning disable 1066,1570,1573,1591

I hope my explanation is clear.
Tell me if you need more details or an example.

Cheers,

Mamadou

@pleb pleb self-assigned this Jan 29, 2016
@pleb
Copy link
Member

pleb commented Jan 29, 2016

@MamadouSy not a problem. I'll add this in next release

@MamadouSy
Copy link
Author

Cool thanks a lot.

On 29 Jan 2016, at 03:59, Wade Baglin notifications@github.com wrote:

@MamadouSy https://github.com/MamadouSy not a problem. I'll add this in next release


Reply to this email directly or view it on GitHub #245 (comment).

@pleb
Copy link
Member

pleb commented Jan 30, 2016

It's in the latest release

@pleb pleb closed this as completed Jan 30, 2016
@MamadouSy
Copy link
Author

Thanks a lot.
Works like a charm!

On 30 Jan 2016, at 13:27, Wade Baglin notifications@github.com wrote:

It's in the latest release


Reply to this email directly or view it on GitHub #245 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants