VS Code resx file extension - visual-studio-code

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.

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.

Related

Custom autocomplete for Visual Studio or ReSharper

I'm working with a game engine named ORX which is data driven. That means, that you define object behaviours, configurations, etc. in .ini files, making it possible to change things without recompiling your code. There are two template files for how to write these .ini files for your game: CreationTemplate.ini and SettingsTemplate.ini.
What I would like to achieve is an autocompletion feature for Visual Studio (or if it's not possible, then for ReSharper), where in a new .ini file the IDE uses this two templates to suggest solutions.
I haven't found any options to extend the existing autocomplete functionality with custom rules, so I'm thinking about writing an extension for it. Only, I have never done this before and I have no idea where to start or how hard/long would it be/take.
Could you give me some tips and starting points for this project? Thank you for your help in advance.

How to create a new Rust project from the VS Code, and not through the command-line?

The Rust Programming Language book explains how to create a project on the command-line. The same section is referred by the explanation of how to Quickstart using the extension of the VS Code for Rust.
How can I create a new Rust project from within VS Code, and not through the command-line?
This extension has cargo new command as their planned feature.
You can write your own extension for simple tasks like this, it's quite easy to write one.(I wrote before) But it's still overkill two create a directory(src) and 2 files (main.rs,cargo.toml).
You can create files/folder manually with new file button and add a snippet for each boilerplate code in the files. Snippets can take parameters, you can give your project name there.
If you are going to use this feature a lot, you can write a global task, that can create and populate those files for you.
In the source control pane, when you click the icon near SOURCE CONTROL title, it will create a .git folder for you, which is also done by cargo new.
If you are looking to specifically create a project with the Rust official extension, it's language server and it doesn't have that functionality.

Visual Studio Code include single file on excluded path

I have configured Visual Studio Code (VCS) to exclude the imported directory and all code under it using:
"files.exclude": {
"**/imported": true
}
This imported folder is very large, containing many large code bases. It is excluded for performance reasons.
However I want to still include some imported library interface files so they can be source indexed.
For example, I want to still include imported/library-a/library-a-interface.h to simplify development using these interfaces (structure fields shown in the editor, etc).
Is this possible? if so how?
As of VS Code 1.15, we don't have a good story for this. We are tracking the issue here

How can I configure Visual Studio Code to recognize files with extensions other than .js as Javascript

We have a QA tool (SmartBear's TestComplete) that uses javascript as a scripting language, but names the file with a ".sj" extension instead of ".js". I would like to use Visual Studio Code to edit those files, with all the nice intellisense and other tooling that comes with it, but I can't figure out how to configure it to recognize .sj files as javascript files. Any ideas?
Answering my own question, just for future readers that may be searching for the same thing.
According to a tweet from #code, this is not yet possible, but is coming "soon".

Packaging and Transforming Source Code Using NuGet

I'm currently working on a little pet project that takes a code file and deploys it using NuGet. I can currently replace the namespaces in the project using the $rootnamespace$ token and the .pp extension, but I'm curious if there is a better way.
My chief complaint is that I have to take code which builds correctly and transform it temporarily into something that no longer does so.
Is there a way for me to perform these transformations without having to alter my source code directly?
So, I created a very simple NuGet Preprocessor that looks at my solution and creates a shadow copy that has been tokenized and transformed to adhere to the NuGet standard. Works like a charm and now I can very easily deploy source files directly.