UnitsNet 2.0.0-alpha

This is a prerelease version of UnitsNet.
There is a newer version of this package available.
See the version list below for details.
dotnet add package UnitsNet --version 2.0.0-alpha                
NuGet\Install-Package UnitsNet -Version 2.0.0-alpha                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UnitsNet" Version="2.0.0-alpha" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UnitsNet --version 2.0.0-alpha                
#r "nuget: UnitsNet, 2.0.0-alpha"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install UnitsNet as a Cake Addin
#addin nuget:?package=UnitsNet&version=2.0.0-alpha&prerelease

// Install UnitsNet as a Cake Tool
#tool nuget:?package=UnitsNet&version=2.0.0-alpha&prerelease                

Units.NET gives you all the common units of measurement and the conversions between them. It is light-weight, unit tested and supports PCL.

Product Compatible and additional computed target framework versions.
.NET Framework net35-client is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (80)

Showing the top 5 NuGet packages that depend on UnitsNet:

Package Downloads
UnitsNet.Serialization.JsonNet

A helper library for serializing and deserializing types in Units.NET using Json.NET.

UnitsNet.NumberExtensions

Adds extension methods to number types to more easily create quantities, such as 5.Meters() instead of Length.FromMeters(5).

Iot.Device.Bindings

This package provides a set of Device Bindings that use System.Device.Gpio package to communicate with a microcontroller.

Honeybee.UI

UI library build with Eto Forms for editing Honeybee Schema (DotNet) on both Windows and Mac system.

MetalHeaven.ExternalDataContracts

Metal Heaven Versioned Externals DataContracts

GitHub repositories (9)

Showing the top 5 popular GitHub repositories that depend on UnitsNet:

Repository Stars
microsoft/PowerToys
Windows system utilities to maximize productivity
angularsen/UnitsNet
Makes life working with units of measurement just a little bit better.
dotnet/iot
This repo includes .NET Core implementations for various IoT boards, chips, displays and PCBs.
genielabs/HomeGenie
HomeGenie, the programmable automation intelligence
axzxs2001/Asp.NetCoreExperiment
原来所有项目都移动到**OleVersion**目录下进行保留。新的案例装以.net 5.0为主,一部分对以前案例进行升级,一部分将以前的工作经验总结出来,以供大家参考!
Version Downloads Last updated
6.0.0-pre014 101 3/9/2025
6.0.0-pre013 5,004 12/29/2024
6.0.0-pre012 6,649 8/31/2024
6.0.0-pre011 2,670 8/4/2024
6.0.0-pre010 530 7/11/2024
6.0.0-pre009 146 7/10/2024
6.0.0-pre008 147 7/10/2024
6.0.0-pre007 1,315 6/10/2024
6.0.0-pre006 9,139 4/4/2024
6.0.0-pre005 331 3/27/2024
6.0.0-pre004 461 3/12/2024
6.0.0-pre003 826 3/3/2024
6.0.0-pre002 11,044 2/26/2024
6.0.0-pre001 530 2/23/2024
5.73.0 207 3/10/2025
5.72.0 355 3/10/2025
5.71.0 498 3/9/2025
5.70.0 9,367 2/26/2025
5.69.0 30,972 2/4/2025
5.68.0 489 2/4/2025
5.67.0 9,926 1/29/2025
5.66.0 38,322 1/19/2025
5.65.0 75,473 12/28/2024
5.64.0 1,191 12/26/2024
5.63.0 3,102 12/25/2024
5.62.0 775 12/25/2024
5.61.0 24,671 12/15/2024
5.60.0 219,936 10/20/2024
5.59.0 65,485 9/29/2024
5.58.0 85,793 9/2/2024
5.57.0 34,664 8/23/2024
5.56.0 66,684 8/7/2024
5.55.0 45,637 7/25/2024
5.54.0 88,479 7/11/2024
5.53.0 7,957 7/10/2024
5.52.0 95,548 6/16/2024
5.51.0 1,320 6/15/2024
5.50.0 348,604 4/4/2024
5.49.0 70,427 3/12/2024
5.48.0 50,666 2/27/2024
5.47.0 7,453 2/23/2024
5.43.0 198,082 1/23/2024
5.42.0 82,684 1/2/2024
5.41.0 13,880 12/28/2023
5.40.0 6,250 12/22/2023
5.39.0 9,035 12/19/2023
5.38.2 43,208 12/7/2023
5.37.0 3,233 12/6/2023
5.36.0 140,585 11/10/2023
5.35.0 178,832 10/4/2023
5.34.0 73,640 9/21/2023
5.33.0 9,697 9/16/2023
5.32.0 142,537 9/1/2023
5.31.0 236,837 8/12/2023
5.30.0 5,427 8/10/2023
5.29.0 72,549 7/28/2023
5.28.0 47,896 7/24/2023
5.27.0 41,095 7/20/2023
5.26.0 11,629 7/17/2023
5.25.0 13,620 7/12/2023
5.24.0 3,693 7/11/2023
5.23.0 2,275 7/11/2023
5.22.0 2,304 7/11/2023
5.21.0 108,536 6/17/2023
5.20.0 2,296 6/16/2023
5.19.0 17,974 6/10/2023
5.18.0 21,478 6/6/2023
5.17.0 53,056 6/3/2023
5.16.0 26,169 5/27/2023
5.15.0 9,919 5/23/2023
5.14.0 14,463 5/19/2023
5.13.0 95,200 5/5/2023
5.12.0 54,623 4/18/2023
5.11.0 29,163 4/7/2023
5.10.0 32,651 4/1/2023
5.9.0 136,383 3/13/2023
5.8.0 9,122 3/8/2023
5.7.0 6,190 3/7/2023
5.6.0 2,573 3/7/2023
5.5.0 76,846 2/26/2023
5.4.0 6,580 2/23/2023
5.3.0 28,880 2/17/2023
5.2.0 6,622 2/15/2023
5.1.0 257,840 2/5/2023
5.0.0 16,026 2/2/2023
5.0.0-rc013 1,726 1/30/2023
5.0.0-rc012 1,670 1/26/2023
5.0.0-rc011 2,148 1/17/2023
5.0.0-rc010 1,624 1/6/2023
5.0.0-rc009 1,792 1/2/2023
5.0.0-rc008 1,635 12/29/2022
5.0.0-rc007 1,630 12/27/2022
5.0.0-rc006 1,657 12/26/2022
5.0.0-rc005 2,680 12/13/2022
5.0.0-rc004 1,799 12/5/2022
5.0.0-rc003 1,629 12/3/2022
5.0.0-rc002 1,645 12/1/2022
5.0.0-rc001 1,662 11/29/2022
5.0.0-alpha007 1,620 11/30/2022
5.0.0-alpha006 6,517 6/7/2022
5.0.0-alpha005 2,023 3/20/2022
5.0.0-alpha004 101,412 2/8/2022
5.0.0-alpha003 3,236 11/13/2021
5.0.0-alpha001 5,687 11/1/2021
4.152.0 149,109 11/9/2023
4.151.0 89,590 2/26/2023
4.150.0 456,056 1/5/2023
4.149.0 179,386 11/17/2022
4.148.0 80,346 11/3/2022
4.147.0 9,233 11/2/2022
4.146.0 35,141 10/31/2022
4.145.0 252,001 9/3/2022
4.144.0 154,513 8/14/2022
4.143.0 28,454 8/5/2022
4.142.0 3,672 8/4/2022
4.141.0 18,737 7/31/2022
4.140.0 33,189 7/23/2022
4.139.0 3,120 7/23/2022
4.138.0 3,016 7/22/2022
4.137.0 25,781 7/7/2022
4.136.0 27,557 6/29/2022
4.135.0 15,831 6/26/2022
4.134.0 82,903 6/14/2022
4.133.0 5,510 6/13/2022
4.132.0 70,772 5/30/2022
4.131.0 18,280 5/25/2022
4.130.0 4,866 5/22/2022
4.129.0 98,772 5/4/2022
4.128.0 106,409 4/5/2022
4.127.0 211,146 3/30/2022
4.126.0 58,649 3/20/2022
4.125.0 98,364 3/6/2022
4.124.0 28,315 3/3/2022
4.123.0 59,503 2/26/2022
4.122.0 3,858 2/25/2022
4.121.0 57,497 2/15/2022
4.120.0 5,689 2/11/2022
4.119.0 23,600 2/9/2022
4.118.0 6,484 2/9/2022
4.117.0 3,584 2/8/2022
4.116.0 16,646 1/28/2022
4.115.0 28,898 1/26/2022
4.114.0 17,798 1/24/2022
4.113.0 14,723 1/16/2022
4.112.0 61,840 12/31/2021
4.111.0 15,104 12/30/2021
4.110.0 137,146 12/7/2021
4.109.0 19,987 12/1/2021
4.108.0 37,263 11/25/2021
4.107.0 13,376 11/23/2021
4.106.0 8,606 11/23/2021
4.105.0 14,117 11/22/2021
4.104.0 155,011 11/15/2021
4.103.0 192,689 11/12/2021
4.102.0 271,797 9/3/2021
4.101.0 50,901 8/13/2021
4.100.0 32,085 8/5/2021
4.99.0 31,933 7/20/2021
4.98.0 17,076 7/16/2021
4.97.1 25,080 7/5/2021
4.97.0 8,091 6/29/2021
4.96.0 16,328 6/25/2021
4.95.0 11,506 6/17/2021
4.94.0 16,369 6/12/2021
4.93.0 32,984 5/28/2021
4.92.1 10,121 5/21/2021
4.92.0 2,829 5/21/2021
4.91.0 7,965 5/17/2021
4.90.0 34,200 5/7/2021
4.89.1 43,672 4/22/2021
4.89.0 118,189 4/9/2021
4.88.0 3,036 4/9/2021
4.87.0 55,738 3/21/2021
4.86.0 104,302 3/13/2021
4.85.0 32,776 2/27/2021
4.84.0 4,350 2/26/2021
4.83.0 97,233 1/18/2021
4.82.0 54,003 1/6/2021
4.81.0 96,186 12/26/2020
4.80.0 3,393 12/24/2020
4.79.0 48,880 12/17/2020
4.78.0 4,187 12/16/2020
4.77.0 179,241 12/8/2020
4.76.0 47,814 11/26/2020
4.75.0 4,511 11/25/2020
4.74.0 28,606 11/14/2020
4.73.0 67,373 10/19/2020
4.72.0 87,292 10/4/2020
4.71.0 46,967 9/27/2020
4.70.1 94,369 9/12/2020
4.70.0 50,701 9/1/2020
4.69.0 87,421 8/9/2020
4.68.0 42,137 7/23/2020
4.67.0 81,068 6/30/2020
4.66.0 13,687 6/22/2020
4.65.0 37,812 6/10/2020
4.64.0 8,868 6/9/2020
4.63.0 3,329 6/9/2020
4.62.0 26,145 5/29/2020
4.61.0 17,777 5/23/2020
4.60.0 40,338 5/13/2020
4.59.0 81,708 4/28/2020
4.58.0 108,099 4/5/2020
4.57.0 9,406 3/31/2020
4.56.0 6,849 3/29/2020
4.55.0 3,774 3/29/2020
4.54.0 19,009 3/21/2020
4.53.0 3,926 3/16/2020
4.52.0 14,405 3/7/2020
4.51.0 7,523 3/4/2020
4.50.0 6,197 2/28/2020
4.49.0 17,033 2/24/2020
4.48.0 3,567 2/22/2020
4.47.0 10,066 2/20/2020
4.46.0 55,917 2/18/2020
4.45.0 18,072 2/10/2020
4.44.0 23,313 1/25/2020
4.43.0 42,653 1/11/2020
4.42.0 42,834 12/11/2019
4.41.0 3,297 12/8/2019
4.40.0 16,106 11/22/2019
4.39.0 110,773 10/12/2019
4.38.0 39,133 9/24/2019
4.37.0 9,729 9/20/2019
4.36.0 6,763 9/13/2019
4.35.0 28,501 8/18/2019
4.34.0 2,902 8/16/2019
4.33.0 5,170 8/9/2019
4.32.0 29,666 7/21/2019
4.31.0 2,847 7/20/2019
4.30.0 2,748 7/18/2019
4.29.0 5,845 7/17/2019
4.28.0 8,934 7/10/2019
4.27.0 103,648 7/9/2019
4.26.0 18,296 6/27/2019
4.25.0 33,502 6/8/2019
4.24.0 36,192 5/10/2019
4.23.0 12,458 5/4/2019
4.22.0 3,344 5/1/2019
4.21.0 3,177 4/29/2019
4.20.0 37,490 4/21/2019
4.19.0 2,812 4/19/2019
4.18.0 7,292 4/13/2019
4.17.0 40,938 3/26/2019
4.16.0 25,988 3/14/2019
4.15.0 3,319 3/12/2019
4.14.0 3,603 3/10/2019
4.13.0 4,960 3/6/2019
4.12.0 5,456 3/5/2019
4.11.0 25,593 2/25/2019
4.10.0 3,000 2/23/2019
4.9.0 15,875 2/15/2019
4.8.0 6,009 2/13/2019
4.7.0 22,871 2/1/2019
4.6.0 2,884 2/1/2019
4.5.1 2,845 2/1/2019
4.5.0 2,865 2/1/2019
4.4.0 33,114 1/16/2019
4.3.0 6,045 1/11/2019
4.2.0 3,355 1/11/2019
4.1.0 9,758 12/20/2018
4.0.0 27,852 12/16/2018
4.0.0-beta2 13,532 11/16/2018
4.0.0-beta1 8,914 11/8/2018
4.0.0-alpha5 2,032 11/4/2018
4.0.0-alpha4 8,788 10/14/2018
4.0.0-alpha3 3,328 9/28/2018
3.111.0 83,184 12/14/2018
3.110.0 3,682 12/10/2018
3.109.0 28,751 11/15/2018
3.108.0 21,494 11/5/2018
3.107.1 19,270 11/3/2018
3.107.0 2,327 11/3/2018
3.106.0 22,941 10/12/2018
3.105.0 12,859 9/24/2018
3.104.0 251,772 7/23/2018
3.103.0 22,082 7/16/2018
3.102.0 34,699 6/26/2018
3.101.0 2,704 6/26/2018
3.100.0 7,812 6/21/2018
3.99.0 43,318 5/11/2018
3.98.0 8,143 5/5/2018
3.97.0 6,711 4/25/2018
3.96.0 7,853 4/16/2018
3.95.0 118,489 4/13/2018
3.94.0 6,665 3/24/2018
3.93.0 16,489 3/6/2018
3.92.0 3,015 3/5/2018
3.91.0 4,366 3/5/2018
3.90.0 14,530 2/24/2018
3.89.0 5,781 2/9/2018
3.88.0 27,187 1/27/2018
3.87.0 4,782 1/14/2018
3.86.0 39,386 1/3/2018
3.85.0 8,211 12/11/2017
3.84.0 2,676 12/10/2017
3.83.1-test003 2,376 12/7/2017
3.83.1-test001 2,270 12/7/2017
3.83.0 3,104 12/5/2017
3.82.0 3,984 12/2/2017
3.81.0 3,588 11/26/2017
3.80.0 2,579 11/25/2017
3.79.0 3,160 11/23/2017
3.78.0 18,463 11/9/2017
3.77.0 17,965 10/5/2017
3.76.0 10,902 9/30/2017
3.75.1 3,190 9/29/2017
3.75.0 2,730 9/29/2017
3.74.0 7,881 9/17/2017
3.73.0 17,146 9/8/2017
3.72.0 5,956 9/1/2017
3.71.0 11,682 8/28/2017
3.70.0 3,942 8/20/2017
3.69.0 21,000 8/7/2017
3.68.0 3,829 7/30/2017
3.67.0 2,664 7/27/2017
3.66.0 21,913 7/7/2017
3.65.0-alpha3 3,877 6/5/2017
3.65.0-alpha1 2,186 6/4/2017
3.64.0 42,542 5/30/2017
3.63.0 2,642 5/27/2017
3.62.0 26,157 5/8/2017
3.61.0 16,001 5/5/2017
3.60.0 2,517 5/4/2017
3.59.0 3,956 5/4/2017
3.58.0 37,291 4/17/2017
3.57.0 28,298 3/16/2017
3.56.0 2,581 3/15/2017
3.55.0 2,659 3/13/2017
3.54.0 2,869 3/9/2017
3.53.0 2,667 3/8/2017
3.52.0 3,012 2/28/2017
3.51.0 5,036 2/7/2017
3.50.1 2,565 2/6/2017
3.50.0 12,858 1/28/2017
3.49.1 5,049 1/17/2017
3.49.0 3,970 1/7/2017
3.48.0 10,088 11/11/2016
3.47.0 4,057 11/2/2016
3.46.2 2,837 11/2/2016
3.46.1 5,109 10/23/2016
3.46.0 2,559 10/23/2016
3.45.0 2,725 10/21/2016
3.44.0 2,503 10/21/2016
3.43.0 2,519 10/18/2016
3.42.0 11,165 9/29/2016
3.41.0 15,343 9/14/2016
3.40.0 21,255 8/2/2016
3.39.1 7,954 7/21/2016
3.39.0 2,558 7/21/2016
3.38.1 25,918 7/8/2016
3.37.0 2,744 6/28/2016
3.36.0 7,837 6/3/2016
3.35.0 2,630 6/3/2016
3.34.0 67,465 4/21/2016
3.33.0 2,561 4/18/2016
3.32.0 16,997 4/8/2016
3.31.0 2,707 4/5/2016
3.30.0 2,686 4/2/2016
3.29.0 2,892 3/16/2016
3.29.0-alpha2 2,138 3/13/2016
3.28.1 2,937 3/2/2016
3.28.0 2,598 3/1/2016
3.27.0 4,724 2/26/2016
3.26.0 2,727 2/19/2016
3.25.0 2,810 2/6/2016
3.24.0 2,732 1/31/2016
3.23.0 2,768 1/23/2016
3.22.0 3,268 1/17/2016
3.21.1 2,519 1/17/2016
3.21.0 7,196 12/9/2015
3.20.0 9,904 11/24/2015
3.19.2 2,681 11/19/2015
3.19.1 26,565 9/9/2015
3.19.0 2,739 9/9/2015
3.18.0 2,623 8/30/2015
3.17.0 4,623 8/25/2015
3.16.0 3,566 8/12/2015
3.15.0 3,599 8/11/2015
3.14.0 6,036 6/26/2015
3.13.1 2,611 6/25/2015
3.13.0-beta 2,450 4/27/2015
3.12.0 29,437 4/14/2015
3.11.0 28,326 4/8/2015
3.10.0 4,133 3/30/2015
3.9.0 2,672 3/30/2015
3.8.0 2,615 3/29/2015
3.7.1 2,534 3/27/2015
3.7.0 2,640 3/27/2015
3.6.0 2,769 3/19/2015
3.5.0 3,038 3/17/2015
3.4.0 3,050 3/2/2015
3.4.0-alpha2 2,181 3/2/2015
3.4.0-alpha 2,220 3/2/2015
3.3.0 7,762 11/21/2014
3.2.0 6,197 10/17/2014
3.1.0 3,415 9/19/2014
3.0.0 3,389 7/23/2014
3.0.0-beta 2,410 7/22/2014
2.0.0 6,516 2/9/2014
2.0.0-beta 2,541 2/9/2014
2.0.0-alpha 2,440 2/5/2014
1.13.0.15 2,941 1/31/2014
1.12.0-beta 2,263 1/4/2014
1.11.0 57,878 11/18/2013
1.10.0 2,876 11/15/2013
1.9.0 2,578 11/7/2013
1.8.0 2,530 10/30/2013
1.7.0 2,764 8/8/2013
1.6.0 2,641 8/6/2013
1.5.0 2,657 8/2/2013
1.4.0 2,666 7/22/2013
1.3.0 2,682 7/21/2013
1.2.0 2,716 7/21/2013

v2.0: Add support for external units.

Breaking changes: UnitConverter and UnitValue removed. Unit enum broken into separate unit enums per unit class.

v1.13: Add mass unit (pound) (thanks @strvmarv).

v1.12: Add speed units (km/h, m/s, ft/s, knots, mph). Add mass units (microgram, nanogram).

v1.11: Fix bugs in Flow and RotationalSpeed units after refactoring to T4 templates (thanks George Zhuikov).
Add Temperature units.

v1.10: Add missing localization to units for US English and Russian cultures (thanks George Zhuikov).
Add RotationalSpeed and Flow unit classes (thanks George Zhuikov).
Add mils and microinches length units (thanks Georgios).
Refactor to generate unit classes with T4 templates, a lot less work to add new units.

v1.9: Improve precision of PoundForce unit (thanks Jim Selikoff).

v1.8: Add angle units of measurement (thanks Georgios). Add tests and fix bug in NewtonPerSquareCentimeter and NewtonPerSquareMillimeter.

v1.7: Add imperial and US units for volume and area.

v1.6: Add area units. Fix exception in TryConvert for volume units.

v1.5: Add volume units of measurement (thanks @vitasimek). Add missing operator overloads.

v1.4: Add ShortTon and LongTon mass units (thanks Cameron MacFarland). Add TryConvert methods.

v1.3: Add pressure units. Add dynamic conversion via UnitConverter and UnitValue

v1.2: Add force, torque, pressure, mass, voltage, length and length2d units of measurement.