Skip to content

Commit

Permalink
Update W5 D5 program
Browse files Browse the repository at this point in the history
  • Loading branch information
cvpfus committed Oct 6, 2023
1 parent 15a0450 commit afa84c3
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/W5 D4/CancellationToken/bin/Debug/net7.0/CancellationToken.dll",
"args": [],
"cwd": "${workspaceFolder}/W5 D4/CancellationToken",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/FormulatrixBootcamp.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/FormulatrixBootcamp.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary;ForceNoAlign"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/FormulatrixBootcamp.sln"
],
"problemMatcher": "$msCompile"
}
]
}
9 changes: 9 additions & 0 deletions FormulatrixBootcamp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "W5 D4", "W5 D4", "{5637E846
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CancellationToken", "W5 D4\CancellationToken\CancellationToken.csproj", "{09D51696-9994-41B5-9959-9DFD1B331B02}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "W5 D5", "W5 D5", "{A966AD2E-80DB-49E0-8070-B6DFE0C1E36D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PreprocessingDirectives", "W5 D5\PreprocessingDirectives\PreprocessingDirectives.csproj", "{0AA3960D-7152-4FEE-B125-3C1E18FBE395}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -375,11 +379,16 @@ Global
{09D51696-9994-41B5-9959-9DFD1B331B02}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09D51696-9994-41B5-9959-9DFD1B331B02}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09D51696-9994-41B5-9959-9DFD1B331B02}.Release|Any CPU.Build.0 = Release|Any CPU
{0AA3960D-7152-4FEE-B125-3C1E18FBE395}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0AA3960D-7152-4FEE-B125-3C1E18FBE395}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0AA3960D-7152-4FEE-B125-3C1E18FBE395}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0AA3960D-7152-4FEE-B125-3C1E18FBE395}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{0AA3960D-7152-4FEE-B125-3C1E18FBE395} = {A966AD2E-80DB-49E0-8070-B6DFE0C1E36D}
{09D51696-9994-41B5-9959-9DFD1B331B02} = {5637E846-0989-4572-83A1-6CBC066E2D2D}
{CCE2C0C8-CD08-44DA-AD87-32848B8B64A7} = {FC559EAF-E754-4775-A039-64B804F331A8}
{C71461E0-7028-4153-94DC-75B522D07B10} = {FC559EAF-E754-4775-A039-64B804F331A8}
Expand Down
10 changes: 10 additions & 0 deletions W5 D5/PreprocessingDirectives/PreprocessingDirectives.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
16 changes: 16 additions & 0 deletions W5 D5/PreprocessingDirectives/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#define DEVELOPMENT
public class Program
{
static void Main()
{
#if PRODUCTION
Console.WriteLine("Production");
#error "Error"
#elif DEVELOPMENT
Console.WriteLine("Development");
#warning "Warning"
#elif DEBUG
Console.WriteLine("Debug");
#endif
}
}

0 comments on commit afa84c3

Please sign in to comment.