If you want to use this project, please use the upstream version instead.
Compatible with .Net Standard 2.0 and .Net 4.6 and above.
Read single-file executables for more details.
Single-file executables technically make the Resource Embedder project obsolete, although there are some use cases (e.g. manually inject resources) that aren't (yet) covered natively by .Net Core.
For now no new features are planned for the resource embedder but I will continue to bugfix where the effort is appropriate.
By adding the NuGet package to an assembly all it's satellite assemblies will automatically be embedded as resources and loaded from there. Each assembly with localization files needs to reference the embedder package!
Only use the Core package if you want to manually inject resources!
Before: Localization files (<Exe name>.resources.dll
) are in seperate folders per language:
After adding the nuget and recompiling: No more seperate files, all localization resources are embedded into exe/dll and are loaded automatically:
By embedding localization files it is possible to create "zero dependency" executables that can simply be deployed and "just run".
When using resource embedder also consider using Costura to embed reference assemblies (which cannot embed satellite assemblies due to the way it's integrated into the build process).
Once ran, the resource files should disappear from the build output and the Output log will contain messages confirming that the files have been embedded.
The output project will still be properly localized.
Using tools like dnSpy it is possible to see that any project using this package contains resources "<AssemblyName>.<culture>.resources.dll"
Currently nothing can be configured and it "just works" out of the box.
Note that the satellite assemblies are always copied to the output directory by Visual Studio.
After the build finishes the Resource.Embedder will delete all resource files it has embedded, leaving only the resource files that have not been embedded (if any).
If there are no resource files left for a specific language (empty localization directory) the directory is deleted as well.