4

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

Hector
  • 123
  • 3
  • 9

1 Answers1

2
@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 :)

Hector
  • 123
  • 3
  • 9