Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

41
csc Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# csc
> The Microsoft C# Compiler.
> More information: <https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-options/command-line-building-with-csc-exe>.
- Compile one or more C# files to a CIL executable:
`csc {{path/to/input_file_a.cs}} {{path/to/input_file_b.cs}}`
- Specify the output filename:
`csc /out:{{path/to/filename}} {{path/to/input_file.cs}}`
- Compile into a `.dll` library instead of an executable:
`csc /target:library {{path/to/input_file.cs}}`
- Reference another assembly:
`csc /reference:{{path/to/library.dll}} {{path/to/input_file.cs}}`
- Embed a resource:
`csc /resource:{{path/to/resource_file}} {{path/to/input_file.cs}}`
- Automatically generate XML documentation:
`csc /doc:{{path/to/output.xml}} {{path/to/input_file.cs}}`
- Specify an icon:
`csc /win32icon:{{path/to/icon.ico}} {{path/to/input_file.cs}}`
- Strongly-name the resulting assembly with a keyfile:
`csc /keyfile:{{path/to/keyfile}} {{path/to/input_file.cs}}`