Is Visual Studio written in Windows Forms? - visual-studio

Is Visual Studio written in .NET Windows Forms? Or is Windows Forms just too slow for a editor type application?

This isn't quite a fair question. :)
Visual Studio .NET (devenv.exe) is not written directly in WinForms, as it is not a CLR executable. (My hunch is that it is still produced with Visual C++.) I know for fact that neither 2005 nor 2008 versions of devenv.exe carry a CLR header. (I just dropped them both on ILDASM; they're definitely not managed code.)
That said, just because devenv.exe isn't written in WinForms doesn't mean WinForms is too slow for an editor. WinForms isn't, on most systems, too slow at all -- our app code will be the bottleneck before the framework is.
My hunch is that devenv.exe is written in C/C++ due to it being an upgrade of a long-standing environment; the cost to Microsoft to rewrite it in .NET is undoubtedly prohibitive.
Again, as far as WinForms speed is concerned -- there are quite a few WinForms apps which have no performance issues whatsoever, including a fairly robust .NET IDE (SharpDevelop).

Apparently VS 2010 has parts written in WPF.

SharpDevelop is a .NET Windows Forms application.

This sounds a bit like a "Are you still beating your wife?" question with no answer that sounds good from Visual Studio's point of view.
No, Visual Studio (at least up to 2008) is not written using .NET. However, SharpDevelop and other editors are and do not suffer from speed problems necessarily.

At its core VS is still an unmanaged executable, so it doesn't use winforms. There may be portions written in .NET particularly around some of the newer features, but the core extensibility model is COM based (and very complex...)

If the VS team didn't use WinForms, you're suggesting that the only possible reason would be that WinForms is too slow. That's not valid. The fact that SharpDevelop's IDE is written in WinForms and performs fine shows that it isn't "too slow," regardless of what Visual Studio's IDE uses.

This is kind of two questions in one. As others have mentioned, Visual Studio does not use WinForms. Your other question has nothing to do with the first, as a) Visual Studio isn't an "editor," it's an IDE and b) it's begging the question.
That said, WinForms is an excellent choice for any Windows-based application, including an IDE (like the aforementioned SharpDevelop) and any "editor" you can imagine, up to and including audio and video. So no, it's not "too slow" for an "editor type application."
You are free, of course, to write slow code that runs in a Windows Forms application. :)

Based on my experience with the VS SDK, it looks as if it was built with C++/COM but I think that's just because the Visual Studio team decided to go with that (AND Windows Forms didn't exist as a release version when they were first developing the VS.NET IDE).
You can use Windows Forms for an editor type application. I think SharpDevelop is a WinForms app.

Related

Creating a Visual Basic 6 project from existing code in Visual Studio 2022 results in millions of compilation errors

Trying to do this on Windows 10.
I have a VB6 folder and I'm trying to make a solution out of it.
Visual Studio succeeds in making a project, but when trying to compile it gives millions of errors (see image).
I've read conflicting info about VB6 support in Visual Studio.
On one hand it's written that Visual Basic is supported, but not VB6?
There also used to be a VB6 IDE, but I can not find a download for it.
Should I use Visual Studio 2008 or something?
What are my options?
Thank you.
When Microsoft today uses the abbreviation "VB", they usually mean "VB.NET", the successor of classic VB published by Microsoft in 2002. According to this source, the latest version of VB, called VB6, appeared in 1998, and 10 years later Microsoft dropped any support for VB6 and its IDE.
Unfortunately, VB.Net is not backwards compatible to VB6, it is a different programming language (though it has some properties which arguably make it easier to port VB6 to VB.Net than to other .Net languages like C#). You cannot compile VB6 programs directly with Visual Studio 2002 or later, you usually need the original VB6 IDE. That leaves you basically with two options:
Try to find a copy of the old VB6 IDE and compile the program with it (if you cannot get it from where you got the source code, according to the comments, you may have luck at Microsoft, when you have the right developer subscription level).
Port the VB6 application to VB.Net. For this, however, you should have some not-too-basic knowledge of both languages, know the differences and ideally have an environment where you can test the original application against the ported one. I did this by myself in the past for some applications, so I know it can be less effort than recreating an application completely from scratch. However, this depends a lot on the specific application, how large and complex it is, how large the UI parts are and which kind of 3rd party components were involved. To be honest, if the application is not trivial, you should have a VB6 IDE for this approach, too.
Note also when your old VB6 code uses 32-bit third party OCX/ActiveX components, for porting it to VB.Net I would recommend to use VS2019 or an earlier version, not VS2022. The current Winforms Designer of VS2022 is not compatible with 32 bit OCX components any more, and it is unclear if MS will ever publish a version which will be.

Can someone tell me the difference between visual studio and visual studio code? [duplicate]

Microsoft recently released Visual Studio Code and I am a little confused about its usage, since Visual Studio has lot of functional similarities with it.
Visual Studio (full version) is a "full-featured" and "convenient" development environment.
Visual Studio (free "Express" versions - only until 2017) are feature-centered and simplified versions of the full version. Feature-centered meaning that there are different versions (Visual Studio Web Developer, Visual Studio C#, etc.) depending on your goal.
Visual Studio (free Community edition - since 2015) is a simplified version of the full version and replaces the separated express editions used before 2015.
Visual Studio Code (VSCode) is a cross-platform (Linux, Mac OS, Windows) editor that can be extended with plugins to your needs.
For example, if you want to create an ASP.NET application using Visual Studio Code you need to perform several steps on your own to setup the project. There is a separate tutorial for each OS.
Visual Studio Code is an editor while Visual Studio is an IDE.
Visual Studio Code is cross-platform and fast, while Visual Studio is not fast.
Note that Visual Studio for Mac is available now but is a different product compared to Visual Studio (Windows). It's based on Xamarin Studio and lacks support for some older .NET project types. It does successfully build solutions created in Visual Studio 2017. Visual Studio for Mac has a more limited UI (for example, no customizable toolbar). So for cross-platform work, Visual Studio Code may still be preferable.
I will provide a detailed differences between Visual Studio and Visual Studio Code below.
If you really look at it the most obvious difference is that .NET has been split into two:
.NET Core (Mac, Linux, and Windows)
.NET Framework (Windows only)
All native user interface technologies (Windows Presentation Foundation, Windows Forms, etc.) are part of the framework, not the core.
The "Visual" in Visual Studio (from Visual Basic) was largely synonymous with visual UI (drag & drop WYSIWYG) design, so in that sense, Visual Studio Code is Visual Studio without the Visual!
The second most obvious difference is that Visual Studio tends to be oriented around projects & solutions.
Visual Studio Code:
It's a lightweight source code editor which can be used to view, edit, run, and debug source code for applications.
Simply it is Visual Studio without the Visual UI, majorly a superman’s text-editor.
It is mainly oriented around files, not projects.
It does not have any scaffolding support.
It is a competitor of Sublime Text or Atom on Electron.
It is based on the Electron framework, which is used to build cross platform desktop application using web technologies.
It does not have support for Microsoft's version control system; Team Foundation Server.
It has limited IntelliSense for Microsoft file types and similar features.
It is mainly used by developers on a Mac who deal with client-side technologies (HTML, JavaScript, and CSS).
Visual Studio:
As the name indicates, it is an IDE, and it contains all the features required for project development. Like code auto completion, debugger, database integration, server setup, configurations, and so on.
It is a complete solution mostly used by and for .NET related developers.
It includes everything from source control to bug tracker to deployment tools, etc. It has everything required to develop.
It is widely used on .NET related projects (though you can use it for other things). The community version is free, but if you want to make most of it then it is not free.
Visual Studio is aimed to be the world’s best IDE (integrated development environment), which provide full stack develop toolsets, including a powerful code completion component called IntelliSense, a debugger which can debug both source code and machine code, everything about ASP.NET development, and something about SQL development.
In the latest version of Visual Studio, you can develop cross-platform application without leaving the IDE. And Visual Studio takes more than 8 GB disk space (according to the components you select).
In brief, Visual Studio is an ultimate development environment, and it’s quite heavy.
Reference: https://www.quora.com/What-is-the-difference-between-Visual-Studio-and-Visual-Studio-Code
Visual Studio
IDE
Except for free editions, it is a paid IDE.
It is quite heavy on CPU and lags on lower end PCs.
It is mostly used for Windows software development including DirectX programs, Windows API, etc.
Advanced IntelliSense (best one ever; Visual Studio Code's IntelliSense extension takes second place)
It features built-in debuggers, easy-to-configure project settings (though developers tend to not use the GUI ones)
Microsoft support (more than Visual Studio Code)
Mostly used for C/C++ (Windows), .NET and C# projects along with SQL Server, database, etc.
Extreme large download size, space utilization and the slow downs over time.
It is the only con that forces me to use Visual Studio Code for smaller projects*
Includes tools to generate dependency graphs. Refactoring tools have great support for Visual Studio.
Has a VYSIWYG editor for VB.NET, C++.NET, and C#. (It is easy enough for first time users instead of getting through windows.h)
Visual Studio Code
Free open source text editor
Has IntelliSense (but it doesn't work out of box if Visual Studio is not installed, need to configure to point to MinGW, etc.)
Smaller download size and RAM requirements. With IntelliSense it requires around 300 MB RAM. (Edit : Some header files tend to blow up memory requirements to 7-8 GBs eg. OpenGL and GLM Libraries)
It works on lower-end PCs. (it is still slow to start up especially if PowerShell is used instead of CMD)
Lower support (open source, so you can modify it yourself)
Build tasks are project specific. Even if you want to build it in a vanilla configuration.
Mostly used for web development (this applies to all free text editors). They tend to show off JavaScript / HTML support over C/C++. Visual Studio shows off Visual Basic/C++ over other languages.
Lack of good extensions (it's still new though)
Gives you a hard time to reconfigure your project/workspace settings. I prefer the GUI way.
Cross platform
Has an integrated terminal (PowerShell is too slow at startup though)
It is best for smaller projects and test code (you know if you are bored and want to print "Hello, World!", it does not make sense to wait 3-5 minutes while Visual Studio loads up, and then another minute or 2 at project creation and then finally getting it to print "Hello, World!").
Complementing the previous answers, one big difference between both is that Visual Studio Code comes in a so called "portable" version that does not require full administrative permissions to run on Windows and can be placed in a removable drive for convenience.
For Unity3D users ...
VSCode is incredibly faster than VS. Files open instantly from Unity in VSCode. Whereas VS is extremely slow.
VS can literally compile code, build apps and so on, it's a huge IDE like Unity itself or XCode. VSCode is indeed "just" a full-featured text editor. VSCode is NOT a compiler: VSCode is literally "just a text editor".
With VSCode, you DO need to install in projects the "Visual Studio Code" package.
When you first download and install VSCode, simply open any C# file on your machine. It will instantly prompt you to install the needed C# package. This is harmless and easy.
Unfortunately VSCode generally has only one window! To open another window is a fuss.
In VS, it is all-but impossible to change the editor font, etc. In contrast, VSCode has FANTASTIC preferences - dead simple, never a problem.
As far as I can see, every single feature in VS which you use in Unity is present in VSCode. (So, code coloring, jump to definitions, it understands/autocompletes every single thing in Unity, it opens from Unity, double clicking something in the Unity console opens the file to that line, etc etc)
If you are used to VS. And you want to change to VSCode. It's always hard changing editors, they are so intimate, but it's pretty similar; you won't have a big heartache.
In short if you're a VS for Unity3D user,
and you're going to try VSCode...
VSCode is on the order of 19 trillion times faster in every way. It will blow your mind.
It does seem to have every feature.
Basically VS is the world's biggest IDE and application building system: VSCode is just an editor. (Indeed, that's exactly what you want with Unity, since Unity itself is the IDE.)
Don't forget to just click to install the relevant Unity package.
If I'm not mistaken, there is no reason whatsoever to use VS with Unity.
Unity is an IDE so you just need a text editor, and that is what VSCode is. VSCode is hugely better in both speed and preferences. The only possible problem - multiple-windows are a bit clunky in VSCode!
That horrible "double copy" problem in VS ... solved!
If you are using VS with Unity. There is an infuriating problem where often VS will try to open twice, that is you will end up with two or more copies of VS running. Nobody has ever been able to fix this or figure out what the hell causes it. Fortunately, this problem never happens with VSCode.
Installing VSCode on a Mac - unbelievably easy.
There are no installers, etc etc etc. On the download page, you download a zipped Mac app. Put it in the Applications folder and you're done.
Folding! (Mac/Windows keystrokes are different)
Bizarrely there's no menu entry / docu whatsoever for folding, but here are the keys:
https://stackoverflow.com/a/30077543/294884
Setting colors and so on in VSCode - the critical tips
Particularly for Mac users who may find the colors strange:
Priceless post #1:
https://stackoverflow.com/a/45640244/294884
Priceless post #2:
https://stackoverflow.com/a/63303503/294884
Meta files ...
To keep the "Explorer" list of files on the left tidy, in the Unity case:
As of 2021 I believe the main differences are:
Visual Studio Code is a completely new codebase (based on Electron) than the "old" Visual Studio, it is open source and is actively developed "in the open" (on github)
Visual Studio is more focused on "traditional" Windows GUI apps development, and it is battery-included for that, including WYSIWYG programming style of the GUI ("visual")
Visual Studio Code, while pretty "nude" on its own, had attracted lots of community development for extensions to do the most crazy things. Community developed extensions exist to use it as a base for an integrated development editor for almost any programming language (for example I use it for Julia)
Out of the box, Visual Studio can compile, run and debug programs.
Out of the box, Visual Studio Code can do practically nothing but open and edit text files. It can be extended to compile, run, and debug, but you will need to install other software. It's a PITA.
If you're looking for a Notepad replacement, Visual Studio Code is your man.
If you want to develop and debug code without fiddling for days with settings and installing stuff, then Visual Studio is your man.
One huge difference (for me) is that Visual Studio Code is one monitor only.
With Visual Studio you can use multi-screen setups.
Visual Studio Code is for more of a pure code development tool while VS2019/VS2017 etc. is for more of a non-coding approach for developing programs. In VS you while get button tools and window toolbar tools and all that fancy stuff. In VSC you have to code the whole thing from scratch. I recommend VSC for people who are just learning to code but VS for advanced devs.
Visual Studio Code is integrated with a command prompt / terminal, hence it will be handy when there is switching between IDE and terminal / command prompt required, for example: connecting to Linux.
For me, Visual Studio on Mac doesn't support Node.js (editing and debugging) whereas Visual Studio Code does this very well.
In short, VSCode heavily promotes (Microsoft's) TypeScript compiler, and bundles first-class support for the language, which makes the editor web-centric, while Visual Studio is primarily used for Microsoft's native, C-family, Windows/XBox stuff.
As VS Code has been heavily developed every month, A new answer is worth.
I'm an ASP.net developer in Visual Studio for ten years. When I see in the Stackoverflow survey (https://insights.stackoverflow.com/survey/2021#section-most-popular-technologies-integrated-development-environment) that VS Code is the the first IDE of choice, I decided to give it a try by using it as my main develop environment, and here's the result after one month:
I can say if only VS Code has an scalable and stable intellisense like VS has, I would keep it as my first choice of IDE for dotnet. Omnisharp (VS Code C# intellisense) is satisfying for small projects but as the workspace becomes bigger (for example when you have more than one projects in your workspace) the instability starts to becomes a problem.
I still use VS Code for small dotnet projects and also as a DB Client, powershell ISE, python, etc. because of it's lightness, feature richness, customizability and having such an alive community and develop team.
obviously the situation can change by whether VS Code getting a VS-level dotnet intellisense, or VS get more game-changing features.

Options for Development of Win32/MFC Applications

I'm still using Visual C++ 2003 to maintain and enhance a PC-based program. It is written in C & C++ and just runs on the PC -- not on the web, a phone, in the cloud, or whatever -- and I have no idea what this .NET framework is all about and probably don't need to care at this time.
Anyway, now that I've upgraded my development PC to Windows 7 it's getting more inconvenient to run the old development environments. I think that the latest full version of Visual Studio 2010 would still work to build my project, but the cost is really off-putting. At least in 2003 they offered Visual C++ by itself for around $100, but the freebie Visual C++ .NET 2010 would do me no good at all.
So are there any alternatives to Visual Studio Pro out there these days? I'd even be willing to rewrite the stuff that actually depends on MFC if I can find something to replace it (and still have access to all the Win32 and early C library support).
Why not pick up a second hand copy of Visual Studio 2005 or 2008 on e-bay?
PS: I always considered VS2003 a really bad IDE when compared to VS2005 and VS2008.
Code::Blocks
Eclipse
Dev-C++
You could use Visual Studio 2010 Express if you would replace all MFC-stuff with pure Win32-calls or with another windowing library like Qt, Fox, eGUI, Tk ...
How much GUI is your application? If it's mostly a algorithms and data classes, rewriting the GUI in C++ might make sense. If it's mostly dialogs and lists, rewriting it on the .net-platform would be much faster.
If you are willing to rewrite the stuff that depends on MFC, then you have many options, but I will suggest these two:
Gtk+ - if you want to develop everything using C. If you like c++ then you have c++ bindings gtkmm
Qt - this is a c++ framework which comes with complete development tools too.
I think the free version of Visual Studio Express can still compile plain old C++ without the .NET. The only problems are that it doesn't include MFC or a resource editor. You might be able to use the MFC include files and libraries from your Visual Studio 2003, but I don't know what you would do for resource editing.
wxWidgets is similar enough to MFC that you might pick it up very quickly. The biggest difference is how you lay out dialogs.

Limitations of sharpDevelop

I am looking in to using sharpDevelop to develop Windows (.NET) applications over using Visual Studio. I'm just wondering if there are any serious limitations to using SharpDevelop over VS? The price is certainly right and at first glance it seems like a pretty decent IDE. I'm just wondering if it is compatible with VS. I mean if I am collaborating with other developers that are using VS, can we seamlessly pass projects/solutions back and forth and work on them? Just wondering what people's opinions are.
Past year I start using SharpDevelop to develop a large application.
Based on my experience, I can say these are some advantages in using it:
It's faster than Visual Studio; if your project is pretty large, you have to spend less time waiting for the project to compile
It's free
One important disadvantage I've found is the lack of a good refactoring system, in Visual Studio I used Jetbrains Resharper for its great refactoring support.
Now I've returned to use Visual Studio, just for the facilities offered by Resharper.
SharpDevelop 4.0 Beta 4 (as the most current version) is pretty stable as for a Beta. Besides being free it has some pretty features which can be extended via AddIn (a sort of plugin system). A large number of project templates for the most popular languages supporting the .NET Framework. A possible limitation is the support for ASP.NET which still lags behind VS.
Surely you can bet that the top versions of Visual Studio may have some better tools, options, better integration and so on.
Please consider comparing SharpDevelop to the Express Editions of VS. Then it will be obvious that SD is a big win if you don't have to pay. Consider it also as a different product, not only a copy of VS (just not to say 'option X is called here Y, opposed to VS').
This feature by feature comparison list for SharpDevelop vs. VS Express might be helpful.
I'm working on a project that was started using Visual Studio 2010. Although according to a special engine we've created the number of code lines is not very high, the project builds very slowly. I tested sharpdevelop, and it was about an order of magnitude faster!! The only problem we faced was that we could not debug our server and client together, something that VS does like a charm (well, that charm requires some patience), and shows the stack trace of the server, on top of the client, which is very useful.
My suggestion: use sharpdevelop unless you absolutely need a feature it lacks.
SharpDevelop 4.0 Beta does not support the default Visual Studio installer projects. However, since these are going to be deprecated after VS2010 by Microsoft, this is probably not a main issue for you.

What is the VS 2008 IDE Written in?

I tried to search but if this is a duplicate it is hidden by some noise. Alternate title to the question:
What skills to look for when needing integration with the Visual Studio IDE?
Visual Studio 2008 is written in both native and managed code, though the bulk is written in C++. There are several pieces of Visual Studio that have always been written in managed code (e.g. the property browser, the WinForms Designer). And of course, Visual Studio 2008 is stitched together with COM.
In Visual Studio 2010, there is an effort to move more of the IDE to managed code. The text editor and the shell (i.e., menus, toolbars, document and tool window frames, etc.) are written in C#. In addition, pieces of the C# and VB IDEs are being written in C# and VB respectively. The new language, F#, is written completely in managed code -- the compiler, the language service, the project system, etc. -- are all written in F#.
You can use C#, VB or C++ to integrate with Visual Studio 2008. However, given that Visual Studio is built on COM, a good understanding of COM/ATL will be helpful. In addition, if you choose to use a managed language, a knownledge of COM interop and mixed-mode debugging will be extremely helpful. Note that there are a few levels of VS integration:
Macros -- the simplest way to run custom code in the IDE.
Add-in -- A simple but powerful way to build custom functionality into the IDE. With an add-in, you can create custom commands, listen to events, manipulate text in the editor, etc. However, you cannot add, say, a new language or editor to the IDE with an add-in. For many purposes, an add-in works fine.
Package -- this is the same level of integration as Microsoft's features use. With a package, you can create pretty much anything in the Visual Studio IDE, including adding new languages.
You should note that these become progressively more complex to author and deploy.
In Visual Studio 2010, a new form of extensibility is being introduced in several areas of the IDE, but primarily for extending the new WPF text editor. Going forward, integration with Visual Studio will require MEF (Managed Extensibility Framework) components rather than COM. So, in VS 2010, extending the text editor will simply require authoring a MEF component in your favorite managed language.
The podcast Herding Code episode #48 features an interview with Dustin Campbell, a program manager on the Visual Studio Managed Languages Group.
In that interview he talks for several minutes about this exact issue and gets into details about why the changes in 2010 are breaking compat with 2008 and how the future looks.
If this is strictly a curiousity question the other answers are correct. But if you want to dig a little deeper, listening to the podcast would be well worth your time.
At least the following languages are used inside of Visual Studio 2008
C++
C#
VB.Net
C
C++/CLI
C++ with managed extensions
Probably a few others that I forgot about.
A mix. The core is C++/COM stuff, but a lot of the newer stuff is managed code (C# etc). Due to the core being C++/COM (with a pile of code 'borrowed' from MS Office), VS integration is a funny experience.

Resources