Skip to content
A set of .NET tools that converts a Resx code into C# code.
C#
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
src Version 1.0.0 Alpha 6 Jan 13, 2019
.gitattributes Added a source code Oct 23, 2017
.gitignore
CHANGELOG.md Version 1.0.0 Alpha 6 Jan 13, 2019
LICENSE.txt PackageLicenseUrl -> PackageLicenseFile Jan 12, 2019
README.md
ResxToCs.sln 1. From the dotnet-resx2cs module was extracted a basic logic and mov… Nov 6, 2017
global.json

README.md

ResxToCs

A set of .NET tools that converts a Resx code into C# code.

ResxToCs.Core

A .NET library that converts a Resx code into C# code.

Installation

This library can be installed through NuGet - http://nuget.org/packages/ResxToCs.Core.

Usage

Coming soon…

dotnet-resx2cs

A .NET Core CLI tool that converts the .resx files to the .Designer.cs files.

Installation

This tool can be installed through NuGet - http://nuget.org/packages/dotnet-resx2cs. Installation of this package should be done by adding the following code into .csproj file:

<ItemGroup>
	<DotNetCliToolReference Include="dotnet-resx2cs" Version="" />
</ItemGroup>

Usage

In simplest case, you just need to add the following code into .csproj file:

<Target Name="СonvertResxToCs" BeforeTargets="BeforeCompile">
	<Exec Command="dotnet resx2cs" />
</Target>

If your .resx files are outside the project, then you can specify a another directory by using the following command:

dotnet resx2cs my-resource-directory

ResxToCs.MSBuild

A MSBuild task that converts the .resx files to the .Designer.cs files.

Installation

This tool can be installed through NuGet - http://nuget.org/packages/ResxToCs.MSBuild.

Usage

In simplest case, you do not need to do anything. But if your .resx files are outside the project, then you need to first disable the default target:

<PropertyGroup>
	… 
	<DisableDefaultResxToCsConversionTarget>true</DisableDefaultResxToCsConversionTarget>
	… 
</PropertyGroup>

Then add a new target and explicitly specify the value of InputDirectory property:

<Target Name="СonvertResxToCs" BeforeTargets="BeforeCompile">
	<ResxToCsTask InputDirectory="my-resource-directory" />
</Target>

Release History

See the changelog.

License

Apache License Version 2.0

You can’t perform that action at this time.