Author Topic: C# and Visual Studio Community  (Read 1705 times)

0 Members and 1 Guest are viewing this topic.

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 548
  • Country: gb
C# and Visual Studio Community
« on: June 05, 2020, 04:21:31 pm »
My training manual (for PICs) is saying that I should download "Visual Studio Community" in order to use C#.

I have been recommended this before but have not yet looked at it.

May I ask a few questions:
1. Is it safe, I mean in terms of general Internet security (I hate downloading stuff I don't understand)?
2. Do I have to have a Microsoft account and if so what does this entail, i.e. does it constrain me in anyway?
3. Does it download a lot of stuff or can I just have C# (I can't use cloud versions of stuff as my Internet connection is slow and dodgy)?

Thank you.
You can release yourself but the only way to go is down!
RJD
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: C# and Visual Studio Community
« Reply #1 on: June 05, 2020, 04:36:31 pm »
1)yes
2)yes :(
3)no, you can only download C# but be careful of the boxes that are ticked before starting download.

What are you doing with PICs that require C#? I suppose GUIs for programs..
Which training manual is it?
 

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 548
  • Country: gb
Re: C# and Visual Studio Community
« Reply #2 on: June 06, 2020, 09:27:55 am »
Cheers.

It's a series of four manuals and a programmer, etc. by Peter Brunning. I am on book 3 and I think C# is used for serial comms with the PC somehow.
You can release yourself but the only way to go is down!
RJD
 

Offline Lindley

  • Regular Contributor
  • *
  • Posts: 195
  • Country: gb
Re: C# and Visual Studio Community
« Reply #3 on: June 06, 2020, 10:13:47 am »
Hi,

C# is needed to allow you to create code for the PC to communicate with the Pics.
"Experimenting with Serial Communications teaches Visual C# programming for the PC (not PIC) so that we can create PC programmes to control PIC circuits."

It could be very useful to learn as so many micros now talk to the PC via serial or wifi/bt.

You need to have or create a Microsoft account, (if you do not already have one to log on to Windows?) as Visual Studio is Microsofts property.

Not often you see folk using these older style Pic training boards these days,  not cheap at that price, though not saying its in any way a bad course.

Many will say you should not bother with Pics or Assembly code, but we started with them and its a great way to really understand how they work, and fun !  ;D
 

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 548
  • Country: gb
Re: C# and Visual Studio Community
« Reply #4 on: June 07, 2020, 10:29:05 am »
Thank you.

I have downloaded Visual Studio Community and signed-up for the Microsoft Account.

I selected "create a new project" then went through the menus first selecting “C#” under “All languages”.

Then there is, “All platforms” with options:
Android
Azure
iOS
Linux
macOS
tvOS
Windows
Xbox

I selected “Windows” as I'm using Windows(!)

Then there is, “All project types” with options:
Cloud
console
desktop
extensions
games
IOT
library
machine learning
mobile
office
other
service
test
UWP
Web

But whichever one of these I selected I had nothing to click on and “Next” was greyed out.

Is it to do with what I downloaded under Visual Studio? I only downloaded:

Compiler, build tools, and runtimes:
C# and Visual Basic Roslyn compilers

Development activities:
C# and Visual Basic

There is another thing I noticed called, “.NET desktop development” (screen capture attached). Is this what I should download?
You can release yourself but the only way to go is down!
RJD
 

Offline Mr Evil

  • Regular Contributor
  • *
  • Posts: 76
  • Country: gb
    • mrevil.asvachin.com
Re: C# and Visual Studio Community
« Reply #5 on: June 07, 2020, 04:02:18 pm »
2. Do I have to have a Microsoft account and if so what does this entail, i.e. does it constrain me in anyway?
Despite what previous posters have said, you don't need a Microsoft account. I'm using Visual Studio Community right now without one, on an installation of Windows that only has a local acocunt.

There is another thing I noticed called, “.NET desktop development” (screen capture attached). Is this what I should download?
If you want to write an application that runs on Windows, whether a console app or with a GUI, then that is the one you want.

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: C# and Visual Studio Community
« Reply #6 on: June 07, 2020, 05:57:52 pm »
really? i had to make one otherwise community would stop working after 30 days
 

Offline Mr Evil

  • Regular Contributor
  • *
  • Posts: 76
  • Country: gb
    • mrevil.asvachin.com
Re: C# and Visual Studio Community
« Reply #7 on: June 07, 2020, 07:17:23 pm »
really? i had to make one otherwise community would stop working after 30 days
You're right. I forgot about the 30 day thing as I usually install VS on a fresh VM when I need it, so I rarely pass the limit. On the one machine where it's permanantly installed, I had to sign in with an account.

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4034
  • Country: nz
Re: C# and Visual Studio Community
« Reply #8 on: June 07, 2020, 11:30:25 pm »
If the course you're following uses C# then life will be more straightforward if you get that, but be aware that if all you want to do is write programs to communicate with a microcontroller via a serial port (USB serial these) days then you can do that with a shell script / batch file, python or any other programming language that allows you to open and read/write "files".
 

Online PlainName

  • Super Contributor
  • ***
  • Posts: 6842
  • Country: va
Re: C# and Visual Studio Community
« Reply #9 on: June 08, 2020, 12:19:13 pm »
There is an alternative IDE to the Microsoft thing:

https://sourceforge.net/projects/sharpdevelop/

Don't know how good it is and it seems to have just gone into hibernation, but you don't need a Microsoft account.

 

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 548
  • Country: gb
Re: C# and Visual Studio Community
« Reply #10 on: June 08, 2020, 05:21:12 pm »
Cheers all.

I've plumped for VS and have taken out an MS account.  :palm:

It seems to be going well though my ancient laptop struggles a bit. :=\
You can release yourself but the only way to go is down!
RJD
 

Offline Lindley

  • Regular Contributor
  • *
  • Posts: 195
  • Country: gb
Re: C# and Visual Studio Community
« Reply #11 on: June 09, 2020, 08:21:09 am »
Though the OP is using C# for the course they are doing,  is C# the best  /easiest  code to start with ?

Looking to do this ourselves, but wonder if Visual Basic or C## might be easier to start with, seems plenty of ytubes tutorial  on Basic ?
 

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 548
  • Country: gb
Re: C# and Visual Studio Community
« Reply #12 on: June 09, 2020, 08:45:48 am »
Maybe but my “training manuals” use it so ...

In fact, I seem to be getting on quite well with it and it seems a logical progression from C.
You can release yourself but the only way to go is down!
RJD
 

Online bd139

  • Super Contributor
  • ***
  • Posts: 23021
  • Country: gb
Re: C# and Visual Studio Community
« Reply #13 on: June 09, 2020, 09:36:06 am »
Use C#. Every time they release another .Net / Core version they try and kill Visual Basic. One day they will succeed.

Keep going with C#. It's productive, the tools are decent and it'll serve you well. I've been using it for 17 years now. The main product I work on is ~ 3 million lines of it (that's after stripping comments and whitespace)

The only thing is it's a pretty wild ride. Lots of things get smashed and deprecated. Look at targeting .Net 5 rather than older versions if you can.

On original questions:

1. It is perfectly safe to download.
2. the Microsoft account is used just to check you are not a business user signing in and using community for nothing.
3. You can just take C# and the IDE. You might want to install the web / desktop app tooling as well for convenience.

If you're not happy signing up for an MS account you can use VScode which is a total reimplementation of Visual Studio from here: https://code.visualstudio.com/

This is somewhat newer and less powerful than traditional visual studio for C# but an excellent general purpose IDE (I use it for most things TBH)
« Last Edit: June 09, 2020, 09:39:25 am by bd139 »
 
The following users thanked this post: PerranOak

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: C# and Visual Studio Community
« Reply #14 on: June 09, 2020, 11:24:20 am »
Maybe but my “training manuals” use it so ...
which is the reason why i didn't suggest alternatives before.

I do not use C# anymore, because i want to keep thinking like i'm doing C (to paraphrase someone who had very good points in the "why are you still using C thread") so i put more effort and started using C++ and Qt (a good starting book IMHO is the beaglebone black book by derek molloy, helped me way more than any other tutorial to get started in QT

But i digress. Use C#, Make sure the examples are working and start from there to make your own thing. :)
 
The following users thanked this post: PerranOak


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf