Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code resx file extension

Seems like there is no way to automatically create and manage resx files in VS Code now. Does someone know extension for it?

P.S. Yeah, I know that I can edit resx file as bare xml, but it`s not a right way.

like image 347
Nikita Pakhomov Avatar asked Dec 03 '16 22:12

Nikita Pakhomov


People also ask

What is Resx extension?

A . resx file contains a standard set of header information that describes the format of the resource entries, and specifies the versioning information for the XML code that parses the data. These files contain all the strings, labels, captions, and titles for all text in the three IBM Cognos Office components.

What is Resx in Visual Studio?

Net Resource (. resx) files are a monolingual file format used in Microsoft . Net Applications. The . resx resource file format consists of XML entries, which specify objects and strings inside XML tags.


1 Answers

The problem with resx is that it uses a Visual Studio "Custom Tool" to generate the code for the resources, and so requires Visual Studio to function fully.

I've been working on a replacement to resx that should also work from VS Code. It uses json rather than xml to define the resources, but otherwise behaves much like a resx file. The json resources file uses a ".resj" extension, and has a very simple structure. It currently only supports string resources that can be defined either inline in the json, or in an external file reference.

The project is open source on GitHub here: https://github.com/MarkPflug/Elemental.JsonResource/

This is available as a nuget package "Elemental.JsonResource", currently only pre-release. Simply add this package to your project to enable using resj files. It doesn't add a runtime dependency to your project, everything is done at build-time. My hope is to provide feature-parity with what a resx file can do, but it could be useful even in its current state.

like image 105
MarkPflug Avatar answered Oct 17 '22 23:10

MarkPflug