Visual Studio Enterprise 2022 - how to create a Mix project?

I’m using Microsoft Visual Studio Enterprise 2022 (2) Version 17.5.3, and trying to create a Mix project in it. (In case it matters, I’m using Mix 1.14.3 compiled with Erlang/OTP 25.)

I don’t care whether I use cmake, nmake, msbuild, whatever – I only want to configure my codebase such that VS 2022 on my machine (and the machines of any future collaborators) will call mix for the key operations, to be able to press Ctrl_F5 to call mix run, etc., without hacky workarounds like “just rebind your hotkeys to run globally hard-coded commands”.

I’m new to progamming on Windows, and also new to Elixir. I have intermediate experience with Python programming and packaging on Linux. I tried reading this article, but got a bit lost since I’m not clear on how much of what they’re saying is specific to C-like toolchains or depends on tight couplings between the editor and the codebase that simply aren’t possible with languages the editor wasn’t hard-coded to support.

So, what kind of project metadata file can I create to correctly indicate a Mix project to Visual Studio Enterprise 2022, at least just to support basic tasks like compiling and running?

1 Like

It looks like I only had a trial license for the Enterprise edition. :see_no_evil:

However, even after downgrading, the problem remains exactly as-described—i.e. (as I initially suspected) this problem is not specific to the Enterprise edition. Could the edit to the title please be reverted?

To be clear, I would like it if debugger integrations existed (to get those in-line pop-ups “your code stopped right here”, etc.), but even just the simpler use-case of making the “Run” action work properly would be great.

Not a direct answer to your question but afaik there is no Elixir plugin for Visual Studio (the .NET IDE) however there is a plugin for Visual Studio Code (Lightweight Code Editor) that has all those functions, and it’s free.

There is absolutely zero integration of elixir with Visual Studio, because of its closed nature and no support on linux, if you want to have some IDE features, then you either will have to use vscode or intellij, or if you are a masochist I think the elixir language server also works on things like vi/vim.

As for debugger, I never needed to use it, even though it works with intellij and elixir-ls plugins, this is mostly because you have immutable types and functions that (mostly) don’t produce side effects without results, also you have access to debug tools natively from elixir.