diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..698e24b --- /dev/null +++ b/.vscode/launch.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..65b475a --- /dev/null +++ b/.vscode/tasks.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/FormulatrixBootcamp.sln b/FormulatrixBootcamp.sln index 1ce6123..2c82e00 100644 --- a/FormulatrixBootcamp.sln +++ b/FormulatrixBootcamp.sln @@ -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 @@ -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} diff --git a/W5 D5/PreprocessingDirectives/PreprocessingDirectives.csproj b/W5 D5/PreprocessingDirectives/PreprocessingDirectives.csproj new file mode 100644 index 0000000..f02677b --- /dev/null +++ b/W5 D5/PreprocessingDirectives/PreprocessingDirectives.csproj @@ -0,0 +1,10 @@ + + + + Exe + net7.0 + enable + enable + + + diff --git a/W5 D5/PreprocessingDirectives/Program.cs b/W5 D5/PreprocessingDirectives/Program.cs new file mode 100644 index 0000000..018427a --- /dev/null +++ b/W5 D5/PreprocessingDirectives/Program.cs @@ -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 + } +} \ No newline at end of file