Visual Studio is an Integrated Development Environment (IDE) which is an easy-to-use software that allows a programmer to develop software applications quickly and efficiently. It supports 36 different programming languages with built-in support for C, C++, C#, .Net, C++/CLI, Visual Basic, F#, JavaScript, TypeScript, XML, XSLT, HTML, and CSS. The main functionality of Visual Studio is its code editor where programmers can create code within files that reside in projects within an overall solution. Once the programmer has written code, they can build the code which compiles it into assembly files depending on each individual project type and its configuration. Once an application is ready to be released a programmer can deploy or publish to code. Visual Studio also has functionality for source control via Git, automated test management, analyzing code, performance profiling, server and cloud explorers, and extensions or plugins. The pricing for Visual Studio is dependent on if it is for an individual or a small team (less than 5 users), small or medium sized businesses and enterprises. For individuals or small teams, Visual Studio Community can be used and is free. Other editions include Professional and Enterprise which can be acquired via monthly subscription or licensing depending on the business size. There is also Visual Studio Code which is a code editor that contains less features than Visual Studio IDE that is free.
When starting out from scratch, a programmer will create a new project, either an empty project or from a selection of numerous templates, that will automatically generate a solution file for the project. From there a programmer can create code files in which they can write code leveraging IntelliSense. IntelliSense will detect what the programmer is typing, offer guidance, and allow for more efficient typing by allowing the programmer to auto-finish what they are typing. Visual Studio will also detect errors and warnings as the programmer is typing and leverage squiggles under the code in question to let the programmer know there are issues. The issues that Visual Studio finds can also be found in the Error List window so a programmer can easily jump to the issues in question. As a programmer goes through the issues or while typing in general, Visual Studio will offer Quick Actions which are suggestions to fix the issues or refactor the code. While this makes programming seem simple or automatic, keep in mind that general knowledge of the coding language and libraries is required and that the offered solutions are not always correct or will fix the underlying issues.
It is important for a programmer to be able to easily navigate through the code as programming proceeds causing the application to become increasingly complex. A programmer can peek at the definition, go to the definition of an object, got to the implementation, or go to the base definition directly from the code they are writing or reviewing. The programmer can also find all references to an object or view the call hierarchy of a member. They can use the navigation bar to quickly jump to specific points within the file they are viewing, do a search or find throughout Visual Studio, or search within solution explorer. With CodeLens, a programmer can view object references and, in Professional and Enterprise editions of Visual Studio, source control changes. Programmers can set bookmarks or use the back and forward navigation buttons to easily get back to their place when they are reviewing other parts of the code. A programmer can use comments and task tokens to mark areas of code that need work or require special attention that will appear in the task list. Keep in mind that more complex tasks are best stored in task/issue tracking software where other individuals that are not programmers have access.
During programming, a programmer will build the application which will compile the code into assembly files such as executables or dynamic-link libraries using a selected configuration. By default, there are debug and release configurations for each project where the debug configuration includes debug symbols and has code optimizations turned off allowing for debugging the code. When publishing a web site to a server or building the assembly files to be transferred to another computer via flash drive, it is best to do so with the release configuration. During the build process, information about the process can be viewed in the output window which will include which project is being built, based off what configuration is selected, and any issues that occurred. If there are issues, the error window will appear with a list of the issues so that the programmer can fix them. Outside of Visual Studio, a programmer can replicate the build process using MSBuild which Visual Studio uses under the hood. The code can also be built as part of a continuous integration or delivery software like Azure Pipelines.
Once the application is built using a debug configuration, the programmer can launch an instance of a project in debug mode. If an exception occurs the application will pause and Visual Studio will highlight the line of code where the exception was thrown. The programmer can then review the exception, stop debugging the application, and fix the issue. While the application is paused the user can exam the call stack to determine the path that led to the line of code being called. When the programmer wants to pause the application when a line of code is run, they can use breakpoints. Breakpoints will always break unless conditions are set on the breakpoint. A programmer can also have the breakpoint do an action such as log to the output window, modify a variable, etc. While the application is paused, either through breakpoint or exception, a programmer can view the value of an object by hovering over the object, viewing the autos window, view the locals window, or by adding the object to the watch window. The immediate window allows a programmer to write and run code while an application is paused. It is also possible to debug an application hosted on another computer through remote debugging and a programmer can attach to running processes.
Visual Studio allows the programmer to deploy or publish their application to multiple destinations of their choice depending on the project type. If working on a .NET Windows application or .NET Framework desktop the programmer can publish using ClickOnce. When building a ASP.Net app, the app can be published to an Azure App Service or to IIS. Other options include publishing to a folder, FTP/FTPS server, Docker Container Registry, or by importing a publish profile.
Git is now the default version control experience in Visual Studio. A programmer can open or clone an existing Git Repository or create a new Git Repository. Branches can be managed, created, checked out, and deleted from Visual Studio. A Programmer can also view the history of a branch as well as commit details. When the programmer modifies a file, they can view their changes in the Git Changes window where they can stage, stash, or commit the changes. Prior to committing changes, a programmer can review the changes by opening the file from the Git Changes window which will open a new tab containing the differences between the local file and what is on the server. Also, prior to committing changes, a programmer can fetch and pull changes made to the server version of the files that were made as the programmer was working. After committing the changes, the programmer can push the commits to the server. There is a chance that changes from one branch could conflict with another causing a merge conflict. When a merge conflict occurs, a programmer can use the Merge Editor which is a three-way merge tool to resolve the conflict.
In regards to unit testing, Visual Studio has the Test Explorer which works with any unit test framework that has an adapter for it. As a programmer is creating tests, the test will appear in the Test Explorer where a programmer can run all the tests, run specific tests, and debug specific tests. This same functionality can be done directly with the code that represents the test. When the tests are complete, they can be run per build or run as part of continuous integration software.
Code style analyzers are built into Visual Studio and can be defined in an EditorConfig file in each project or for all a programmer’s project through the Options dialog. Once set a programmer can set the enforcement of code styles to occur on build and can trigger a code cleanup as needed. Visual Studio also can calculate code metrics to help a programmer find code within their application that could be reviewed to reduce complexity.
At some point an application is going to get to the point where performance becomes a concern. Visual Studio allows for performance profiling leveraging several tools such as CPU Usage, Memory Usage, .NET Async, .NET Counters, .NET Object Allocation Tracking, and others. When a diagnostic session is complete, a programmer can view the information gathered which includes a timeline graph that is selectable as well as a list of objects/functions with timing or other information about them. The diagnostic session is savable to be shared with others or viewed later.
Visual Studio is also extensible and there are many different extensions created by individual developers and companies that can enhance Visual Studio or add tools to it. Some examples are the Chutzpah Test Adapter, VSJira, Bundler & Minifier, AWS Toolkit for Visual Studio 2017 and 2019, SlowCheetah, ClaudiaIDE, and others.
There are three editions of Visual Studio which include Community, Professional, and Enterprise. Visual Studio Community is free for individuals and can be used in a non-enterprise organization for up to five users/devices. Non-enterprise and enterprise organizations can use Visual Studio Community for free for open-source project teams, classroom learning environments, or for academic research. An enterprise is defined as have more then 250 PCs or $1 Million US Dollars in annual revenue. Outside of Visual Studio Community, there are monthly subscription plans for the Professional and Enterprise editions as well as licensing options that depend on your organizations size.
The difference between Community and Professional is that Community only has partial support of CodeLens. Enterprise includes Live Dependency Validation, Architectural Layer Diagrams, Architecture Validation, Code Clone, Visualize and Manipulate Solutions with Dependency Graphs and Code Maps, IntelliTrace, Code Map Debugger Integrations, .NET Memory Dump Analysis, Snapshot Debugger, several testing tools, and more tools for cross-platform development.
Installing Visual Studio is simple, a programmer would just need to download the Visual Studio Installer. Afterward, they would have to choose the correct edition they would like installed, keeping in mind that they will have to login to Visual Studio to validate they can use the edition. The programmer would then have to select which workloads they would need to be able to develop their applications and a location for the installation. Finally, the programmer would have to restart their PC and will be able to begin using Visual Studio.