Uploaded June 2019 | Updated November 2026, 1 hour ago
How do you start a new .NET Core project from the command line? How do you learn how to use the commands and figure out what is available for you? In this video we're going to take a look at some of the basics of working with .NET Core on the command line. We'll be using Powershell in this video, but these same things should apply in a Command Prompt window or Linux Terminal.
The goal of this video is to create a brand new .NET Core project without using any tools other than the .NET Core CLI (the `dotnet` command). We'll explore how to get help with this command and others in Powershell/Bash/CMD so we can learn the expected parameters and the potential values we can provide to the commands we'll be using. For the majority of this video we'll be working with `dotnet new` and `dotnet run`. These commands will create a new dotnet project or build and run a dotnet project respectively. Both can take a number of parameters to specify a bit more closely what you want to do.
### Some useful commands:
* `dotnet --help`: Learn the available commands for your version of .Net. Another command to accomplish the same thing when using powershell is `dotnet -?`.
* `dotnet new --help`: Learn how to create a new .Net project
* `dotnet new console`: Create a new .Net console project
* `dotnet run`: Run the dotnet project in the current directory
More information on .NET Core is available here: docs.microsoft.com/en-us/dotnet/core
Scott Hanselman has a fantastic post about the new Terminal for Windows. Check it out to learn more: hanselman.com/blog/ANewConsoleForWindowsItsTheOpenSourceWindowsTerminal.aspx
Join the World of Zero Discord Server: discord.gg/hU5Kq2u
How do you start a new .NET Core project from the command line? How do you learn how to use the commands and figure out what is available for you? In this video we're going to take a look at some of the basics of working with .NET Core on the command line. We'll be using Powershell in this video, but these same things should apply in a Command Prompt window or Linux Terminal.
The goal of this video is to create a brand new .NET Core project without using any tools other than the .NET Core CLI (the `dotnet` command). We'll explore how to get help with this command and others in Powershell/Bash/CMD so we can learn the expected parameters and the potential values we can provide to the commands we'll be using. For the majority of this video we'll be working with `dotnet new` and `dotnet run`. These commands will create a new dotnet project or build and run a dotnet project respectively. Both can take a number of parameters to specify a bit more closely what you want to do.
### Some useful commands:
* `dotnet --help`: Learn the available commands for your version of .Net. Another command to accomplish the same thing when using powershell is `dotnet -?`.
* `dotnet new --help`: Learn how to create a new .Net project
* `dotnet new console`: Create a new .Net console project
* `dotnet run`: Run the dotnet project in the current directory
More information on .NET Core is available here: docs.microsoft.com/en-us/dotnet/core
Scott Hanselman has a fantastic post about the new Terminal for Windows. Check it out to learn more: hanselman.com/blog/ANewConsoleForWindowsItsTheOpenSourceWindowsTerminal.aspx
Join the World of Zero Discord Server: discord.gg/hU5Kq2u
).GetAwaiter().GetResult();
```
Find a `Camera` object in the current scene:
```csharp
cameraObject = await CSharpScript.EvaluateAsync[GameObject](GameObject.FindObjectsOfType[Camera]().First().gameObject,
ScriptOptions.Default.WithImports( // Import namespaces to simplify scripts
System,
System.Collections.Generic,
System.Linq,
UnityEngine
).AddReferences( // Include additional assemblies
typeof(System.Linq.Enumerable).Assembly,
typeof(UnityEngine.Transform).Assembly
));
```
The Roslyn Scripting API is documented on GitHub: https://github.com/dotnet/roslyn/wiki/Scripting-API-Samples
You can find the Nuget package here: https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp.Scripting/
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Runtime C# Scripting - Embedding the .NET Roslyn Compiler in Unity](https://i.ytimg.com/vi/YtzYkoWhrTk/mqdefault.jpg)

 and [Nuget](https://www.nuget.org/packages/TrieNet/). You can find more documentation and learn about its other features here: https://github.com/gmamaladze/trienet
If you want to learn more about how Tries work as a data structure you can learn more about that on Wikipedia: https://en.wikipedia.org/wiki/Trie
If youre interested in how to build a `Trie` from scratch weve done that in an earlier video you can find here: https://www.youtube.com/watch?v=4nmVXKu6e_Q
For more information about the Mermaid diagrams I use at the start of this video, check out [my video on Mermaid JS](https://www.youtube.com/watch?v=7_2IroEs6Is). Recently support for these diagrams was even [added to GitHub](https://docs.github.com/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams).
***
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Trie, Trie Again - A String Search Data Structure](https://i.ytimg.com/vi/ZgZXW_V-2lo/mqdefault.jpg)



![Using PowerShell to Create a Symbolic Link on Windows
Symbolic Links allow you to create a reference in your file system to another file or directory. This allows you to reference the same file in multiple places without having to physically copy it into each place. This can save storage space and also allows a single change to the file to be seen by every location that links to it as well.
In this video well be taking a look at how to create these Symbolic Links from PowerShell using a version of the `New-Item` commandlet. In order to take advantage of this youll need to be running in an Administrator PowerShell or you may see the New-Item : Administrator privilege required for this operation error. This solution is able to create symbolic links between files or directories and also will detect if the target item you are creating the link to exists or not before generating the link.
In order to create the symlink in PowerShell youll run this command:
```ps1
New-Item -ItemType SymbolicLink -Path [path] -Target [target]
```
This will create a new Item at the provided path that represents a link to the target file or directory.
If you prefer Command Prompt you can learn how to make a symbolic link in Command Prompt here: https://youtu.be/w2gxWTOPw7U
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Using PowerShell to Create a Symbolic Link on Windows](https://i.ytimg.com/vi/_VnONfOgP8M/mqdefault.jpg)


.
When used in a function or property which returns an `IEnumerable`, yield will provide two features. You may `return` the next value in the set or `break` out of the loop - effectively terminating the set. Values `return`ed from a `yield` keyword are composed into the enumerable set as your code evaluates. Yield statements are evaluated lazily (meaning the function generating the enumerable object is not generated completely before the first element is returned), this means that after returning with `yield` the code in the function will continue from the point it returned from including preserving the state (such as local variable values).
Using these concepts we can create a function which returns all positive integers between 1 and a max value.
```csharp
// Note: youll need to replace the IEnumerable˂int˃ with correct syntax as well as the ˃= symbol
public static IEnumerable˂int˃ PositiveInts(int max) {
int i = 1;
while(true) {
yield return i++;
if (i ˃= max) {
yield break;
}
}
}
```
* `yield return`: returns the next value in an `IEnumerable`.
* `yield break`: marks the end of the `IEnumerable`.
More information about using `yield` with some other examples is available here: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/yield
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Using C#s Yield Keyword](https://i.ytimg.com/vi/bsZjfuTrPSA/mqdefault.jpg)
