totpero / DeviceDetector.NET

The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.
Apache License 2.0
348 stars 73 forks source link

Version in system runtime only uses int32 what happens when you have a version number larger than int32? Exception #5

Closed markatosi closed 3 years ago

markatosi commented 6 years ago

Try with the following user agent string. Notice that the build number is much larger than an int.

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1529614902747 Safari/537.36

The Version comparison routine available from the system runtime for this type of comparison as it's far too rigid for the flexible nature of versioning within agent strings.

markatosi commented 6 years ago

You might want to look into this https://github.com/maxhauser/semver

totpero commented 6 years ago

Thanks, I will test it.

totpero commented 3 years ago

Hi @markatosi , last release 4.3.0 include the semver nuget. Thanks 👍