Programming Taskbook


E-mail:

Password:

User registration   Restore password

Russian

SFedU

1100 training tasks on programming

©  M. E. Abramyan (Southern Federal University), 1998–2022

 

Examples | C#, VB.NET, F# | Configuring IDE

PrevNext


Configuring IDEs for .NET languages

This page briefly describes how to config the Visual Studio, SharpDevelop, and VS Code IDEs for .NET languages (C#, Visual Basic .NET, F#).

Visual Studio (2017, 2019, 2022)

1. Download and install Visual Studio IDE of the requires version from the Microsoft website https://visualstudio.microsoft.com/ru/downloads/. To work properly with .NET programs, you must install extension "Classical .NET Application Development" using the Visual Studio Installer. If the F# language is supposed to be used, it is necessary to additionally check the F# language support for classic applications checkbox.

2. Run the PT4Setup program (Start | All programs | Programming Taskbook 4 | PT4 Setup) and make sure that the taskbook has detected the installed Microsoft Visual C# Microsoft Visual Basic .NET, Microsoft Visual F# IDEs (version 2017, 2019, or 2022). If the path to the executable file devenv.exe is not found by the taskbook, then specify it by clicking the Browse button. By default, the file devenv.exe is located in C:\Program Files\Microsoft Visual Studio\XXXX\Community\Common7\IDE or C:\Program Files (x86)\Microsoft Visual Studio\20XX\Community\Common7\IDE, where the 20XX subdirectory corresponds the version number (2017, 2019, or 2022). Close the PT4Setup program.

As a result of the steps described above, the taskbook will be set up to be used with the Visual Studio IDE for the C#, Visual Basic .NET, F# languages.

Remark. Using the PT4Setup program, you can configure an additional parameter for the Visual Studio environment: the version of the target .NET Framework to be used when compiling a program in this environment. By default, the taskbook uses the latest version found on the computer, but the version may be determined incorrectly in some situations. In this case, you should specify one of the available platforms in the Visual Studio environment settings in the PT4Setup program using the Additional settings (F9) button. You can only select the version of the target platform starting from 4.7, since this version is the first version of .NET Framework, which provides additional features of the C# language version 7.0 (in particular, convenient tools for working with tuples of the ValueTuple type). Using the following link, you can download the installer ndp47-devpack-kb3186612-enu.exe platforms for .NET Framework 4.7. The version of the target NET Framework can be configured independently for different versions of the Visual Studio environment (2017, 2019, 2022) and different languages (C#, Visual Basic .NET, F#).

SharpDevelop (C# and F#)

1. Download and install SharpDevelop from https://sourceforge.net/projects/sharpdevelop/. In order to successfully install the SharpDevelop environment, you may need to install the Microsoft Visual C++ 2008 SP1 Redistributable Package vcredist_x86.exe. If necessary, install additional software components, specified in the file doc\Dependencies.php located in the system directory of this environment; these components are necessary for the successful compilation of projects. In particular, the following package is required: Microsoft Windows SDK for Windows 7 and .NET Framework 4.

2. Check that, after the required components are installed, the following C# and F# projects can be created and compiled: the File | New | Project menu command, the Console Application project from the C# | Windows Application group and the F# Console Application project from the F# group.

3. Run the PT4Setup program (Start | All programs | Programming Taskbook 4 | PT4 Setup) and make sure that the taskbook has detected the installed SharpDevelop (C#) and SharpDevelop (F#) IDEs. If the path to the executable file SharpDevelop.exe is not found by the taskbook, then specify it by clicking the Browse button. By default, the file SharpDevelop.exe is located in C:\Program Files (x86)\SharpDevelop\5.1\bin. Close the PT4Setup program.

As a result of the steps described above, the taskbook will be set up to be used with the SharpDevelop IDE for the C# and F# languages.

It should be noted that this environment has not been updated since 2016, so it uses .NET Fremework 4.0 and C# 5.0. In particular, this version does not support tuples (of the ValueTuple type) and interpolated strings.

VS Code (C#)

1. Install VS Code https://code.visualstudio.com/download#, (Windows, 64 bit, User Installer or System Installer). If you select System Installer, the environment will be installed in the directory C:\Program Files, if you select User Installer, then the environment will be installed in the subdirectory of the current user directory, for example, C:\Users\<UserName>\AppData\Local\Programs\Microsoft VS Code.

2. Install the .NET Core 3.1 platform (https://dotnet.microsoft.com/download/dotnet/3.1, Windows variant, x64). The required dotnet-sdk-3.1.416-win-x64.exe installer is available at the following link. On Windows 11, you may also need to additionally install the .NET Core 3.1 Runtime package; its dotnet-runtime-3.1.23-win-x64.exe installer is available at the following link.

3. Run the PT4Setup program (Start | All programs | Programming Taskbook 4 | PT4 Setup) and make sure that the taskbook has detected the Visual Studio Code (C#) IDE. If the path to the executable file Code.exe is not found by the taskbook, then specify it by clicking the Browse button. Close the PT4Setup program.

4. Run the PT4Load program, call its context menu (by right-clicking) and select the Visual Studio Code (C#) command In the Task field, enter the name of a task (for example, Begin1) and press [Enter] of click the Load button. The created template file will be loaded into the VS Code editor. The first time you load a file with the .cs extension, the VS Code editor will prompt you to install the C# language extension pack. When this extension pack is installed, you will be able to start C# programs from VS Code by pressing [F5].

As a result of the steps described above, the taskbook will be set up to be used with the VS Code environment for the C# language.


PrevNext

 

  Рейтинг@Mail.ru

Designed by
M. E. Abramyan and V. N. Braguilevsky

Last revised:
19.04.2022