You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue serves as a place to discuss what to include in this version, since major version bumps allow us to make breaking changes we think are necessary or worth it.
The wishlist keeps track of the items to include, but items may be added or removed at any time.
Consolidate UnitsNetSetup.Default.UnitConverter and each quantity's DefaultConversionFunctions, these can become inconsistent when adding custom conversion functions at runtime. Consider making DefaultConversionFunctions internal, not public.
I think UnitsNet should be more extensible. Perhaps there could be a base package, but separate NuGet packages for US measurements, Imperial, UK, etc. Alternatively, customizable abbreviations could be a solution. I would never expect me or my users to see "gal (US)" instead of "gal". This would also help the debate here.
Splitting up in packages is not so easy though. Things like Torque = Force * Length becomes problematic when types exist in different packages and they can't have circular dependencies. Imperial is even worse, splitting some units of a quantity to different packages. The main problem is static typing, which is also one of the main features of UnitsNet.
One benefit of splitting up in packages is smaller binary size to only bring in what you need.
Some prototyping here: #1181
I was requested to give a list of units with the wrong plural form (see #1330 )
I checked the .json-file with the speed units and only MetersPerMinute has a wrong plural form, all other Speed units seem to have the correct plural form.
I was requested to give a list of units with the wrong plural form (see #1330 )
I checked the .json-file with the speed units and only MetersPerMinute has a wrong plural form, all other Speed units seem to have the correct plural form.
In the current implementation the QuantityParser, with its regex and all, is the worst performing class of the whole library. There are also potential problems that need fixing regarding the fall-back culture (see #1443 ), but given how slow we've been moving with the PR reviews lately, and how many of those I've got in the pipeline, I decided to leave it for another day.
That said, if you want to take a stab at it, I'll have a look- but please have a look at the direction I took in #1507, I think that would be a necessary first step towards a more performant implementation.
In the current implementation the QuantityParser, with its regex and all, is the worst performing class of the whole library. There are also potential problems that need fixing regarding the fall-back culture (see #1443 ), but given how slow we've been moving with the PR reviews lately, and how many of those I've got in the pipeline, I decided to leave it for another day.
That said, if you want to take a stab at it, I'll have a look- but please have a look at the direction I took in #1507, I think that would be a necessary first step towards a more performant implementation.
Ah, I probably should of taken a closer look at how the QuantityParser was implemented before asking as I was hoping it would be a easier lift since I mostly wanted it to move/unify some generic parsing logic to all use IUtf8SpanParsable in my code base.
Still I'll run some profiling on my side of things and see if I can justify some time to put some work into optimizing the QuantityParser.
Migration for nanoFramework users: replace the old UnitsNet.nanoFramework.* packages with the new nanoFramework.UnitsNet.* packages. The previous packages published from this repo are deprecated.
Tracked in #1721 as a behavioral breaking change for v6.
This consolidates the quantity-format cleanup:
A/An duplicates the explicit generated GetAbbreviation() APIs and UnitAbbreviationsCache, including localized and runtime-configured abbreviations.
Remove unnecessary format strings #797 intended to remove S, but commit 721287d removed only its documentation and tests; the v5 formatter implementation still supports it. This PR completes that cleanup. The QuantityFormatter defaults to the "G" format #1450 discussion also questioned retaining a formatter that can hide precision. Callers can state their intent with standard/custom numeric formats such as G3, F2, N2, E2, or 0.##.
U, V, and Q were already removed during the v6 redesign and are now documented together with A and S as one migration.
Adding StringSyntaxAttribute.NumericFormat to the public formatting surfaces makes the supported contract explicit and enables IDE format-string assistance. The v6 upgrade guide and string-formatting documentation contain the complete replacement table.
Activity
maxreb commentedon Mar 21, 2023
Add System.Text.Json support #966
angularsen commentedon Apr 1, 2023
Decide on a naming and abbreviation convention for imperial/UK units and US units; like gallon, ounces, cup etc.
It is a bit of a mess right now:

LINQPad sample
I personally like "UK", since it is shorter and better matches "US".
Wolfram also uses US gallon and UK gallon.
Some conventions for imperial gallons:
https://en.wikipedia.org/wiki/Gallon#:~:text=the%20imperial%20gallon%20(imp%20gal,American%20and%20Caribbean%20countries%3B%20and
Today the abbreviation convention is
gal (U.S.)andgal (imp.).Depending on landing on UK or imperial naming, we could go with one of these pairs:
US galandUK galUS galandimp galgal (US)andgal (UK)We can support multiple of these plus the old ones, but the primary form should be standardized across the different units.
ebfortin commentedon Jun 24, 2023
Do not throw ArgumentException on NaN, Inf+ or Inf- or give a way to configure the behavior globally.
Context:
#1268 (comment)
MisinformedDNA commentedon Sep 12, 2023
I think UnitsNet should be more extensible. Perhaps there could be a base package, but separate NuGet packages for US measurements, Imperial, UK, etc. Alternatively, customizable abbreviations could be a solution. I would never expect me or my users to see "gal (US)" instead of "gal". This would also help the debate here.
UPDATE:
Custom abbreviations already exist:
UnitAbbreviationsCache.Default.MapUnitToDefaultAbbreviation(HowMuchUnit.Some, "sm");angularsen commentedon Sep 16, 2023
Conceptually, I agree.
Customizable abbreviations is already supported as you found, and we support custom quantities and units with some limited functionality: https://github.com/angularsen/UnitsNet/wiki/Extending-with-Custom-Units
Splitting up in packages is not so easy though. Things like
Torque = Force * Lengthbecomes problematic when types exist in different packages and they can't have circular dependencies. Imperial is even worse, splitting some units of a quantity to different packages. The main problem is static typing, which is also one of the main features of UnitsNet.One benefit of splitting up in packages is smaller binary size to only bring in what you need.
Some prototyping here: #1181
Markussp256 commentedon Nov 29, 2023
I was requested to give a list of units with the wrong plural form (see #1330 )
I checked the .json-file with the speed units and only MetersPerMinute has a wrong plural form, all other Speed units seem to have the correct plural form.
Fix typo: Celcius -> Celsius (#1347)
Fix more unit names (#1351)
angularsen commentedon Jan 6, 2024
@Markussp256
Some more fixes were made recently in
#1351
Generate operators from unit relations defined in JSON (#1329)
💥🐛Change DataMember ordering to 1-indexed (#1360)
💥🐛Change DataMember ordering to 1-indexed (#1360)
💥🐛Change DataMember ordering to 1-indexed (#1360) (#1363)
Remove obsolete units (#1372)
30 remaining items
💥Change UnitParser ctor to require unit abbreviations cache
💥Change UnitParser ctor to require unit abbreviations cache (#1477)
angularsen commentedon Dec 29, 2024
Big fat release on the way out, merged in changes from master.
Previous release was Aug 23.
Release UnitsNet/6.0.0-pre013 · angularsen/UnitsNet
@lipchev
Fix typo in MassMomentOfInertia.TonneSquareMilimeter (#1490)
Rename SpecificFuelConsumption.GramPerKiloNewtonSecond to GramPerKilo…
Anthonywolfe commentedon Apr 1, 2025
With IQuantity implementing IParsable would it also be desirable to add support for IUtf8SpanParsable?
lipchev commentedon Apr 2, 2025
In the current implementation the
QuantityParser, with its regex and all, is the worst performing class of the whole library. There are also potential problems that need fixing regarding the fall-back culture (see #1443 ), but given how slow we've been moving with the PR reviews lately, and how many of those I've got in the pipeline, I decided to leave it for another day.That said, if you want to take a stab at it, I'll have a look- but please have a look at the direction I took in #1507, I think that would be a necessary first step towards a more performant implementation.
Anthonywolfe commentedon Apr 2, 2025
Ah, I probably should of taken a closer look at how the QuantityParser was implemented before asking as I was hoping it would be a easier lift since I mostly wanted it to move/unify some generic parsing logic to all use IUtf8SpanParsable in my code base.
Still I'll run some profiling on my side of things and see if I can justify some time to put some work into optimizing the QuantityParser.
angularsen commentedon Apr 12, 2025
Update wiki regarding
IQuantityand sample quantity #1519 (comment)I've been reading through the custom units page and the sample quantity does not conform to the up-to-date
IQuantityinterface.[-]v6 Wishlist[/-][+]v6 Release[/+]MohMehrnia commentedon Nov 26, 2025
When issue?
angularsen commentedon Dec 6, 2025
When ready.
Mainly waiting on #1544 and then some time to collect feedback.
A prerelease nuget is out so you can go ahead and use v6 now.
angularsen commentedon Jun 11, 2026
.NET nanoFramework support removed in v6
As of #1676 (closes #1647), the in-repo .NET nanoFramework projects, code generation, build steps and CI/pipeline tasks have been removed.
nanoFramework support is now maintained and published by the nanoFramework team in their own repository, with their own NuGet packages:
nanoFramework.UnitsNet.Length,nanoFramework.UnitsNet.Mass, ... (searchnanoFramework.UnitsNeton NuGet).Migration for nanoFramework users: replace the old
UnitsNet.nanoFramework.*packages with the newnanoFramework.UnitsNet.*packages. The previous packages published from this repo are deprecated.angularsen commentedon Aug 1, 2026
Tracked in #1721 as a behavioral breaking change for v6.
This consolidates the quantity-format cleanup:
A/Anduplicates the explicit generatedGetAbbreviation()APIs andUnitAbbreviationsCache, including localized and runtime-configured abbreviations.S, but commit 721287d removed only its documentation and tests; the v5 formatter implementation still supports it. This PR completes that cleanup. The QuantityFormatter defaults to the "G" format #1450 discussion also questioned retaining a formatter that can hide precision. Callers can state their intent with standard/custom numeric formats such asG3,F2,N2,E2, or0.##.U,V, andQwere already removed during the v6 redesign and are now documented together withAandSas one migration.Adding
StringSyntaxAttribute.NumericFormatto the public formatting surfaces makes the supported contract explicit and enables IDE format-string assistance. The v6 upgrade guide and string-formatting documentation contain the complete replacement table.Standardize quantity formatting on .NET numeric formats (#1721)