none
vs2010 switch from VB to C# and back again RRS feed

  • Question


  • I have a general question about the correct way to switch programming languages in Visual Studio 2010.

    I've been programming in Visual Basic. I wanted to start a project in Visual C#. To do this I did the following in VS 2010:
     Tools > Import and Export Settings > Reset All Settings >  Next.
     I saved my current settings (i.e. the VB settings)to the   default Folder and File
     Then in "Choose a Default Collection of Setings I chose   C# Development Settings.

    So, I'm now set up to program in C#.

    My question is, What is the best way to switch the programming language back to Visual Basic? Or, more generally, what is the correct way to switch back-and-forth between the two languages?
    Do I go through this same procedure each time(i.e. Tools > Import and Export Settings > Reset All Settings, thus saving my C# settings,etc) or do I instead click the radio button to "Import Selected Environmental Settings" to import the VB setttings saved above? If I do the latter procedure, will the IDE be VB and will I be able to save the C# Settings so I can return to programming in C# when I want to?

    Also, I see that "Recent Projects" on the Start Page lists both VB and C# projects. Is this a "shortcut" so that if I launch a project from that list VS will open the appropriate IDE?

    This is a really basic question, I know, but I'm relatively new at this and I want to get it right.

    Thanks for any advice.

     

    Tuesday, June 12, 2012 4:40 PM

Answers

  • I'm not sure why you need to save your settings and 'reset' your settings.

    You can program C# and VB using the same settings. Are there some differences that cause problems in C# versus VB? While I don't do a lot of C# programming, I've never had an issue.

    I believe the 'settings' are just IDE preferences - the same IDE is used for both languages. The reason there may be different settings for VB and C# is in the default shortcuts and 'styling' that VBers and C-Style programmers are used to. I may be wrong on this since I guess I use the VBer settings for everything.


    Stephen J Whiteley

    Wednesday, June 13, 2012 1:56 PM
    Moderator
  • You know.... I'd do it with different projects for VB and C#.

    Renee


    "MODERN PROGRAMMING is deficient in elementary ways BECAUSE of problems INTRODUCED by MODERN PROGRAMMING." Me

    • Marked as answer by jcirish Wednesday, June 13, 2012 8:11 PM
    Wednesday, June 13, 2012 3:30 PM
  • Like SJ said, its mostly just IDE stuff - is the toolbox on the left or right by default?  There is no right or wrong answer and any of the template settings will work with any language that you have installed.  I think its mostly that MS tried to make you feel comfortable in VS by creating a layout similar to what each language developer might expect based on the layout of the editor(s) they used prior to VS.

    If you are working with VS Pro or higher then you can make any project in any language and the settings of the IDE don't matter.  The VS Express editions are restricted to a single language or technology and so each is its own IDE with potentially its own settings.

    Like SJ, I have a VB settings template applied but create VB, C#, ASP, etc. applications all from the same IDE and all without modifying any settings.


    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    • Marked as answer by jcirish Wednesday, June 13, 2012 8:10 PM
    Wednesday, June 13, 2012 4:21 PM
    Moderator

All replies

  • Use the general settings. 

    The VB settings have already 7 versions the same name while it where in fact the VB6 settings.

    I use already since those 10 (6 versions and with VB10sp1 even 7) years the general settings and use both program languages all documentation (including VB) are based on those and not the VB6 ones.


    Success
    Cor



    Tuesday, June 12, 2012 4:44 PM
  • I'm not sure why you need to save your settings and 'reset' your settings.

    You can program C# and VB using the same settings. Are there some differences that cause problems in C# versus VB? While I don't do a lot of C# programming, I've never had an issue.

    I believe the 'settings' are just IDE preferences - the same IDE is used for both languages. The reason there may be different settings for VB and C# is in the default shortcuts and 'styling' that VBers and C-Style programmers are used to. I may be wrong on this since I guess I use the VBer settings for everything.


    Stephen J Whiteley

    Wednesday, June 13, 2012 1:56 PM
    Moderator
  • Hi, Stephen,

    Thanks so much for the reply. I guess I'm confused about what is involved in "setttings." I don' t generally use any but the default settings. My real point of uncertainty is what is the best way to go from, say, working on a project in VB to working on another project in C#. If both projects are existing projects can I just open each as I need to and then will the IDE automatically open in the correct programming language? And, if I want to start an new VB project while working in C# should I then import my saved VB settings before starting the new project?

    Thanks for the continued help

    jcirish

    Wednesday, June 13, 2012 2:57 PM
  • Hi, Stephen,

    Thanks so much for the reply. I guess I'm confused about what is involved in "setttings." I don' t generally use any but the default settings. My real point of uncertainty is what is the best way to go from, say, working on a project in VB to working on another project in C#. If both projects are existing projects can I just open each as I need to and then will the IDE automatically open in the correct programming language? And, if I want to start an new VB project while working in C# should I then import my saved VB settings before starting the new project?

    Thanks for the continued help

    jcirish

    That I wrote

    Be aware that visual studio handles solutions, you can even handle in one solution a managed C++, a VB, a C# and a F# project, however, don't then be a dummy and use the VB6 settings but use the general settings. Be aware you can use the VB6 settings for all those projects, but the documentation is then not like you would expect.


    Success
    Cor




    Wednesday, June 13, 2012 3:04 PM
  • You know.... I'd do it with different projects for VB and C#.

    Renee


    "MODERN PROGRAMMING is deficient in elementary ways BECAUSE of problems INTRODUCED by MODERN PROGRAMMING." Me

    • Marked as answer by jcirish Wednesday, June 13, 2012 8:11 PM
    Wednesday, June 13, 2012 3:30 PM
  • Like SJ said, its mostly just IDE stuff - is the toolbox on the left or right by default?  There is no right or wrong answer and any of the template settings will work with any language that you have installed.  I think its mostly that MS tried to make you feel comfortable in VS by creating a layout similar to what each language developer might expect based on the layout of the editor(s) they used prior to VS.

    If you are working with VS Pro or higher then you can make any project in any language and the settings of the IDE don't matter.  The VS Express editions are restricted to a single language or technology and so each is its own IDE with potentially its own settings.

    Like SJ, I have a VB settings template applied but create VB, C#, ASP, etc. applications all from the same IDE and all without modifying any settings.


    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    • Marked as answer by jcirish Wednesday, June 13, 2012 8:10 PM
    Wednesday, June 13, 2012 4:21 PM
    Moderator
  • Thanks much, Reed,SJ,Renee and all for the help. You've fixed me up. I appreciate it.

    jcirish

    Wednesday, June 13, 2012 8:10 PM