jwaliszko / ExpressiveAnnotations

Annotation-based conditional validation library.
MIT License
351 stars 123 forks source link

Operator '>' cannot be applied to operands of type 'System.Int64' and 'System.Int32' #130

Closed Korayem closed 8 years ago

Korayem commented 8 years ago

In a new project, suddenly I can't write the following

        [AssertThat("StudentId > 0", ErrorMessage = "Please select a Student")]
        public long StudentId { get; set; }

EA is working perfectly in other projects in nuget version 2.5.1 but with nuget version 2.6.0 it's not

Korayem commented 8 years ago

Found this but not sure if it's related #63

jwaliszko commented 8 years ago

Indeed, regression error occurred in the last release. Will be fixed in new package. Thanks for reporting.

jwaliszko commented 8 years ago

Issue fixed here: https://github.com/jwaliszko/ExpressiveAnnotations/commit/dcfa4c9d3c04135758388773171a63acca1a54de. It still requires few relevant unit tests to be covered by.

Korayem commented 7 years ago

@jwaliszko this fix is released as part of which nuget version?

jwaliszko commented 7 years ago

@Korayem: take latest, 2.9.1 (mvc) / 2.7.0 (standalone) - does some issue related to that still exists?

Korayem commented 7 years ago

no no it works like a charm :)

Does https://www.nuget.org/packages/ExpressiveAnnotations.dll 2.6.0 equate to 2.9.1?

On Tue, Sep 20, 2016 at 3:19 PM, Jarosław Waliszko <notifications@github.com

wrote:

@Korayem https://github.com/Korayem: take latest, 2.9.1 (does some issue related to that still exists?).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jwaliszko/ExpressiveAnnotations/issues/130#issuecomment-248298921, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMGvIBC1BlnZ1TS_-V8mbpKpfPfWtTUks5qr915gaJpZM4Jf_0f .

jwaliszko commented 7 years ago

No, v2.9.1 product release contains following components:

MVC package contains all 3 components, so product version is always the same as the MVC package version. Minimal package contains only single component, mainly ExpressiveAnnotations.dll core annotations assembly. This is also mentioned in the installation section of the documentation.

Some more explanation:

At the initial stage of working at this library I had been thinking of how to version the releases. At first I thought the highest version of all the components will automatically define the version of the package. But after a while I realized it is not always possible, and manual versioning is needed - example is below:

init version ---> A.dll v1.0.0, B.dll v1.0.0, C.js v1.0.0 ---> release ---> NuGet package v1.0.0
bug fix in A ---> A.dll v1.0.1, B.dll v1.0.0, C.js v1.0.0 ---> release ---> NuGet package v1.0.1
bug fix in B ---> A.dll v1.0.1, B.dll v1.0.1, C.js v1.0.0 ---> release ---> NuGet package v?.?.? 
                                                                                   (chosen 1.0.2)
bug fix in B ---> A.dll v1.0.1, B.dll v1.0.2, C.js v1.0.0 ---> release ---> NuGet package v?.?.? 
                                                                                   (chosen 1.0.3)
feature in C ---> A.dll v1.0.1, B.dll v1.0.2, C.js v1.1.0 ---> release ---> NuGet package v?.?.? 
                                                                                   (chosen 1.1.0)

Because many NuGet packages contain only single component, there is no discrepancy between the package version and such a component (assembly/script/etc.) version.

Korayem commented 7 years ago

I know the difference between EA and EA.dll but I didn't know about versioning schema you're following. I understand the predicament here :)

Thanks a lot for your priceless efforts