Compiler-Optionen in C# [] (Compiler-Optionen in C#), Lektion, Seite 723512
https://www.purl.org/stefan_ram/pub/compiler_optionen_csharp (Permalink) ist die kanonische URI dieser Seite.
Stefan Ram
C#-Kurs

Compiler-Optionen in C♯ 

Batch
set CSC=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe

%csc% /nologo /warn:4 /debug /optimize ^

  /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.JScript.dll ^

  /reference:System.IO.Compression.FileSystem.dll ^

  /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\PresentationCore.dll ^

  /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\PresentationFramework.dll ^

  /reference:System.dll ^

  /reference:System.Windows.dll ^

  /reference:System.Xaml.dll ^

  /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\WindowsBase.dll ^

  Program.cs

if NOT ERRORLEVEL 1 Program.exe

PAUSE
Batch
C:\WINDOWS\Microsoft.NET\Framework\v1.0.2204\csc.exe /R:System.DLL /R:System.Data.DLL Program.cs

if %ERRORLEVEL% over

Program.exe

:over

PAUSE
Batch
if exist C:\Windows\Microsoft.NET\Framework64\v3.5\csc.exe ^

set CSC=C:\Windows\Microsoft.NET\Framework64\v3.5\csc.exe 

if exist C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe ^

set CSC=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe 

echo class ProgramToUnzipMySQL ^

{ static void Main( string[]s )^

  { System.IO.Compression.ZipFile.ExtractToDirectory^

    ( @"%WORKFOLDER%\mysql-5.6.27-win%ARC%.zip", ^

      @"%WORKFOLDER%\mysql-5.6.27-win%ARC%" ); }} >ProgramToUnzipMySQL.cs

"%csc%" /reference:System.IO.Compression.FileSystem.dll ProgramToUnzipMySQL.cs

ProgramToUnzipMySQL.exe
Batch
set CSC="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe"

set ILDASM="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64\ildasm.exe"

%CSC% Hello.cs

Hello.exe

%ILDASM% Hello.exe

PAUSE

ILDASM ist nicht Teil des vorinstallierten Net Frameworks aber des Windows SDK

Batch
set CSC="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe"

set ILDASM="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64\ildasm.exe"

%CSC% Hello.cs

Hello.exe

%ILDASM% Hello.exe

PAUSE
Batch
set CSC=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe

%csc% /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.JScript.dll Program.cs

if NOT ERRORLEVEL 1 Program.exe

PAUSE
Batch
if exist C:\Windows\Microsoft.NET\Framework64\v3.5\csc.exe set CSC=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe 

if exist C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe set CSC=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe 

@REM set CSC=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe 

"%csc%" /reference:System.IO.Compression.FileSystem.dll ^

 /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\PresentationCore.dll ^

 /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\PresentationFramework.dll ^

 /reference:System.dll ^

 /reference:System.Windows.dll ^

 /reference:System.Xaml.dll ^

 /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\WindowsBase.dll ^

 /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\System.Speech.dll ^

 Program.cs

Program.exe

PAUSE
Batch
if exist C:\Windows\Microsoft.NET\Framework64\v3.5\csc.exe set CSC=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe 

if exist C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe set CSC=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe 

@REM set CSC=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe 

"%CSC%" /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.JScript.dll ^

 /reference:System.IO.Compression.FileSystem.dll ^

 /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\PresentationCore.dll ^

 /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\PresentationFramework.dll ^

 /reference:System.dll ^

 /reference:System.Windows.dll ^

 /reference:System.Xaml.dll ^

 /reference:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\WindowsBase.dll ^

 Program.cs

Program.exe

@REM csc /target:library /out:Temperature.dll TemperatureUnit.cs Temperature.cs 

@REM csc Clock.cs /reference:System.dll 

@REM // csc /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.IO.Compression.FileSystem.dll"

@REM /reference:System.IO.Compression.FileSystem.dll

PAUSE
Batch
set VBC=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\vbc.exe

%vbc% Main.vb

IF NOT ERRORLEVEL 1 .\Main.exe

@REM csc /target:library /out:Temperature.dll TemperatureUnit.cs Temperature.cs 

@REM csc Clock.cs /reference:System.dll 

PAUSE
Batch
C:\WINDOWS\Microsoft.NET\Framework\v1.0.2204\csc.exe /R:System.DLL /R:System.WinForms.DLL /R:System.Drawing.DLL /R:Microsoft.Win32.InterOp.DLL Program.cs

if %ERRORLEVEL% over

Program.exe

:over

PAUSE
Batch
_BC=C:\Microsoft.Net\FrameworkSDK\Bin\vbc.exe

_CL=C:\Microsoft.Net\FrameworkSDK\Bin\cl.exe

_C1=C:\Microsoft.Net\FrameworkSDK\Bin\C1.dll

_CX=C:\Microsoft.Net\FrameworkSDK\Bin\c1xx.dll

_C2=C:\Microsoft.Net\FrameworkSDK\Bin\c2.dll

_CS=C:\Windows\Microsoft.NET\Framework\v1.0.2204\csc.exe

_ASSEM=C:\Microsoft.Net\FrameworkSDK\Bin\ilasm.exe



_TLBIMP=C:\Microsoft.Net\FrameworkSDK\Bin\tlbimp.exe

_TLBEXP=C:\Microsoft.Net\FrameworkSDK\Bin\tlbexp.exe

_REGASM=C:\Windows\Microsoft.NET\Framework\v1.0.2204\regasm.exe

_REGSVR=C:\Microsoft.Net\FrameworkSDK\Bin\regsvr32.exe

_RSC=C:\Microsoft.Net\FrameworkSDK\Bin\rc.exe

_AL=C:\Microsoft.Net\FrameworkSDK\Bin\al.exe

_SN=C:\Microsoft.Net\FrameworkSDK\Bin\sn.exe



_LINK=link.exe





example.dll:

	if not exist $(_OUTDIR) md $(_OUTDIR)

	$(_CS) $(_CS_DLL_FLAGS) $(_IMPORTS) /out:$(_OUTDIR)\$@ $*.cs $(_WIN32RES) $(_KEYFILE)

	$(_AL) /i:example.dll

	$(_REGASM) $*.dll /tlb:$*.tlb

	copy $*.dll C:\slr

	copy $*.tlb C:\slr



all: example.dll

Beispiel
Erklärung
Übung

Seiteninformationen und Impressum   |   Mitteilungsformular  |   "ram@zedat.fu-berlin.de" (ohne die Anführungszeichen) ist die Netzpostadresse von Stefan Ram.   |   Eine Verbindung zur Stefan-Ram-Startseite befindet sich oben auf dieser Seite hinter dem Text "Stefan Ram".)  |   Der Urheber dieses Textes ist Stefan Ram. Alle Rechte sind vorbehalten. Diese Seite ist eine Veröffentlichung von Stefan Ram. Schlüsselwörter zu dieser Seite/relevant keywords describing this page: Stefan Ram Berlin slrprd slrprd stefanramberlin spellched stefanram723512 stefan_ram:723512 Compiler-Optionen in C# Stefan Ram, Berlin, and, or, near, uni, online, slrprd, slrprdqxx, slrprddoc, slrprd723512, slrprddef723512, PbclevtugFgrsnaEnz Erklärung, Beschreibung, Info, Information, Hinweis,

Der Urheber dieses Textes ist Stefan Ram. Alle Rechte sind vorbehalten. Diese Seite ist eine Veröffentlichung von Stefan Ram.
https://www.purl.org/stefan_ram/pub/compiler_optionen_csharp