0

@REM By unknown

@echo off
color 0A

%~d1
cd %~p1

set _source_=
set _dll_=

:LOOP

if "%1" == "" goto COMPILE
if /i "%~x1"==".cs" goto SOURCE
if /i "%~x1"==".dll" goto DLL
goto SFT

:SOURCE
if "%_source_%"=="" goto S2

:S1
set _source_=%_source_% %~nx1
goto SFT

:S2
set _source_=%~nx1
goto SFT

:DLL
if "%_dll_%"=="" goto D2

:D1
set _dll_=%_dll_%,%~nx1
goto SFT

:D2
set _dll_=%~nx1
goto SFT

:SFT
shift
goto LOOP

:COMPILE
set _compilerdir_=%WinDir%\MicroSoft.NET\Framework\v2.0.50727\
set _compiler_=%_compilerdir_%csc.exe /unsafe

if "%_dll_%"=="" goto C2

:C1
%_compiler_% /r:%_dll_% %_source_%
goto RESULT%errorlevel%

:C2
%_compiler_% %_source_%
goto RESULT%errorlevel%

:RESULT1
echo -------------------------------------------
echo compileing %_source_% is failed!
echo -------------------------------------------
pause
goto END


:END

usage:
directly drag a single of filename.cs on its merits; automatically renewable make-up filename.exe or filename.exe dll.only just to add " /t:library"
after,drag the filename.exe on visual studio.net 200x Command Prompt.you will see the result.

Votes + Comments
that's a harsh point reduction for a forum post mistake :(
this isn't shell programming forum.
2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Ancient Dragon
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.