Skip to content

Instantly share code, notes, and snippets.

View dontpaniclabsgists's full-sized avatar

Don't Panic Labs dontpaniclabsgists

View GitHub Profile
dotnet new console -o hello
dotnet sln add hello/hello.csproj
static void Main(string[] args)
{
  Console.WriteLine($"Hello {args[0]}");
}
{
"name": "Hello",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceRoot}/hello/bin/Debug/netcoreapp2.0/hello.dll",
"args": ["bob"],
"cwd": "${workspaceRoot}/hello",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
dotnet new mvc -o hello2
dotnet sln add hello2/hello2.csproj
{
"version": "0.1.0",
"command": "dotnet",
"isShellCommand": true,
"args": [],
"tasks": [
{
"taskName": "build",
"args": [
"${workspaceRoot}/hello2/hello2.csproj"
{
"name": "Hello2",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceRoot}/hello2/bin/Debug/netcoreapp2.0/hello2.dll",
"args": [],
"cwd": "${workspaceRoot}/hello2",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
public IActionResult Index(string name = "")
{
ViewData["Name"] = name;
return View();
}
<div>
@ViewData["Name"]
</div>