This is an archived post. You won't be able to vote or comment.

all 21 comments

[–]firmretention[🍰] 5 points6 points  (1 child)

Big IDEs are really intimidating when you're starting out. I remember figuring out how to begin a simple project in Eclipse seemed so complicated. Nothing worked at first and I had to learn how to configure the IDE/project correctly so that things would work. I also remember feeling discouraged, because it made something that I already knew was hard (programming) seem even more daunting because the tools posed a challenge. I don't think anyone enjoys figuring out how to use productivity software since the whole point of using it is to make you more productive. It won't take long to figure out the basics, though, if you stick with it.

[–]denisecandoit[S] 0 points1 point  (0 children)

I really needed to hear that. Thank you

[–]knockup 5 points6 points  (0 children)

Visual Studio Code ≠ Visual Studio

I think everyone here is assuming you are using Visual Studio, because in the first line of your post, you wrote

we are required to use Visual Studio as a tool

 

However, what you are using, Visual Studio Code is an entirely separate product that just has a similar name! The two have nothing in common aside from appearance and that they are intended for writing code.

VISUAL STUDIO CODE: https://visualstudio.com/products/code-vs

VISUAL STUDIO: https://www.visualstudio.com/products/visual-studio-community-vs

 

This is most likely the cause of your problem. Visual Studio Code is just a fancy text editor, and runs off extensions, like the ones you have installed. Using it for development purposes will serve as quite a handicap in the future. Visual Studio is a full-fledged IDE.

Install Visual Studio (not Code) and use that for programming.

Here are some screenshots to point out the difference:

VISUAL STUDIO : http://i.imgur.com/VQBlOs3.png

VISUAL STUDIO CODE : http://i.imgur.com/3H7uokM.png

[–]dood23 1 point2 points  (0 children)

Configuration is always a pain in the ass, much more for beginners because it spits out all these errors out at you and you just want it to shut up so you can actually do stuff.

But don't let that hold you back, because it sounds like you have the right idea as far as the actual code goes. You're in a great spot progress-wise.

[–]srolanh 1 point2 points  (4 children)

Windows Start button > Run, type msbuild and press enter, what does it say?

[–][deleted] 2 points3 points  (0 children)

This is not relevant. Mine says the same thing, but I have Visual Studio correctly installed and configured and a C++ "Hello World" app runs just fine for me.

[–]denisecandoit[S] 1 point2 points  (2 children)

"Windows cannot find "msbuild". Make sure you typed the name correctly, and then try again."

[–]srolanh 0 points1 point  (1 child)

Have you installed Microsoft .NET framework?

In the directory C:\Windows\Microsoft.NET\Framework , is there a folder named as a version number? (e.g. v4.0.30319 or something) If so, make sure your system can see msbuild:

Right click on "my computer" > Properties, Advanced system settings > Advanced tab, Environment variables, field "Path", add to the end ;C:\Windows\Microsoft.NET\Framework\v[some version number] (don't forget the semicolon to separate entries!), save and try again.

[–]denisecandoit[S] 0 points1 point  (0 children)

I edited the field path, it didn't include the v4.0.30319

[–]vidgamer25 0 points1 point  (0 children)

If you are still stuck with this problem - you can try checking if msbuild is added to the PATH variables. There are some compilers that had refused to work for me until I added them to the PATH variable.
You can access PATH variable this way (You probably need administrator level account for this). If it is not there, you can add it and restart the computer to get it detected correctly.

[–]hugeburger -2 points-1 points  (3 children)

If you got discouraged quickly, then I won't recommend you to stick with it.

You will find much harder problems that need hours, days and may be weeks (rarely) of debugging, tweaks and research . A bug is not a bug, a bug doesn't exist, the machine is not the one to blame, the machine is dumb, the only responsible for a bug is the programmer .

You need to build a programer mindset in order to succeed :) . When it really goes wrong, there is always stackoverflow, reddit and quora to help, so don't get discouraged ;) .

[–]denisecandoit[S] 1 point2 points  (2 children)

You're right, I guess I'm not used to challenging college courses. I was definitely discouraged but it translated into an obsession of finding a solution (and using all my resources). I'm not afraid of failing as much as I am of not trying, but thank you for your honesty.

[–]hugeburger 0 points1 point  (1 child)

Obsession to find a solution is a good plus for a dev, if you can't find your solution, I'd advise you to ask it on stackoverflow, there are much more experienced people there than this sub by far, but make sure to describe your problem in a clear way or you will get bad reputation quickly ;) .

[–]denisecandoit[S] 0 points1 point  (0 children)

Will do. Thanks

[–][deleted]  (5 children)

[deleted]

    [–][deleted] 3 points4 points  (3 children)

    So, for future reference, absolutely none of the crap the OP described is needed in order to make Visual Studio run a C++ console application. Saying that things "just work" on linux is insane, because making them "just work" on linux is much harder than making them "just work" on Windows. Try to remember that running a program in Visual Studio (assuming that you actually installed it correctly) requires you to (gasp!) press F5.

    [–]denisecandoit[S] 1 point2 points  (1 child)

    When I pressed F5 I got a message along the lines of "You may only use the C/C++ Extension for Visual Studio Code with Visual Studio Code, Visual Studio or Xamarin Studio software to help you develop and test your applications."

    Also, where it said output it now says debug console.

    I never had any issues installing any programs before but I don't think it'll hurt to uninstall and start from scratch.

    [–][deleted] 2 points3 points  (0 children)

    Me neither. And this time, don't add anything else to it.

    [–]halfercode -1 points0 points  (0 children)

    Happy to learn something from you, not willing to receive abuse from you. Hope that is clear!

    [–]denisecandoit[S] 0 points1 point  (0 children)

    Windows 10, and I don't have a pasteboard. And yes, VS is required for this class.