{"id":13629317,"url":"https://github.com/ycanardeau/ResXGenerator","last_synced_at":"2025-04-17T08:34:38.170Z","repository":{"id":154039449,"uuid":"631420216","full_name":"ycanardeau/ResXGenerator","owner":"ycanardeau","description":"ResXGenerator is a C# source generator to generate strongly-typed resource classes for looking up localized strings.","archived":false,"fork":false,"pushed_at":"2024-05-15T09:33:33.000Z","size":225,"stargazers_count":36,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T01:34:47.066Z","etag":null,"topics":["csharp-sourcegenerator"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Aigamo.ResXGenerator","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ycanardeau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-23T01:02:07.000Z","updated_at":"2025-03-05T09:52:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"ee1c88ca-dbf1-45f8-a08c-91ffd6b7b154","html_url":"https://github.com/ycanardeau/ResXGenerator","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycanardeau%2FResXGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycanardeau%2FResXGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycanardeau%2FResXGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycanardeau%2FResXGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ycanardeau","download_url":"https://codeload.github.com/ycanardeau/ResXGenerator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249326186,"owners_count":21251735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp-sourcegenerator"],"created_at":"2024-08-01T22:01:07.293Z","updated_at":"2025-04-17T08:34:37.879Z","avatar_url":"https://github.com/ycanardeau.png","language":"C#","funding_links":[],"categories":["Content","Source Generators"],"sub_categories":["64. [ResXGenerator](https://ignatandrei.github.io/RSCG_Examples/v2/docs/ResXGenerator) , in the [FilesToCode](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#filestocode) category","Localization"],"readme":"# ResXGenerator\n\nResXGenerator is a C# source generator to generate strongly-typed resource classes for looking up localized strings.\n\nNOTE: This is an independent fork of VocaDb/ResXFileCodeGenerator.\n\n## Usage\n\nInstall the `Aigamo.ResXGenerator` package:\n\n```psl\ndotnet add package Aigamo.ResXGenerator\n```\n\nGenerated source from [ActivityEntrySortRuleNames.resx](https://github.com/VocaDB/vocadb/blob/6ac18dd2981f82100c8c99566537e4916920219e/VocaDbWeb.Resources/App_GlobalResources/ActivityEntrySortRuleNames.resx):\n\n```cs\n// ------------------------------------------------------------------------------\n// \u003cauto-generated\u003e\n//     This code was generated by a tool.\n//\n//     Changes to this file may cause incorrect behavior and will be lost if\n//     the code is regenerated.\n// \u003c/auto-generated\u003e\n// ------------------------------------------------------------------------------\n#nullable enable\nnamespace Resources\n{\n    using System.Globalization;\n    using System.Resources;\n\n    public static class ActivityEntrySortRuleNames\n    {\n        private static ResourceManager? s_resourceManager;\n        public static ResourceManager ResourceManager =\u003e s_resourceManager ??= new ResourceManager(\"VocaDb.Web.App_GlobalResources.ActivityEntrySortRuleNames\", typeof(ActivityEntrySortRuleNames).Assembly);\n        public static CultureInfo? CultureInfo { get; set; }\n\n        /// \u003csummary\u003e\n        /// Looks up a localized string similar to Oldest.\n        /// \u003c/summary\u003e\n        public static string? CreateDate =\u003e ResourceManager.GetString(nameof(CreateDate), CultureInfo);\n\n        /// \u003csummary\u003e\n        /// Looks up a localized string similar to Newest.\n        /// \u003c/summary\u003e\n        public static string? CreateDateDescending =\u003e ResourceManager.GetString(nameof(CreateDateDescending), CultureInfo);\n    }\n}\n```\n\n## New in version 3\n\n-   The generator now utilizes the IIncrementalGenerator API to instantly update the generated code, thus giving you instant intellisense.\n\n-   Added error handling for multiple members of same name, and members that have same name as class. These are clickable in visual studio to lead you to the source of the error, unlike before where they resulted in broken builds and you had to figure out why.\n\n-   Namespace naming fixed for resx files in the top level folder.\n\n-   Resx files can now be named with multiple extensions, e.g. myresources.cshtml.resx and will result in class being called myresources.\n\n-   Added the ability to generate inner classes, partial outer classes and non-static members. Very useful if you want to ensure that only a particular class can use those resources instead of being spread around the codebase.\n\n-   Use same 'Link' setting as msbuild uses to determine embedded file name.\n\n-   Can set a class postfix name\n\n## New in version 3.1\n\n-   The generator can now generate code to lookup translations instead of using the 20 year old System.Resources.ResourceManager\n\n## Options\n\n### PublicClass (per file or globally)\n\nUse cases: https://github.com/VocaDB/ResXFileCodeGenerator/issues/2.\n\nSince version 2.0.0, ResXGenerator generates internal classes by default. You can change this behavior by setting `PublicClass` to `true`.\n\n```xml\n\u003cItemGroup\u003e\n  \u003cEmbeddedResource Update=\"Resources\\ArtistCategoriesNames.resx\"\u003e\n    \u003cPublicClass\u003etrue\u003c/PublicClass\u003e\n  \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nor\n\n```xml\n\u003cItemGroup\u003e\n  \u003cEmbeddedResource Update=\"Resources\\ArtistCategoriesNames.resx\" PublicClass=\"true\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\nIf you want to apply this globally, use\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cResXGenerator_PublicClass\u003etrue\u003c/ResXGenerator_PublicClass\u003e\n\u003c/PropertyGroup\u003e\n```\n\n### NullForgivingOperators (globally)\n\nUse cases: https://github.com/VocaDB/ResXFileCodeGenerator/issues/1.\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cResXGenerator_NullForgivingOperators\u003etrue\u003c/ResXGenerator_NullForgivingOperators\u003e\n\u003c/PropertyGroup\u003e\n```\n\nBy setting `ResXGenerator_NullForgivingOperators` to `true`, ResXGenerator generates\n\n```cs\npublic static string CreateDate =\u003e ResourceManager.GetString(nameof(CreateDate), CultureInfo)!;\n```\n\ninstead of\n\n```cs\npublic static string? CreateDate =\u003e ResourceManager.GetString(nameof(CreateDate), CultureInfo);\n```\n\n### Non-static classes (per file or globally)\n\nTo use generated resources with [Microsoft.Extensions.Localization](https://docs.microsoft.com/en-us/dotnet/core/extensions/localization) `IStringLocalizer\u003cT\u003e` and resource manager, the resolved type cannot be a static class. You can disable default behavior per file by setting the value to `false`.\n\n```xml\n\u003cItemGroup\u003e\n  \u003cEmbeddedResource Update=\"Resources\\ArtistCategoriesNames.resx\"\u003e\n    \u003cStaticClass\u003efalse\u003c/StaticClass\u003e\n  \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nor globally\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cResXGenerator_StaticClass\u003efalse\u003c/ResXGenerator_StaticClass\u003e\n\u003c/PropertyGroup\u003e\n```\n\nWith global non-static class you can also reset `StaticClass` per file by setting the value to anything but `false`.\n\n### Partial classes (per file or globally)\n\nTo extend an existing class, you can make your classes partial.\n\n```xml\n\u003cItemGroup\u003e\n  \u003cEmbeddedResource Update=\"Resources\\ArtistCategoriesNames.resx\"\u003e\n    \u003cPartialClass\u003etrue\u003c/PartialClass\u003e\n  \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nor globally\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cResXGenerator_PartialClass\u003etrue\u003c/ResXGenerator_PartialClass\u003e\n\u003c/PropertyGroup\u003e\n```\n\n### Static Members (per file or globally)\n\nIn some rare cases it might be useful for the members to be non-static.\n\n```xml\n\u003cItemGroup\u003e\n  \u003cEmbeddedResource Update=\"Resources\\ArtistCategoriesNames.resx\"\u003e\n    \u003cStaticMembers\u003efalse\u003c/StaticMembers\u003e\n  \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nor globally\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cResXGenerator_StaticMembers\u003efalse\u003c/ResXGenerator_StaticMembers\u003e\n\u003c/PropertyGroup\u003e\n```\n\n### Postfix class name (per file or globally)\n\nIn some cases the it is useful if the name of the generated class doesn't follow the filename.\n\nA clear example is Razor pages that always generates a class for the code-behind named \"-Model\".\nThis example configuration allows you to use Resources.MyResource in your model, or @Model.Resources.MyResource in your cshtml file.\n\n```xml\n\u003cItemGroup\u003e\n  \u003cEmbeddedResource Update=\"**/Pages/*.resx\"\u003e\n    \u003cClassNamePostfix\u003eModel\u003c/ClassNamePostfix\u003e\n    \u003cStaticMembers\u003efalse\u003c/StaticMembers\u003e\n    \u003cStaticClass\u003efalse\u003c/StaticClass\u003e\n    \u003cPartialClass\u003etrue\u003c/PartialClass\u003e\n    \u003cPublicClass\u003etrue\u003c/PublicClass\u003e\n    \u003cInnerClassVisibility\u003epublic\u003c/InnerClassVisibility\u003e\n    \u003cPartialClass\u003efalse\u003c/PartialClass\u003e\n    \u003cInnerClassInstanceName\u003eResources\u003c/InnerClassInstanceName\u003e\n    \u003cInnerClassName\u003e_Resources\u003c/InnerClassName\u003e\n  \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nor just the postfix globally\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cResXGenerator_ClassNamePostfix\u003eModel\u003c/ResXGenerator_ClassNamePostfix\u003e\n\u003c/PropertyGroup\u003e\n```\n\n## Inner classes (per file or globally)\n\nIf your resx files are organized along with code files, it can be quite useful to ensure that the resources are not accessible outside the specific class the resx file belong to.\n\n```xml\n\u003cItemGroup\u003e\n    \u003cEmbeddedResource Update=\"**/*.resx\"\u003e\n        \u003cDependentUpon\u003e$([System.String]::Copy('%(FileName).cs'))\u003c/DependentUpon\u003e\n        \u003cInnerClassName\u003eMyResources\u003c/InnerClassName\u003e\n        \u003cInnerClassVisibility\u003eprivate\u003c/InnerClassVisibility\u003e\n        \u003cInnerClassInstanceName\u003eEveryoneLikeMyNaming\u003c/InnerClassInstanceName\u003e\n        \u003cStaticMembers\u003efalse\u003c/StaticMembers\u003e\n        \u003cStaticClass\u003efalse\u003c/StaticClass\u003e\n        \u003cPartialClass\u003etrue\u003c/PartialClass\u003e\n    \u003c/EmbeddedResource\u003e\n    \u003cEmbeddedResource Update=\"**/*.??.resx;**/*.??-??.resx\"\u003e\n        \u003cDependentUpon\u003e$([System.IO.Path]::GetFileNameWithoutExtension('%(FileName)')).resx\u003c/DependentUpon\u003e\n    \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nor globally\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cResXGenerator_InnerClassName\u003eMyResources\u003c/ResXGenerator_InnerClassName\u003e\n  \u003cResXGenerator_InnerClassVisibility\u003eprivate\u003c/ResXGenerator_InnerClassVisibility\u003e\n  \u003cResXGenerator_InnerClassInstanceName\u003eEveryoneLikeMyNaming\u003c/InnerClassInstanceName\u003e\n  \u003cResXGenerator_StaticMembers\u003efalse\u003c/ResXGenerator_StaticMembers\u003e\n  \u003cResXGenerator_StaticClass\u003efalse\u003c/ResXGenerator_StaticClass\u003e\n  \u003cResXGenerator_PartialClass\u003etrue\u003c/ResXGenerator_PartialClass\u003e\n\u003c/PropertyGroup\u003e\n```\n\nThis example would generate files like this:\n\n```cs\n// ------------------------------------------------------------------------------\n// \u003cauto-generated\u003e\n//     This code was generated by a tool.\n//\n//     Changes to this file may cause incorrect behavior and will be lost if\n//     the code is regenerated.\n// \u003c/auto-generated\u003e\n// ------------------------------------------------------------------------------\n#nullable enable\nnamespace Resources\n{\n    using System.Globalization;\n    using System.Resources;\n\n    public partial class ActivityEntryModel\n    {\n        public MyResources EveryoneLikeMyNaming { get; } = new();\n\n        private class MyResources\n        {\n            private static ResourceManager? s_resourceManager;\n            public static ResourceManager ResourceManager =\u003e s_resourceManager ??= new ResourceManager(\"VocaDb.Web.App_GlobalResources.ActivityEntryModel\", typeof(ActivityEntryModel).Assembly);\n            public CultureInfo? CultureInfo { get; set; }\n\n            /// \u003csummary\u003e\n            /// Looks up a localized string similar to Oldest.\n            /// \u003c/summary\u003e\n            public string? CreateDate =\u003e ResourceManager.GetString(nameof(CreateDate), CultureInfo);\n\n            /// \u003csummary\u003e\n            /// Looks up a localized string similar to Newest.\n            /// \u003c/summary\u003e\n            public string? CreateDateDescending =\u003e ResourceManager.GetString(nameof(CreateDateDescending), CultureInfo);\n        }\n    }\n}\n```\n\n### Inner Class Visibility (per file or globally)\n\nBy default inner classes are not generated, unless this setting is one of the following:\n\n-   Public\n-   Internal\n-   Private\n-   Protected\n-   SameAsOuter\n\nCase is ignored, so you could use \"private\".\n\nIt is also possible to use \"NotGenerated\" to override on a file if the global setting is to generate inner classes.\n\n```xml\n\u003cItemGroup\u003e\n    \u003cEmbeddedResource Update=\"**/*.resx\"\u003e\n        \u003cInnerClassVisibility\u003eprivate\u003c/InnerClassVisibility\u003e\n    \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nor globally\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cResXGenerator_InnerClassVisibility\u003eprivate\u003c/ResXGenerator_InnerClassVisibility\u003e\n\u003c/PropertyGroup\u003e\n```\n\n### Inner Class name (per file or globally)\n\nBy default the inner class is named \"Resources\", which can be overridden with this setting:\n\n```xml\n\u003cItemGroup\u003e\n    \u003cEmbeddedResource Update=\"**/*.resx\"\u003e\n        \u003cInnerClassName\u003eMyResources\u003c/InnerClassName\u003e\n    \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nor globally\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cResXGenerator_InnerClassName\u003eMyResources\u003c/ResXGenerator_InnerClassName\u003e\n\u003c/PropertyGroup\u003e\n```\n\n### Inner Class instance name (per file or globally)\n\nBy default no instance is available of the class, but that can be made available if this setting is given.\n\n```xml\n\u003cItemGroup\u003e\n    \u003cEmbeddedResource Update=\"**/*.resx\"\u003e\n        \u003cInnerClassInstanceName\u003eEveryoneLikeMyNaming\u003c/InnerClassInstanceName\u003e\n    \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nor globally\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cResXGenerator_InnerClassInstanceName\u003eEveryoneLikeMyNaming\u003c/ResXGenerator_InnerClassInstanceName\u003e\n\u003c/PropertyGroup\u003e\n```\n\nFor brevity, settings to make everything non-static is omitted.\n\n### Generate Code (per file or globally)\n\nBy default the ancient `System.Resources.ResourceManager` is used.\n\nBenefits of using `System.Resources.ResourceManager`:\n\n-   Supports custom `CultureInfo`\n-   Languages are only loaded the first time a language is referenced\n-   Only use memory for the languages used\n-   Can ship satellite dlls separately\n\nDisadvantages of using `System.Resources.ResourceManager`\n\n-   The satellite dlls are always lazy loaded, so cold start penalty is high\n-   Satellite dlls requires that you can scan the dir for which files are available, which can cause issues in some project types\n-   Loading a satellite dll takes way more memory than just loading the respective strings\n-   Build time for .resources -\u003e satellite dll can be quite slow (~150msec per file)\n-   Linker optimization doesn't work, since it cannot know which resources are referenced\n\nBenefits of using `GenerateCode` code generation:\n\n-   All languages are placed in the main dll, no more satellite dlls\n-   Lookup speed is ~600% faster (5ns vs 33ns)\n-   Zero allocations\n-   Very small code footprint (about 10 bytes per language, instead of including the entire `System.Resources`)\n-   Very fast build time\n-   Because all code is referencing the strings directly, the linker can see which strings are actually used and which are not.\n-   No cold start penalty\n-   Smaller combined size of dll (up to 50%, since it doesn't need to store the keys for every single language)\n\nDisadvantages of using `GenerateCode` code generation\n\n-   Since `CultureInfo` are pre-computed, custom `CultureInfo` are not supported (or rather, they always return the default language)\n-   Cannot lookup \"all\" keys (unless using reflection)\n-   Main dll size increased since it contains all language strings (sometimes, the compiler can pack code strings much better than resource strings and it doesn't need to store the keys)\n\nNotice, it is required to set `GenerateResource` to false for all resx files to prevent the built-in resgen.exe from running.\n\n```xml\n\u003cItemGroup\u003e\n    \u003cEmbeddedResource Update=\"**/*.resx\"\u003e\n        \u003cGenerateCode\u003etrue\u003c/GenerateCode\u003e\n        \u003cGenerateResource\u003efalse\u003c/GenerateResource\u003e\n    \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nor globally\n\n```xml\n\u003cPropertyGroup\u003e\n  \u003cResXGenerator_GenerateCode\u003etrue\u003c/ResXGenerator_GenerateCode\u003e\n\u003c/PropertyGroup\u003e\n\u003cItemGroup\u003e\n    \u003cEmbeddedResource Update=\"@(EmbeddedResource)\"\u003e\n        \u003cGenerateResource\u003efalse\u003c/GenerateResource\u003e\n    \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nIf you get build error MSB3030, add this to your csproj to prevent it from trying to copy satellite dlls that no longer exists\n\n```xml\n\u003cTarget Name=\"PreventMSB3030\" DependsOnTargets=\"ComputeIntermediateSatelliteAssemblies\" BeforeTargets=\"GenerateSatelliteAssemblies\" \u003e\n  \u003cItemGroup\u003e\n    \u003cIntermediateSatelliteAssembliesWithTargetPath Remove=\"@(IntermediateSatelliteAssembliesWithTargetPath)\"\u003e\u003c/IntermediateSatelliteAssembliesWithTargetPath\u003e\n  \u003c/ItemGroup\u003e\n\u003c/Target\u003e\n```\n\n## Resource file namespaces\n\nLinked resources namespace follow `Link` if it is set. The `Link` setting is also used by msbuild built-in 'resgen.exe' to determine the embedded filename.\n\nUse-case: Linking `.resx` files from outside source (e.g. generated in a localization sub-module by translators) and expose them as \"Resources\" namespace.\n\n```xml\n\u003cItemGroup\u003e\n  \u003cEmbeddedResource Include=\"..\\..\\Another.Project\\Translations\\*.resx\"\u003e\n    \u003cLink\u003eResources\\%(FileName)%(Extension)\u003c/Link\u003e\n    \u003cPublicClass\u003etrue\u003c/PublicClass\u003e\n    \u003cStaticClass\u003efalse\u003c/StaticClass\u003e\n  \u003c/EmbeddedResource\u003e\n  \u003cEmbeddedResource Update=\"..\\..\\Another.Project\\Translations\\*.*.resx\"\u003e\n    \u003cDependentUpon\u003e$([System.IO.Path]::GetFilenameWithoutExtension([System.String]::Copy('%(FileName)'))).resx\u003c/DependentUpon\u003e\n  \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nYou can also use the `TargetPath` to just overwrite the namespace\n\n```xml\n\u003cItemGroup\u003e\n  \u003cEmbeddedResource Include=\"..\\..\\Another.Project\\Translations\\*.resx\"\u003e\n    \u003cTargetPath\u003eResources\\%(FileName)%(Extension)\u003c/TargetPath\u003e\n    \u003cPublicClass\u003etrue\u003c/PublicClass\u003e\n    \u003cStaticClass\u003efalse\u003c/StaticClass\u003e\n  \u003c/EmbeddedResource\u003e\n  \u003cEmbeddedResource Update=\"..\\..\\Another.Project\\Translations\\*.*.resx\"\u003e\n    \u003cDependentUpon\u003e$([System.IO.Path]::GetFilenameWithoutExtension([System.String]::Copy('%(FileName)'))).resx\u003c/DependentUpon\u003e\n  \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nIt is also possible to set the namespace using the `CustomToolNamespace` setting. Unlike the `Link` and `TargetPath`, which will prepend the assemblies namespace and includes the filename, the `CustomToolNamespace` is taken verbatim.\n\n```xml\n\u003cItemGroup\u003e\n  \u003cEmbeddedResource Update=\"**\\*.resx\"\u003e\n    \u003cCustomToolNamespace\u003eMyNamespace.AllMyResourcesAreBelongToYouNamespace\u003c/CustomToolNamespace\u003e\n  \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\n## Excluding resx files\n\nIndividual resx files can also be excluded from being processed by setting the `SkipFile` metadata to true.\n\n```xml\n\u003cItemGroup\u003e\n    \u003cEmbeddedResource Update=\"ExcludedFile.resx\"\u003e\n        \u003cSkipFile\u003etrue\u003c/SkipFile\u003e\n    \u003c/EmbeddedResource\u003e\n\u003c/ItemGroup\u003e\n```\n\nAlternatively it can be set with the attribute `SkipFile=\"true\"`.\n\n```xml\n\u003cItemGroup\u003e\n\t\u003cEmbeddedResource Update=\"ExcludedFile.resx\" SkipFile=\"true\" /\u003e\n\u003c/ItemGroup\u003e\n```\n\n## References\n\n-   [Introducing C# Source Generators | .NET Blog](https://devblogs.microsoft.com/dotnet/introducing-c-source-generators/)\n-   [microsoft/CsWin32: A source generator to add a user-defined set of Win32 P/Invoke methods and supporting types to a C# project.](https://github.com/microsoft/cswin32)\n-   [kenkendk/mdresxfilecodegenerator: Resx Designer Generator](https://github.com/kenkendk/mdresxfilecodegenerator)\n-   [dotnet/ResXResourceManager: Manage localization of all ResX-Based resources in one central place.](https://github.com/dotnet/ResXResourceManager)\n-   [roslyn/source-generators.cookbook.md at master · dotnet/roslyn](https://github.com/dotnet/roslyn/blob/master/docs/features/source-generators.cookbook.md)\n-   [roslyn/Using Additional Files.md at master · dotnet/roslyn](https://github.com/dotnet/roslyn/blob/master/docs/analyzers/Using%20Additional%20Files.md)\n-   [ufcpp - YouTube](https://www.youtube.com/channel/UCY-z_9mau6X-Vr4gk2aWtMQ)\n-   [amis92/csharp-source-generators: A list of C# Source Generators (not necessarily awesome) and associated resources: articles, talks, demos.](https://github.com/amis92/csharp-source-generators)\n-   [A NuGet package workflow using GitHub Actions | by Andrew Craven | Medium](https://acraven.medium.com/a-nuget-package-workflow-using-github-actions-7da8c6557863)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycanardeau%2FResXGenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fycanardeau%2FResXGenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycanardeau%2FResXGenerator/lists"}