Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio External Tools sending command to command prompt

I added Run IL button to external tool section of visual studio . enter image description here

when this button triggered i want to compile current file with ilasm.I can open developer command prompt in this way,however i couldn't add file directory so i have to write "ilasm program.il" all the time enter image description here

How can it be done automatically ? enter image description here

like image 798
Hector Avatar asked Sep 18 '25 06:09

Hector


1 Answers

@echo off
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\ilasm.exe"  %1


SETLOCAL
set file=%1
FOR %%i IN (%file%) DO (
set filedrive=%%~di
set filepath=%%~pi
set filename=%%~ni
set fileextension=%%~xi
)

start %filedrive%%filepath%%filename%.exe


pause

I writed a bat file then i edit my external tool like this enter image description here

Also i added shortcut.

enter image description here

Now this is working perfect :)

like image 107
Hector Avatar answered Sep 20 '25 22:09

Hector