Smart Paste in Rider

Today, I’d like to introduce you to Smart Paste, a “little big feature” in Rider (as well as in ReSharper). It ensures the right escaping in string literals that are copy/pasted. For example, consider pasting The "Name" field is required into var error = "". We would paste the string, then move to both " characters and escape them with \", making sure there are no syntax errors. Rider helps us out here with a quick-fix that can escape illegal characters for us!
Using Smart Paste to escape a string

Smart paste works in C#, VB.NET, JavaScript, XML, XAML and HTML files, and suggests escaping values upon paste.
Continue reading

Posted in How-To's | Tagged , , , , , , , | 6 Comments

Using dotPeek to figure out why IIS crashed

Here’s a story on how I once used dotPeek to provide debugger symbols and (decompiled) source code for a crashed application for which we had nothing but the application assemblies available. Namespaces have been altered to protect the innocent.
dotPeek decompiler

Nothing better than a good cup of coffee in the morning! Opening up the issue tracker, “the folks from IT” logged an issue about an application server crashing over night. They automatically captured a crash dump of the IIS worker process and attached it to the issue – this should help in diagnosing the root cause of that crash. One more coffee refill, and then let’s dive in!

Continue reading

Posted in How-To's | Tagged , , , | 5 Comments

Rider EAP update: Version control and database editor improvements

We already mentioned numerous times that Rider is built on top of ReSharper, analyzing our code in the background, and the IntelliJ platform, providing the front end and editor capabilities for our cross-platform IDE for .NET.

Doing so lets us ship the best of both worlds: both products have been evolving over years, and Rider profits. So when IntelliJ IDEA 2016.3 was released, we merged all of the improvements to language-independent features such as version control and the database editor into Rider. Let’s go over some of these improvements!

Continue reading

Posted in How-To's | Tagged , , , | 10 Comments

Rider EAP update: File watchers

One cool thing about Rider is that we can tap into the rich plugin ecosystem the IntelliJ platform brings. There are community plugins, and several JetBrains plugins as well. One of those was recently made available to work with Rider EAP: the File Watchers plugin, which executes tasks on file modifications.

But… why would we want this? One example could be “watching” TypeScript files for modifications and then transpile TypeScript to JavaScript automatically. Or watch CSS, LESS or JavaScript and bundle & minify them whenever we make a change. Let’s look at an example.

Continue reading

Posted in How-To's | Tagged , , , , , | 1 Comment

ReSharper Ultimate 2017.1 EAP: what’s new in builds 2 and 3

We’ve just released the third Early Access Preview build of ReSharper Ultimate 2017.1. Let’s take a look at the recent changes in this and EAP 2.

TypeScript and JavaScript

This build introduces a number of performance fixes for TypeScript and JavaScript, as our processing of file dependencies has been rewritten and optimised, wildcards in tsconfig are handled better, and the Rename refactoring for local symbols is also faster, with the ability to disable search for dynamic usage of TypeScript symbols in JavaScript files via a checkbox in the Rename dialog.

Find possible dynamic usages checkbox in rename dialog
Continue reading

Posted in How-To's | Tagged , , , , , , , | 8 Comments

Rider EAP update: Working with NuGet

There’s no way around it: .NET development today and in the future means working with NuGet for bringing dependencies into our projects. Rider lets us install, update and remove NuGet packages, and automatically restores missing packages when a project is opened. In this blog post, let’s look at what changed in our NuGet tooling since we launched public Rider EAP (Early Access Program).

Performance updates

When searching a NuGet package source, Rider caches and updates search results in the background. Since our first public EAP, we worked on zero-latency typing in the search box which makes searching for packages very snappy.

Rider searches NuGet packages in the background

Continue reading

Posted in How-To's | Tagged , , | 3 Comments

Rider EAP 18: CoreCLR debugging is back (on Windows)

Good news everyone! A fresh Rider Early Access Program (EAP) build is available for download!

Rider splash screen

Rider EAP 18 brings back CoreCLR debugging on Windows (Linux and Mac OS X will come later), the Invalid volume separator char solution load error has been fixed, there’s a UI to add COM references and display them in the Solution Explorer, and assorted bug fixes. In other words: things you want! Check out the list of fixes in this build for full details.

Continue reading

Posted in How-To's | Tagged , , , | 26 Comments

Rider EAP update: Editor presentation improvements

Since we first released the Early Access Preview (EAP) of Rider, our cross-platform IDE, we’ve been hard at work improving many aspects of it. We spent quite some time improving visible (and invisible) aspects of the editor. Let’s look at some of the updates to code highlighting, folding and code completion.

Continue reading

Posted in How-To's | Tagged , , , , , | 4 Comments

ReSharper, .NET Core and unit testing

In this post, we’re going to look at how ReSharper 2016.3 can help you unit test your .NET Core applications and libraries.

Sadly, before we can look at this, we have to deal with the confusing issue of what versions of .NET Core are supported.

TL;DR: ReSharper 2016.3 works with .NET Core projects in Visual Studio 2015 and Visual Studio 2017 “RC”, but unit testing only works in project.json based projects. The IDE interface to dotnet test was rewritten for the .csproj based projects in Visual Studio 2017 “RC” and only just documented. More details at the end of this post.

Unit testing in .NET Core

Right, let’s take a look at unit testing a .NET Core app or library.

Continue reading

Posted in How-To's | Tagged , , , , , , , | 10 Comments

Rider EAP update: Code style settings and layers

Since our first public Early Access Preview (EAP) for Rider, we’ve been hard at work improving our cross-platform IDE for .NET development. Rider helps keeping a consistent code style throughout our code base, applying style settings that are based on widely accepted conventions and best practices. Since recently, we support code style settings, making it possible to set our personal our team code style preferences.

Code style settings

From Rider’s settings (Ctrl+Alt+S), under Editor | Code Style we can specify the style rules our IDE should follow when we’re writing or generating code, or when a refactoring is executed. For example, we can specify whether Rider should use var or explicit types.

Rider code style settings
Continue reading

Posted in How-To's | Tagged , , , , , , | 6 Comments