What's New in SnapDevelop 2019 R3
Last Updated: January 2021
This document lists the new and enhanced features in the 2019 R3 release of SnapDevelop (including DataWindow Converter and PowerScript Migrator).
Support for .NET Core 3.1
SnapDevelop has added support for .NET Core 3.1. You can now select .NET Core 3.1 as the target framework when you create a project using the wizard.
If you are upgrading an ASP.NET Core 2.x project to 3.x, you would need to remove obsolete package references from the .csproj file first, and then update the Program.cs
and Startup.cs
files. Please refer to Upgrade Guide for the detailed instructions.
Support for New Databases
ASE and HANA Databases
In the DataWindow Converter and DB Server Explorer, it is now possible to connect to an ASE (Adaptive Server Enterprise) or HANA database.
Support for Cloud Database Servers
The following connections to cloud database servers have been tested and proven to be successful:
Database | Cloud Database Server | DB Engine Version |
---|---|---|
MySQL | Amazon Aurora for MySQL | 5.6.10a |
MySQL | Amazon RDS for MySQL | MySQL 8.0.20 |
PostgreSQL | Amazon Aurora for PostgreSQL | 11.6 |
PostgreSQL | Amazon RDS for PostgreSQL | PostgreSQL 12.3-R |
SQL Server | Amazon RDS for SQL Server | 14.00.3281.6.v1 (SQL Serve 2017) |
Oracle | Amazon RDS for Oracle | 12.1.0.1 |
SQL Server | Microsoft Azure SQL | Latest SQL Server engine (as at September, 2020) |
MySQL | Microsoft Azure database for MySQL | 5.6 |
PostgreSQL | Microsoft Azure database for PostgreSQL | 11 |
Note: The steps to connect to a cloud database server are the same as what you do to connect to a local database, except that you shall specify the endpoint of the DB instance created in the cloud database server as the server or host. For information on how to create a DB instance on a cloud database server, please refer to the documentation from the provider.
Convert DB Tables to C# Models
You can now convert your database tables directly to C# models in the DB Server Explorer. Please note that, currently the table relationships (for example, master-slave) cannot be converted.
NuGet Package Manager
Migrate from packages.config to PackageReference
SnapDevelop now supports migrating a .NET Framework project from the packages.config management format to the PackageReference format.
Remember Your Configurations for a Project or Solution
The NuGet Package Manager remembers the following settings you configure for a single project or an entire solution, and restores your settings next time you open the NuGet Package Manager on the project or solution:
- Package source
- Include prerelease
- Show preview window
Performance Enhancement
The performance of NuGet Package Manager has been improved, in aspects such as: installing and restoring NuGet packages, searching for NuGet packages. In addition, the messages in the Output panel are more concise and helpful when you restore NuGet packages.
Optimized Debugging
Exception Management
It is now possible to add or remove an exception from the exceptions list.
You can configure conditions on exceptions. Currently supported conditions include the module name(s) to include or exclude for the exception. By setting module names as conditions, you can choose to break, or avoid break, for the exception on certain code modules, and avoid breaking on certain modules.
Breakpoint Settings
Different icons are added to indicates the different breakpoint types.
You can now right click a breakpoint and select to configure these settings:
- Conditions. The conditions control when and where the breakpoint shall execute. A condition can be any valid expression that is supported by the debugger. If there are multiple conditions, they are joined by "AND".
- Actions. You can define the actions to perform when the specified conditions are met at the breakpoint. The action can be, for example, showing a message in the Output window.
Asynchronous Debugging
- The Step Into function (F11) now works as expected in asynchronous debugging mode.
- It is now possible to debug asynchronous code in asynchronous debugging mode.
Variable/Object Details
- In break mode, when you hover over any variable/object in the source code, a little box pops up for the variable/object to present the full details of the variable/object, more accurately.
- The classification and indication of static members, public/protected/private data members are now correct;
- If a variable is incorrectly calculated by the debugger (because it cannot get the correct value), a warning flag will appear beside the element so that you can check the details.
Identify Unhandled Exception
A popup window appears as you step into a line where an unhandled exception occurs. See an example:
Selecting multiple or all items from debug windows
SnapDevelop allows you to select multiple or all the items from a list in the Breakpoints, CallStack, Locals, Watch, and QuickWatch windows. To select multiple items in a list, hold the Shift key and click the items you want to select one by one. To select all the items in a list, right click on an item in the list, and select Select All.
Enhanced Docker Support
Docker Explorer
The built-in Docker Explorer (View > Docker Explorer) provides a convenient and integrated way of interacting with local /remote Docker engines and Docker repositories.
The following operations can be directly performed in Docker Explorer:
- Connect to a Docker engine and view the list of images and containers on the Docker Engine
- Pull images from a Docker registry to the Docker engine, or push an image to a registry
- Tagging images
- Select a Docker image and configure to run it as a container
- Start, stop, restart or delete a Docker container, or execute command in a Docker container
Docker Support for ASP.NET Core Web API projects
If you right click an ASP.NET Core Web API project and select Add, you may add Docker Support to the project. The "Dockerfile" will be added to the project. The file contains all the necessary commands that can be called on the command line to assemble the Docker image for the project.
Container Orchestrator Support for ASP.NET Core Web API Projects
If you right click an ASP.NET Core Web API project and select Add, you may add Docker Orchestrator Support to the project. The "Dockerfile" will be added to the project; and a "docker-compose" folder is added to the project manager in the Solution Explorer, containing a ".dockerignore" file and a "docker-compose.yml".
- The "Dockerfile" contains all the necessary commands that can be called on the command line to assemble the Docker image for the project.
- The ".dockerignore" file contains file types and extensions that you don't want Docker to include in the container.
- The "docker-compose.yml" file contains the configuration of all the services (containers) that make up your application. You can create and start multiple services (containers) based on your configuration. For example, if you select to add Container Orchestrator Support for multiple ASP.NET Core projects in the Solution Explorer, the services of all the projects are added to the same "docker-compose.yml" under "docker-compose". The order of the services in the file determines the order that the services will be run.
- You can remove the Docker Orchestrator Support by right clicking on the "docker-compose" folder and selecting Unload Project.
Streamlined Docker Publication Process
The Docker publication process is more simple and straightforward.
Solution/Project Property Settings
Configuration Manager
The Configuration Manager accessible from Solution Properties allows you to specify how projects in the solution are to be built and deployed.
Generate the COM Host for Class Library Projects
The option Generate the COM host is available for Class Library (.NET Core 3.1) and Console App (.NET Core 3.1) projects.
The resulting output will include a file named projectname.comhost.dll
.
Assembly Information Configuration
SnapDevelop does not support creating .NET Framework projects, but support opening and compiling .NET Framework projects that you created in other IDEs. You can now configure the assembly information for a .NET Framework project in SnapDevelop.
The assembly Information dialog box (note that it provides the option Make assembly COM-visible):
DataWindow Converter Enhancements
More Model Generation Settings
It is possible to configure model generation settings for DataWindow Converter on Tools > Options > DataWindow Converter. You can now configure to generate models with .NET DataStore attributes.
Data Type Mappings for SP DataWindows
When converting a stored procedure DataWindow (SP DataWindow), you can now manually specify the mapping C# data type for each column.
(1) Click the Column Mapping icon:
(2) Select the type for each column:
Generate DataContext during Model Export
You can now click the New DataContext link in the Model Export window to directly generate a DataContext file for the exported models.
Redirection links to Child DataWindows
The Child DataWindow List window now provides redirection links to the child DataWindows.
PowerScript Migrator Enhancements
You can now select multiple files to translate with the Batch Translate option. The Batch Translate option is available when you right click on a *.pbl or *.pbt file, or when you select multiple items to translate in the Solution Explorer.
Scaffolding
Streamlined Menu Items
The Scaffolding menu items are changed from previous four items to the following two items (and the functionality provided is unchanged):
Scaffold Controller: This is for scaffolding controllers from services;
Scaffold Service and Controller: This is for scaffolding services and controllers from models.
You will select the appropriate scaffolding template(s) after clicking any one of the menu items.
New Scaffolding UI
The scaffolding UI layout has been re-designed with a more streamlined and logical structure.
File Conflict Handling Option
If files already exist when scaffolding, a new option named Increment the file name is provided for handling the file conflicts.
Miscellaneous Features
Web API Projects
Async Methods in Sample Projects
If you create a Web API project with .NET DataStore or SqlModelMapper sample code, the project uses asynchronous methods in the services and controllers by default.
For example, asynchronous methods in the service:
public interface ISampleService
{
Task<IDataStore<D_Department>> RetrieveByKeyAsync(int id, CancellationToken cancellationToken);
Task<int> CreateAsync(D_Department department, CancellationToken cancellationToken);
Task<int> UpdateAsync(D_Department department, CancellationToken cancellationToken);
Task<int> UpdateAsync(IDataStore<D_Department> department, CancellationToken cancellationToken);
Task<int> DeleteByKeyAsync(int id, CancellationToken cancellationToken);
}
public class SampleService : ISampleService
{
private readonly SampleDataContext _dataContext;
public SampleService(SampleDataContext dataContext)
{
_dataContext = dataContext;
}
public async Task<IDataStore<D_Department>> RetrieveByKeyAsync(int id, CancellationToken cancellationToken)
{
var dataStore = new DataStore<D_Department>(_dataContext);
await dataStore.RetrieveByKeyAsync(id, cancellationToken);
return dataStore;
}
}
Asynchronous methods in the controller:
[Route("api/[controller]/[action]")]
[ApiController]
public class SampleController : ControllerBase
{
private readonly ISampleService _sampleService;
public SampleController(ISampleService sampleService)
{
_sampleService = sampleService;
}
// GET api/sample/retrieveone/{id}
[HttpGet("{id}")]
[ProducesResponseType(typeof(D_Department), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<ActionResult<D_Department>> RetrieveOneAsync(int id)
{
var department = await _sampleService.RetrieveByKeyAsync(id, CancellationToken.None);
if (department.Count == 0)
{
return NotFound();
}
return department.FirstOrDefault();
}
}
Removed DWNet.Data and DWNet.Data.AspNetCore
If you create an ASP.NET Core Web API project with Basic sample code, the project no longer contains the DWNet.Data and DWNet.Data.AspNetCore NuGet packages by default, and the relevant code (for example, the UsePowerBuilderIntegrated
and UseDataWindow
methods) is also removed from the Startup.cs
file.
Create GUID
Use the Create GUID tool in the Tools menu to create GUIDs (globally unique identifier). You can choose from 6 possible formats to create a GUID, and save the result to the clipboard.
Rename and Remember a Database Connection
You can rename an existing database connection. If you select Remember this connection for a connection, the connection will be saved to the Connection name list, so that you can select it from the list next time you need the connection, instead of creating it from scratch.
Default Dark Theme
The dark theme is now applied to the SnapDevelop IDE by default. To switch to the light theme, go to Options > Environment > General.
Find and Replace
A new scope option named All Open Documents is added.
You can now search in the tool windows of Go To Definition, Go To Implementation, and Find All References.
Paste Special
The Paste Special feature (Edit > Paste Special), including two options: Paste JSON as Classes and Paste XML as Classes, automatically converts the copied JSON or XML text to .NET classes.
For example, when you select Paste JSON as Classes, you will get a number of classes formatted like below:
public class Rootobject
{
public Logging Logging { get; set; }
public string AllowedHosts { get; set; }
public ConnectionStrings ConnectionStrings { get; set; }
}
public class Logging
{
public LogLevel LogLevel { get; set; }
}
Editor Enhancements
The editor now allows you to:
Set font size and font family on Options > Text Editor > Fonts, or adjust font size using Ctrl + Mouse Wheel.
If you press Enter in a string to start a new line, the two strings are automatically connected using "+".
Copy and paste a collapsed method.
Go To Line: Allows you to move to a specific line in the active document. To access this feature, select Edit > Go To Line.
The editor can now show the number of references to a class, method, or property. This feature is disabled by default. To enable it, go to Tools > Options > Text Editor > C#.