ResXResourceReader.NetStandard
1.2.0
See the version list below for details.
dotnet add package ResXResourceReader.NetStandard --version 1.2.0
NuGet\Install-Package ResXResourceReader.NetStandard -Version 1.2.0
<PackageReference Include="ResXResourceReader.NetStandard" Version="1.2.0" />
paket add ResXResourceReader.NetStandard --version 1.2.0
#r "nuget: ResXResourceReader.NetStandard, 1.2.0"
// Install ResXResourceReader.NetStandard as a Cake Addin #addin nuget:?package=ResXResourceReader.NetStandard&version=1.2.0 // Install ResXResourceReader.NetStandard as a Cake Tool #tool nuget:?package=ResXResourceReader.NetStandard&version=1.2.0
Install
via Nuget: https://www.nuget.org/packages/ResXResourceReader.NetStandard/
Why would you want this library?
If you want to programmatically read/update a ResX file, the standard is to use the System.Resources.ResXResourceReader
and System.Resources.ResXResourceWriter
. However these libraries are part of System.Windows.Forms. That is either a annoying extra dependency or a deal breaker for .Net Standard.
This library separates those two classes from System.Windows.Forms and packages them for .Net Standard so you can easily include them across frameworks.
If you don't know a resx file is:
- It is a way of shipping resources, like strings and files, with an assembly (project).
- It simplifies messy file copy on build and relative runtime file references
- Is commonly used for managing translations and localized resources
Sources
This library is almost a direct copy of files from the open sourced winforms respository
https://github.com/dotnet/winforms/tree/b666dc7a94d8ac87a7d300cfb4fa86332fb79bae/src/System.Windows.Forms/src/System/Resources
However, I did revert this change in order to remove the dependency on System.Numerics, which was limiting .Net Standard compatibility.
I've also changed the namespace to System.Resources.NetStandard to avoid potential naming conflicts.
Examples
See how to use ResXResourceReader
and ResXResourceWriter
at
- https://docs.microsoft.com/en-us/dotnet/api/system.resources.resxresourcereader?view=netframework-4.8
- https://docs.microsoft.com/en-us/dotnet/api/system.resources.resxresourcewriter?view=netframework-4.8
- https://stackoverflow.com/questions/676312/modifying-resx-file-in-c-sharp
Gotchas
- Bitmaps are only supported on windows or if you separately install libgdiplus. Here is Microsoft's reasoning for why this issue won't be fixed.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.HashCode (>= 1.1.0)
-
.NETStandard 2.1
- No dependencies.
NuGet packages (13)
Showing the top 5 NuGet packages that depend on ResXResourceReader.NetStandard:
Package | Downloads |
---|---|
stryker
All stryker mutation test logic is contained in this library. This package does not include a runner. Use this package if you want to extend stryker with your own runner. |
|
AppText.Translations
AppText.Translations is an add-on for the AppText CMS that adds a Translation content type and a few specialized API endpoints to deal with translations. |
|
PointShare.ExtensionMethods.SPO
PointShare.ExtensionMethods.SPO |
|
SunamoXliffParser
Just fork from https://www.nuget.org/packages/fmdev.XliffParser, due to .NET 5+ |
|
SunamoDevCode
Another code mainly for working with C# in all ways. Will be in future merged with SunamoCode and SunamoCSharp. |
GitHub repositories (4)
Showing the top 4 popular GitHub repositories that depend on ResXResourceReader.NetStandard:
Repository | Stars |
---|---|
Squidex/squidex
Headless CMS and Content Managment Hub
|
|
stryker-mutator/stryker-net
Mutation testing for .NET core and .NET framework!
|
|
JonPSmith/AuthPermissions.AspNetCore
This library provides extra authorization and multi-tenant features to an ASP.NET Core application.
|
|
sailro/EscapeFromTarkov-Trainer
Escape from Tarkov (EFT) Trainer - Internal
|
## 1.2.0
Fix errors when working with file-based ResX resources (icons, images, sound, files, etc)
## 1.1.0
Fixed issues where the library couldn't open Resx files generated by other editors