To get the Visual studio editor up

Hi All
I just enrolled myself on the C# course and am following the 1st few lessons.
Mosh says : As an individual, or a student or a small team, you can download Visual Studio Community Edition for free and build your free or paid apps with it. To download Visual Studio Community Edition, please visit: https://www.visualstudio.com/en-us/products/visual-studio-community-vs.asp

so I went ahead and did that (don’t ask the amount of Microsoft-hogwash I had to go through just to get it simply installed !! )-on a side note-I would have appreciated it if Moss had walked us all through the installation as he did on his SQL course to navigate through the bloatware and just press the right menu, submenus and (out of sight)buttons to get the right stuff installed. It would have saved a lot of (new student) aggravation

Finally having installed it, I come to the Mosh chapter: ’ Your First C# Application’
In that clip Mosh shows @ 00:13: File–>New—>Project—>

But when I try to do this on my newly installed V.S ! , I get this : ScreenCapture 13 - YouTube
*pl. chk the small video file to see what I am seeing

I have a complete clue on what MOSH is saying, but I do not have the slightest Clue on what monster of a thing I have got installed here :wink: . Neither can I see the code editor as Mosh has shown, and neither can I fish out the editor myself( which I thought would show up after the solution creation). This V.S is scaring the bejeebers outta me by even saying: not finding what you want !- Install even more tools! !( so that you get completely Lost !)

I can clearly see MOSH’s tutorial is based on an ‘older’ version of the V.S & the One I have installed today does not navigate the way MOSH has shown.
So My noob for the 1st time -simple question to all C# Gurus out there is …How do I get the editor Up ! …what am I doing differently ?
Simply put , I just want this(as MOSH’s course shows)- to write my 1st ‘hello world’ :smirk::

Thanks a Ton (I mean what good is the course, If I can’t even get the editor up) :grimacing:

*Post edit : are there any V.S editor emulators out there, where upcoming students can practice their codes, because right now just installing the Microsoft V.S requires extreme I.T skills in figuring out what bloat needs to be excluded and what thin and relevant client needs to be installed? An emulator for practising & ‘pseudo’ compiling would be a Boon for us beginners, practising @ a home environment.

I have not used C# in a while so at this point you and me are probably in the same boat. Anyways, here is the installation setup Visual Studio Setup. You should be installing the universal windows platform development I believe. I would think that would come with a lot of project templates like console applications and such. It really doesn’t look that bad, just look into the what the components are, and select what you need.

I am pretty sure the C# language itself has morphed a bit since the release of this course too.

Leverage the documentation and tutorials on Learn to code in Visual Studio, and Microsoft Docs.

I am thinking someone else will help reply to this and provide more advice. I hope the references will at least get something going for you. Instead of looking at this as a disadvantage, take it as a opportunity to get to know the ecosystem you are about to enter.

1 Like

Takeaway

  • Downloading and installing VS is not that difficult
  • A blank solution has no project. You still need to create one
  • Should you pick the modern console apps, check the box to avoid top-level statements for the course.

Hi,

Downloading and Installing VS Community isn’t that much difficult.

You have to understand it broadly goes with workloads. Mostly it is a set of tools aiming at a specific outcome. You have a workload for different things such as desktop apps, web apps, mobile apps, database tools, game development, you name it…

Just pick what you want/need.

The UI has evolved and also some defaults may change.

Text in italics are anecdotes. You can leave’em.

I remember I got owned on the ASP course because at the time Mosh did the course the default was to add Identity by default so he didn’t even mention (or I overlooked it maybe) and then came the time to use identity. In the course everything goes smooth. I had some fun looking for a solution. On stack overflow I had crazy solutions that worked but it was fiddling. I later learnt there is a wizard to help. Found info that people regret it does not exist anymore. Eventually I found a way to it. Simply in the project context menu.

What you have created in your video is a blank solution.

A solution is capable to gather several projects. This is handy for multi layered applications for instance. When projects are under the same solution, it is easy to reference them when needed.
It can simply be an asset for organising several projects too.

You still need to create a project. :wink:

There are 2 templates. One for the current .NET framework and the old .NET Framework.

image

I would suggest you go with the newest one. There will also be a major difference that may confuse you. Since .NET 6 there is a cool feature called top-level statement. Basically what you input in the file is what you would have put inside of the Main method.
If you prefer you can check not to use them. Maybe as a beginner go checking that box so that it reflects what you’ll meet in the course.

I checked the box and here we are.

image

Without checking this is what you’ll get. Play around with this outside the course

image

When you create a specific kind of project, you likely end-up with that project wrapped into a solution anyway.

So better create a console application (pr any other kind) right from the get-go.
You also need to select the framework but I’d say leave the defaults.
Likely .NET 6 at least by now.

I did not code in C# for a few months now for I am busy with other stuff but I may go back to .NET pretty soon. I am excited. :slight_smile:

On thing that often happens is you’ll want to try something real quick and create a method just next to the main method. Very likely it will happen in the course (but I can’t tell cause I didn’t learn C# with Mosh).

would look like this

namespace ConsoleApp1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            SomeMethodForMain();
        }

        public static void SomeMethodForMain()
        {
            Console.WriteLine("I can haz external code anyways.");
        }
    }
}

With top-level statements, because you are writting pretty much like it would be the body of the main method, you just can’t write the method in there.

image

You’d need to write the code elsewhere.

Hope this helps you get started.

Regards.

1 Like

UniqueNospaceShort, I will revert to each line you wrote , back .
but I am a bit overwhelmed with this right now , this is my very 1st exp. with this If you realise.
itmt, I did the same you have shown above, and I see this,

or this

This is freaking me out a bit, I do not see at all that I get prompted ’ for the current .NET framework and the old .NET Framework’ at all. …and the ‘next’ button is also greyed out.
It ‘seems’ I am missing the templates. what would have prompted this ? or what else do I need to install on top of already what I have , or is there totally something else going on here :face_in_clouds: ?

I would like to take this step by step (if I may) , at present pl.

Can you check which workloads are installed ?

Start Visual Studio Installer

Click on modify

On the dialog that appears there will be a list of selected /installed items.

On my PC it looks like this.

image

I believe console applications are under the .NET desktop environment.

It is indeed possible the templates alone are not installed. There were such problems on the beta version with .NET MAUI templates. Maybe you faced something similar.

Can you also try something else

Is the dotnet command available in you command prompt / powershell ?

try these commands
dotnet --version

dotnet new list or dotnet new list console

Issue is resolved now, and many thanks : UniqueNospaceShort
I will redit this reply very shortly, but for the time, it’s a Full-Go :grin:

Post Edit: ( for the records)
so what was I actually missing when I initially logged the issue :slight_smile:

  1. This---->: ’ I remember I got owned on the ASP course because at the time Mosh did the course the default was to add Identity by default so he didn’t even mention

I went ahead and installed this (just with a Gut feeling & nothing more!)

  1. and this : ‘Maybe as a beginner go checking that box so that it reflects what you’ll meet in the course.

And from here I was game ( at least so far)
The rest of the information is ‘nice’ but is not geared for a rookie who has just started with the course & also installing ‘V.S’ the very 1-st time. I mean Mosh tells prior to his course : No prior knowledge is needed,
quote : * Anyone who wants to learn programming for the first time. unquote

Mosh should have mentioned a few more lines on how to get the V.S working , at least just for the course’s sake, rather than just stating a URL & suggesting to ‘seek out the rest’.
These kind of installation issues(in real life) are done by the system-admin and we do not have an exact idea because it does not belong to our daily tasks. For example , it’s just like asking a seasoned SAP Logistic or Finance consultant to install & config. SAP on a clean machine, I’m pretty sure that person will have some vague idea about it , but can never fulfil the task alone( with 1 install url).(exceptions barred)

anyway, as I mentioned, the above two points helped me wade out through my first swamp, I hope the course goes smoothly from here without too many of the ‘swamp things’ :crazy_face:
And did I say : Many Thanks UniqueNospaceShort !

How to Install MySQL Latest Version 8.0.36 for Windows 10/11 -This video will guide you through installing the latest version of MySQL 8.0.36 Server on a Windows 11 operating system.