Visual Studio For Mac Does Not Compile Exe

Active3 years, 8 months ago

Rather, a standard.exe file titled.exe is built by VS, but that's just the empty executable assembly for the C# console app project type that Xamarin uses, not the iPad app redistributable I was after. Visual Studio Code - debug by “Attach” does not work on Mac OS node.js, vscode I got the answer from MS Support Team, it works like a champ now:) Love VSCode and the team so much.

Microsoft has just released the new Visual Studio Code for the Mac OS X platform. It supports TypeScript, in that one can get autocomplete and error reporting for TypeScript code.

My question: How can we compile a TypeScript file (to produce the corresponding JavaScript file) from within Visual Studio Code? I have created a default tsconfig.json file as recommended, with just {}, and have tried invoking shift+command+B but this does not produce an updated JavaScript file.

These programs can include crack, keygen, patch or serial keys. Hallmark card studio free download.

jessehouwing
74.2k15 gold badges176 silver badges256 bronze badges
Richard FuhrRichard Fuhr
8552 gold badges10 silver badges13 bronze badges

4 Answers

You will need to set up a task to do this.

I apologise in advance if I get the short-cuts a bit wrong as I am sat using a different operating system. For anyone using Windows, it will be CTRL - I think the OSX version just means using CMD instead.

If you press CTRL + SHIFT + P, you should get an action menu appear that allows you to search all commands.

Type Configure Task Runner. If you don't already have one, this will create a tasks.json file in a settings folder for you. Otherwise, it will open the existing tasks.json file.

You can uncomment the TypeScript task that is built in - it looks like this (my main file is app.ts, the default in this file is HelloWorld.ts):

You can then this task on demand using CTRL + SHIFT + B.

If you have multiple tasks defined, you can use CTRL + E and type task (note the space after 'task') and it will give you a list of all tasks for you to choose from.

Your hands don't need to leave the keyboard for any of this!

Lastly.. if you are still getting nothing, check this icon at the bottom of the window as you may have a compiler error.. (the icons below are showing one error - click on it in your editor for details).

ExeFentonVisual Studio For Mac Does Not Compile ExeFenton
167k47 gold badges304 silver badges332 bronze badges

I had faced the same issue with the tsc transpiler (since it compiles a source code from one format to another) not generating the '.js' file.

Workaround:

Try executing the following command in your Windows Command Prompt (cmd.exe - Run as Administrator):

tsc test.ts

Visual Studio For Mac Does Not Compile Execute

Ensure that you are in the right folder path or else provide the absolute path for the '.ts' file Visual studio for mac looks different.

Hopefully, it should generate the '.js' file in the same folder as the '.ts' file.

Now that the '.js' file is generated, inorder to avoid executing the above command everytime you make a change, you can execute an auto-transpilation watch command in tsc.

To perform an auto-transpilation for the '.ts' file, try running the following command:

Now if you go back to your '.ts' file and make changes and hit Save, it will perform an auto-transpilation and update your '.js' file instantly. Remember to keep the command prompt running.

I am yet to explore the reason as to why the tsc transpiler is not working on Visual Studio Code's Ctrl + Shift + B keypress, but my best guess would be an issue with the tsc version used by my Visual Studio Code installation or the environment PATH variables defined or npm installed a different tsc version. reasons could be multiple.

Output:

But for those who want to get things done quickly, i hope this workaround helps.

Aackose LalAackose Lal

You need a tsconfig.json file to define all options for the TypeScript Compiler, and a tasks.json file to set the compiler options.

tsconfig.json

tasks.json .. See the line 'args' with ${file} to compile the opened file.

More info: http://blogs.msdn.com/b/typescript/archive/2015/04/30/using-typescript-in-visual-studio-code.aspx

Denis VoituronDenis Voituron

Microsoft visual studio for mac. I found a solution that worked on the Mac. In the args line, I put the full path name for the TypeScript file that I wanted to compile. Then, launching a build using CMD + SHIFT + B did successfully run the tsc compiler and did successfully generate the corresponding JavaScript file.

Richard Fuhr

Visual Studio For Mac Does Not Compiling Exe

Richard Fuhr
8552 gold badges10 silver badges13 bronze badges

Build Exe Visual Studio

Not the answer you're looking for? Browse other questions tagged javascriptmacostypescriptvisual-studio-code or ask your own question.