Ignore Attribute is being ignored

Hi.

I have this POCO with some properties with the IgnoreAttribute, but somehow OrmLite always returns false when checking if the property has the IgnoreAttribute.

var isIgnored = propertyInfo.HasAttributeCached<IgnoreAttribute>() || isReference;

^^^^^^
this always returns false.
but this:

propertyInfo.HasAttribute<IgnoreAttribute>();

returns true for the properties with the IgnoreAttribute.

This was working well, I just came back to this project and now it has this issue.
And now OrmLite is generating SQL statements with these fields.

Can anyone help me out here. Can’t find the source of this problem.

PS: this affects only one project. tested other project and it is working fine.

Thanks.

Luis

Can you provide a repro please.

Actually this issue may already be resolved, can you trying it with the latest v5.5.1 on MyGet?

Thanks.

I will create a test project and try to replicate this.

I connected this project directly to my fork of your repo, so it is already using 5.5.1.
But I will try with the MyGet package anyway.

What is weird is this happening only in one of my projects. Another similar project doesn’t have this issue and is also using the same OrmLite.Core + OrmLite.Firebird.Core projects that are direct forks of yours.

Ok, it works now.

Moved every Servicestack reference to MyGet on 5.5.1, except for ServiceStack.OrmLite.Firebird.Core because I need FireBird4Dialect.

After this it works again.

Still don’t know why another similar project works and this doesn’t.

Thanks.

It’s possible you still have an old v5.5.1 ServiceStack.Text binary cached somewhere.

To completely reset your nuget packages you want to clear your host projects bin and obj folders, remove the solutions packages folder and clear out your NuGet packages cache, i.e:

$ rd /q /s bin obj          # Host project
$ rd /q /s packages         # NuGet packages
$ nuget locals all -clear   # clear NuGet packages cache

Thank you @mythz!

I will try that.