简体   繁体   中英

Visual Studio External Tools sending command to command prompt

I added Run IL button to external tool section of visual studio . 在此处输入图片说明

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 在此处输入图片说明

How can it be done automatically ? 在此处输入图片说明

@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在此处输入图片说明

Also i added shortcut.

在此处输入图片说明

Now this is working perfect :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM