Use primary constructors to simplify your class and struct definitions.
public class Person(string name, int age) {
public void Deconstruct(out string name, out int age) => (name, age) = (this.name, this.age);
# Unused local variable settings | |
dotnet_diagnostic.IDE0059.severity = error | |
dotnet_diagnostic.CS0168.severity = error | |
dotnet_diagnostic.CS0219.severity = error |
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "https://json.schemastore.org/mcp-config-0.1.0.json", | |
"title": "MCP Servers Configuration", | |
"description": "Configuration schema for MCP (Model Context Protocol) servers", | |
"type": "object", | |
"required": ["servers"], | |
"additionalProperties": false, | |
"properties": { | |
"inputs": { |
{ | |
"root":true, | |
"dependentFileProviders":{ | |
"add":{ | |
"addedExtension":{}, | |
"pathSegment":{"add":{".*":[".js",".css",".html",".htm",".less",".scss",".coffee",".iced",".config",".cs",".vb",".json"]}}, | |
"extensionToExtension":{ | |
"add":{ | |
".js":[".coffee",".iced",".ts",".tsx",".jsx"], | |
".css":[".less",".scss",".sass",".styl"], |
There are 3 ways console output can be displayed in VS Code. These are explained here: https://code.visualstudio.com/docs/csharp/debugger-settings#_console-terminal-window
Below are example outputs using a standard .NET Console app with some Hello World WriteLine
statements and ending in a ReadLine
Uses the Debug Console in VS Code
{ | |
"name": ".NET 10 SDK", | |
"image": "mcr.microsoft.com/dotnet/nightly/sdk:10.0-preview", | |
"features": { | |
"ghcr.io/devcontainers/features/docker-in-docker:2": {}, | |
"ghcr.io/devcontainers/features/common-utils:2": {}, | |
"ghcr.io/devcontainers/features/powershell:1": { | |
"version": "latest" | |
}, | |
"ghcr.io/azure/azure-dev/azd:0": { |
# Find out what is running on a port | |
# used like `whoport 22112` | |
function whoport | |
{ | |
param | |
( | |
[int] $port | |
) | |
Get-Process -Id (Get-NetTCPConnection -LocalPort $port).OwningProcess | |
} |
{ | |
"name": ".NET 9 SDK", | |
"image": "mcr.microsoft.com/dotnet/sdk:9.0-preview", | |
"features": { | |
"ghcr.io/devcontainers/features/docker-in-docker:2": {}, | |
"ghcr.io/devcontainers/features/common-utils:2": {}, | |
"ghcr.io/devcontainers/features/powershell:1": { | |
"version": "latest" | |
}, | |
"ghcr.io/azure/azure-dev/azd:0": { |
env CHANNEL='development' COMMIT='$( git rev-parse --short HEAD )' DIST_DIR='dist' GO="${GO:-go}" GOAMD64="v1" GOPROXY='https://goproxy.cn|https://proxy.golang.org|direct' GOSUMDB='sum.golang.google.cn' GOTOOLCHAIN='go1.22.4' GPG_KEY='[email protected]' GPG_KEY_PASSPHRASE='not-a-real-password' PATH="${PWD}/bin:$( "${GO:-go}" env GOPATH )/bin:${PATH}" RACE='0' SIGN='1' NEXTAPI='0' VERBOSE="${VERBOSE:-0}" VERSION='v0.0.0' "/bin/sh" ./scripts/make/go-deps.sh | |
: not foundake/go-deps.sh: 2: | |
: not foundake/go-deps.sh: 7: | |
: bad variable nameeps.sh: 9: readonly: verbose | |
make: *** [Makefile:106: go-deps] Error 2 |
This is a brief explainer on the usage rights portion of the C# Dev Kit license terms. This is not the full license and you should read at https://marketplace.visualstudio.com/items/ms-dotnettools.csdevkit/license for the complete legal terms and conditions.
Usage | License Provided | Cost |
---|---|---|
Personal projects | Community | Free |
OSS projects | Community | Free |
Education (student/teacher/researcher) | Community | Free |
Using in a DevBox | Community | Free |
Using in Codespaces | Community | Free |
Business (< $1M Revenue && < 250 users) | Community | Free up to 5 devs |