Quantcast
Channel: dotPeek : .NET Tools | The JetBrains Blog
Viewing all 221 articles
Browse latest View live

ReSharper Ultimate 2016.3 Release Candidate

$
0
0

The new release is now so close, you can almost taste it: please download ReSharper Ultimate 2016.3 Release Candidate.

ReSharper Ultimate 2016.3 Release Candidate

If you have watched the progress of Early Access Program but were hesitant to try the early builds in your production environment, Release Candidate is just the right build to test-drive 2016.3 in your daily work. Please do download the RC and let us know if there are any critical issues compared to the latest released version, 2016.2.2.

Here’s a quick recap of changes introduced in 2016.3:

  • All ReSharper Ultimate tools can now work with Visual Studio 2017 RC (still not supported: lightweight solution load; .NET Core unit testing targeting .NET Core 1.1+)
  • ReSharper implements initial support for C# 7 and VB.NET 15; adds new code generation actions, context actions and quick-fixes; introduces a Transform Parameters refactoring; supports running .NET Core unit tests that target .NET Core 1.0.x in Visual Studio 2015; brings noticeable improvements in usage search and ReSharper Build; improves support for TypeScript, JavaScript and HTML; extends the language injection mechanism.
  • ReSharper C++ starts to support the Catch unit testing framework and improves its Boost.Test runner; adds refactorings to introduce or inline typedefs; improves Quick Documentation and Quick Info controls; adopts the idea of postfix completion and postfix templates from the mainline ReSharper.
  • dotCover, dotTrace and dotMemory level up support for .NET Core profiling and coverage.
  • dotCover introduces a more compact way to highlight coverage status in Visual Studio code editors, which is very relevant for Continuous Testing.
  • dotTrace adds multiple improvements to its Timeline Viewer.
  • dotPeek reveals a variety of metadata in its Assembly Explorer.
  • dotMemory extends its set of automatic memory inspections.

Please download the Release Candidate, and do voice your concerns if something goes wrong as you’re using it.


ReSharper Ultimate 2016.3 is Released!

$
0
0

We have just finalized an update to ReSharper Ultimate, and we invite you to check out what’s new and download ReSharper Ultimate 2016.3 RTM!

Watch the following video for a summary of what is new in ReSharper Ultimate 2016.3, or read on for the main highlights of this release:

ReSharper

In addition to 700+ fixes, major highlights of ReSharper 2016.3 are the following:

  • Visual Studio 2017 RC initial support. All ReSharper Ultimate tools now support Visual Studio 2017 RC, including the new .csproj based .NET Core projects. Please note that though Visual Studio 2017 is marked as “RC” there are a number of features and architectural changes that are currently marked as “preview”. As such, we are still working on support for some of these new Visual Studio features, such as lightweight solution load and .NET Core unit testing.
  • Early support for C# 7 and VB.NET 15. ReSharper 2016.3 learns to understand VB.NET 15 and C# 7 binary literals and digit separators. C# 7 local functions are supported with a set of code inspections, such as Possible System.NullReferenceException, Access to disposed closure, and Access to modified closure. C# 7 out variables, pattern-matching in is expressions and switch cases are also supported.
    Digit separators and binary literals
  • New code generation actions. Generate Relational members action helps you automatically overload relational operators (>, <, , ) and/or implement IComparable and IComparable<T> using selected fields and properties. Generate Relational comparer creates a comparer class derived from Comparer using selected fields and properties. Generate Dispose pattern action helps you generate the implementation of IDisposable with optional nullability checks and destructor for unmanaged members.A quick-fix that helps implement a dispose pattern for IDisposable
  • New quick-fixes and context actions. ReSharper 2016.3 adds a new quick-fix to Introduce fields and auto properties from all unused parameters. This is an extension to the existing quick-fix that will introduce a field from a single constructor parameter, but if you extend the Alt+Enter menu item, it will now apply to all unused parameters at once.
    Introduce from unused parameters quick-fix
    The Introduce property quick-fix also includes a Configure default menu item, which will set what kind of property is generated by default. There's also a new context action on fields of type Lazy to introduce a property to encapsulate fieldname.Value.
  • New Transform Parameters refactoring is based on two existing refactorings: Transform Out Parameter and Extract Class from Parameters. It can be invoked on a method declaration and will rewrite the method’s parameters, changing incoming parameters to a new class, or a tuple, and optionally creating a new class for return value and any out parameters. Transform Parameters refactoring in ReSharper 2016.3
  • ReSharper's unit testing assistance is now available for NUnit and xUnit.net unit tests in ASP.NET Core and .NET Core projects in Visual Studio 2015.
  • Navigation and search improvements:
    • The Find Results window now works asynchronously, meaning that you can work with the results tree while usage search is still in progress. The Show in Find Results button becomes available in the pop-up as soon as you invoke Usages of Symbol (Shift+Alt+F12). So you can just click it or press + to go on working with the code while the search continues in the Find Results window.
      Async Find usages in ReSharper 2016.3
    • Recent Files can now delete entries with the Delete key, and both the Recent Files and Recent Edits pop-ups will now show the path of the file, to avoid confusion with similarly named files.
    • Go to Text now supports new formats of content files, such as .less, .hbs, .coffee, .scss, .dart, .as, .styl.
    • There is a new setting to remember the last search in Go to Everything, Go to Text and other search actions.
  • ReSharper Build receives its own Build Results window, which lists build warnings and errors. You also get more control over how you want to see the results. You can see them as a flat list, or enable grouping, to show by a mixture of project, folder and file. Or you can use ReSharper’s semantic knowledge of the file to group by namespace, type and member.
    Build Results window in ReSharper 2016.3
    Moreover, ReSharper Build now gets its own implementation of NuGet restore.
  • TypeScript, JavaScript and JSON support improvements:
    • Go to Implementation now works for TypeScript types too: you can jump from a base type or member to any of its implementations, bypassing intermediate steps in the inheritance chain.
    • A new quick-fix in TypeScript lets you quickly add type guards to disambiguate unresolved symbols.Surround with typeguard quick-fix
    • Structural Navigation (Tab or Shift+Tab) now works in JavaScript, TypeScript, and JSON.
    • Initial support for TypeScript 2.0.2 (“2.0 RC”): boolean, number and enum literal types.
    • The Encapsulate Field refactoring, which helps you quickly create a property for a field and optionally replace usages of the field, now works in TypeScript.
    • Optimized memory usage for TypeScript caches.
    • TypeScript support gets code completion for literal types, as well as a number of formatting fixes for JSX/TSX files.
  • Extended language injections. In addition to regular expressions and HTML, ReSharper 2016.3 lets you inject CSS and JSON in C#, JavaScript, and TypeScript strings. There are two ways to do so: you can either use the Mark as context action or you can use comments with the special syntax: //language=javascript|html|regexp|jsregexp|json|css
    Marking string literal as JavaScript
    In addition, ReSharper now automatically injects languages in certain known scenarios, such as injecting JavaScript into AngularJS templates, or CSS in jQuery's $[] indexer.
  • Redesigned inspections severity options page (Code Inspection | Inspection Severity).
  • ReSharper 2016.3 might now suggest you to use some of its features that can increase your productivity. In case it notices that some operation can be performed more efficiently, it would show a pop-up with a suggestion. You can enable the feature it suggests, read more about it, or disable further suggestions.
  • New options page (Code Editing | Third-Party Code), which allows adding C++, JavaScript, TypeScript, CSS, HTML and JSON files, folders and wildcards to be treated either as "skipped" or "library". ReSharper will completely ignore "skipped" files, and treat "library" files as read-only indexed for navigation, but with no inspections, quick-fixes and refactorings.
  • Assembly Explorer can now load assemblies directly from nuget.org or from any NuGet package source. Opening assemblies from NuGet package source
  • Stack Trace Explorer now lets you open external stack traces faster: if you copy a stack trace that contains symbols from the currently opened solution and then switch focus to Visual Studio, ReSharper will automatically load it to the Stack Trace Explorer without the need of pressing any shortcuts.

ReSharper C++


ReSharper C++ 2016.3 comes with 180+ fixes and the following set of larger improvements:

  • Visual Studio 2017 RC initial support: Just like the other tools in the ReSharper Ultimate family, ReSharper C++ 2016.3 can be installed into Visual Studio 2017 RC, but please note that in order to work with ReSharper C++ you should set Enable Faster Project Load to false under Tools | Options | Text Editor | C/C++ | Experimental.
  • New typedef refactorings. The Introduce typedef refactoring allows you to quickly create a typedef for the selected data type and replace this data type and all its occurrences with the newly created typedef. The Inline typedef refactoring does the inverse: it replaces an existing typedef with the actual data type.
    cpp_typedef_refactorings-still
  • Postfix completion and templates: Inherited from the mainline ReSharper, postfix code completion allows you to focus on your data, rather than the syntax. When you type a dot (.) or an arrow (->) after an expression, ReSharper C++ will suggest free functions that would accept that expression as the first parameter. ReSharper C++ 2016.3 gets some postfix template goodness as well. You can now quickly wrap an expression with one of the following templates: if, else, while, do, return, switch and foreach.
    Postfix templates in ReSharper C++ 2016.3
  • Catch support. In addition to Boost.Test and Google Test frameworks, unit testing assistance is now extended to support the Catch C++ test framework. Other unit testing improvements include support for Boost.Test in Boost 1.62 and improved performance on dynamic tests. Moreover, unit tests are now automatically updated for externally changed files.
  • C++ code analysis from the command line. Starting from this update, ReSharper C++ code inspections are available via InspectCode, a free command line tool that allows running ReSharper C++ inspections without opening a solution in Visual Studio.
    Command Line Tools for ReSharper C++ 2016.3
  • Enhancements in Quick Documentation: ReSharper C++ 2016.3 can display rich, syntax highlighted tooltips for C++ code elements. The tooltips will display function and variable types, as well as documentation. C#-style XML documentation comments are also sometimes used for C++ symbols. With ReSharper C++ 2016.3 they are correctly displayed in the Quick Documentation pop-up (Ctrl+Shift+F1) and in the quick info tooltip.
    Improved Quick Doc in ReSharper C++ 2016.3
  • Third-party code settings page now allows to exclude files from indexing, so ReSharper C++ will ignore "skipped" files, and treat "library" files as read-only.
  • Support for nested namespace definitions introduced in C++17 and a context action to use the new syntax for nested namespaces.
  • New options for C++ code formatter: "Spaces within parentheses in cast expressions", "Align chained method calls", "Align chained binary expressions" and "Place enumerators on new line".

Other tools in ReSharper Ultimate family also received their shares of improvements. First of all, dotCover 2016.3, dotTrace 2016.3 and dotMemory 2016.3 support .NET Core applications profiling and coverage and provide initial support for Visual Studio 2017 RC. Read on for the list of product-specific changes.

dotCover

  • Reworked coverage highlighting: new highlighting engine in dotCover 2016.3 reveals both coverage status and unit test status. A marker in the text editor shows red if any tests related to the current statement are failing, green if all tests are passing, and grey if there are no tests covering this statement.
    Updated coverage highlighting in dotCover 2016.3
  • New filtering options that allow easy selection of what code should be covered: all assemblies, everything except System and dotCover assemblies, or only solution assemblies without dependencies.
  • Multi-selection for nodes in the coverage tree.

dotTrace

dotTrace 2016.3 provides a wide set of improvements for its Timeline Viewer, for instance:

  • In dotTrace 2016.3, Timeline Viewer incorporates Subsystems feature from the Performance Viewer. To recap, each subsystem just groups calls made within a certain namespace or assembly. It is very handy for a quick estimation of how time in a particular call subtree is distributed among various components: user and system code, WPF, LINQ, collections, strings, and more.
    Subsystems in dotTrace Timeline view
  • New Debug Output filter that can be enabled to focus on what your application writes to the debug output, e.g. with the Debug.Write system method.
  • The new Native Memory Allocation event filter allows you to see what methods are making the allocations and analyze all issues related to native memory: potential memory leaks, issues with unmanaged components used by your managed code, and others.
  • The Call Stack window in dotTrace Timeline gets a whole bunch of enhancements in 2016.3. The Show system functions option that was helpful when analyzing methods’ own execution time is back again. The Top Methods list now shows not only methods own time, but total time as well. Moreover, now you can click on a method’s own or total time in Top Methods or Call Tree. This will apply a filter by a corresponding method or by a method and its subtree. The Top Methods list now follows your selection in Call Tree.

In addition there is a new Events window that shows you a list of events occurred in the profiled application: file operations, JIT, SQL queries, and more. Selecting an event will give details of the event, including timestamp, duration and call stack:
Events window in dotTrace 2016.3

dotMemory

dotMemory 2016.3 adds new inspections to check your application on finalized objects and objects queued for finalization. A new Finalizable objects inspection on the overview page shows such objects sorted by their type.
Finalizable objects inspection in dotMemory 2016.3

dotPeek

dotPeek 2016.3 introduces new ways to explore metadata of .NET assemblies. You can now dig through all metadata items (tables, blobs, strings, etc.) right from the Assembly Explorer, which enables you to automatically find and display usages of metadata table items, decode and display values of blob items and explore PE file headers.
Metadata explorer in dotPeek 2016.3
Same as elsewhere in the assembly tree, you can double-click metadata items to decompile and display the corresponding code.

Licensing

If you have an active subscription for ReSharper, ReSharper C++ or ReSharper Ultimate, we encourage you to upgrade to 2016.3 right away. If you are unsure whether your licenses are eligible to use with 2016.3, or if you need a formal quote or any other assistance, please get in touch with JetBrains sales anytime.


Get ReSharper Ultimate 2016.3

Exploring Intermediate Language (IL) with ReSharper and dotPeek

$
0
0

When compiling .NET languages, our source code is not translated into native code for the platform it will run on. Instead, code is translated into Intermediate Language (IL) which can then be executed on a variety of platforms and CPU types. On the target machine, the .NET runtime will translate this IL code to native code and execute it. Both ReSharper and dotPeek allow us to explore our source code and the (decompiled) IL instructions. We can use it to learn how the compiler translates our code into IL.

The IL viewer can be opened from a few places, like the ReSharper | Windows | IL Viewer menu or the context menu in the editor (Navigate | IL Code). In dotPeek, it can be opened from the Windows | IL Viewer menu. The tool window will display the decompiled IL for the class or method we currently have open in the editor. If no IL is displayed, make sure to compile the project first as the IL is read from the compiled assembly.

Intermediate Language (IL) viewer in ReSharper

When placing the caret on a symbol in the editor, the IL view is synchronized and matching code is highlighted. Synchronization also works in the other direction: when placing the caret on a block of IL code, the editor will jump to the corresponding code. This behaviour can be toggled using the Track Caret in Editor and Automatically Scroll to Source toolbar buttons. If we place the caret on a setter of an auto-property, we can see the IL view jump to that location. We can see the compiler magic in action: the IL code clearly shows the C# compiler generated a backing field for our property.

IL viewer displaying backing field for auto-property

The IL viewer helps us in understanding the IL code shown. There are comments in it, showing line and column numbers. For example, the set keyword in the editor is on line 10, columns 37-41. Types, members, type parameters, local variables, etc. are highlighted with distinct colors, and loops in our code are indented and decorated with comments:

Viewing a loop in intermediate language

But what do all these IL instructions mean? The IL viewer shows the description, taken from MSDN and the ECMA-335 standard (Partition III: CIL Instruction Set), when hovering the mouse over an instruction.

IL viewer displays explanation of intermediate language instructions

When using the IL viewer to optimize code, it’s always best to compile with the Release configuration. In Debug, the compiler optimizes our code debug-ability, while in Release the focus is on speed. Most of the optimization is done by the .NET runtime when the application is run, but there are differences in the IL as well.

For example, in Debug we can see there are a number of nop instructions in each method while in a Release build there are not. The nop instruction doesn’t do anything at runtime (except waste a CPU cycle), but it comes in handy when debugging as it allows the debugger to place a breakpoint on a line (instead of on a specific instruction). We can see this in action in a debug build: when placing the caret on the nop instruction, the editor jumps to the curly brace which is where we could place a breakpoint.

IL viewer nop instruction

(As an added bonus: there is more compiler magic in the above example. See that string “Hi there!” being concatenated from the original source code?)

When using the IL viewer in dotPeek, we can also configure it to display IL code as comments inside decompiled code. After enabling this in the options (under Decompiler | Show IL in comments), we can see this in action. Note that this only works for decompiled code – IL can not be displayed as a comment for code downloaded from external symbol servers.

Viewing IL code in comments (dotPeek)

The IL viewer in ReSharper and dotPeek can be used to learn about Intermediate Language and how our source code is compiled to it. When combined with a profiler, we can use it to optimize our code as well.

Check out our help for more information on the IL viewer and give it a try as part of ReSharper or dotPeek. We definitely want to hear your comments!

Using dotPeek to figure out why IIS crashed

$
0
0

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!

Opening a crash dump

The attached crash dump is a .dmp file, which means it could be a full crash dump or a minidump. The difference is in the amount of data contained in the dump: a full crash dump has all sorts of details, including the data that was in memory at the time of the crash. A minidump contains enough information to perform basic debugging operations, such as looking at stack traces, loaded modules and so on. File size is just over 40MB, so it’s definitely not a full crash dump.

Note: not sure how to capture a crash dump? Check automatically capturing crash dumps to have Windows create a crash dump whenever a given application crashes. Another option would be using SysInternals ProcDump – procdump processname -ma -e -x output_file.dmp will capture a dump when the application gives up.

Now where do we start? Exploring the contents of a dump file can be done with various tools, such as WinDbg (part of the Windows SDK) or using Visual Studio. The first offers die-hard functionality, but usually loading the crash dump in Visual Studio will provide us with enough information. Already halfway through our coffee, this is what we can see after opening the w3wp.exe.3192.dmp file:

Open minidump in Visual Studio

We can already see a number of things from the dump summary: operating system, CLR version, modules that were loaded, but more important: we can see an exception code and exception information. It looks like IIS crashed because of a stack overflow (“The thread used up its stack”). Interesting! Seems we may be able to finish this investigation before we’re out of coffee…

Analyzing the crash dump

In the Actions pane, we can Debug our dump file. What this will do is load all available information from the dump file, and provide that information via the tool windows we’re used to. Visual Studio can do this for managed code (.NET), unmanaged code, or “mixed”. If we Debug with Managed Only, we’ll be able to look at the stack trace at the moment the exception occurred, and we should be able to find out where this exception originated.

Debug with Managed Only

That all sounds great! Let’s click Break and see what we can find. In the Call Stack, we can see there are quite a number of recursive TelemetryService.CaptureReportStatistics calls – which would explain the stack overflow that crashed our server. That method is quite complex, so it would be good if we were able to pinpoint exactly where the recursive call comes from. Unfortunately, Visual Studio tells us “Symbol loading skipped”, which means all we can see in terms of code would be the disassembly.

View disassembly

Confusing, but we can fix that. All we need is debugger symbols, which can map the execution stack back to our source code. In other words: if we fetch the .pdb files for our application from the build server, we should be able to look at the exact line of code where the exception was thrown. Of course the symbols should match the exact build that was deployed at the time of the crash, but we have that information. Except…

No symbols (.pdb) are to be found on the build server! Only the assemblies (.dll) are there – not the symbols! (insert swearing)

That’s sad – we’re now unable to map the crash dump to our code, making it a much harder task to find that bad line of code. Time for a second coffee… Unless – could we use the dotPeek built-in symbol server to solve our quest?

Analyzing the crash dump using dotPeek symbol server

The IT folks provided us with a crash dump, and our build server still has the application assemblies. Let’s see if we can use dotPeek to provide us with debugger symbols and (decompiled) source code to find the root cause of our application crash.

dotPeek is a (free) decompiler which we can use to load an assembly and then look at its source code. A great feature is a built-in symbol server, which serves those decompiled sources so they can be used in WinDbg, Visual Studio or any other debugging tool being used. We can just launch it from the menu or the tool bar, but before doing that let’s look at the options first.

dotPeek symbol server options

To prevent dotPeek from decompiling all assemblies it can find, let’s limit it to only decompile assemblies we explicitly open in dotPeek. This should speed up symbol loading in Visual Studio afterwards, as we’ll just be decompiling the assemblies we are interested in. Also note the symbol server URL, http://localhost:33417/, as we’ll need that one in a bit.

dotPeek’s symbol server is configured and started, all that’s left to do is load our application assembly which was still available on the build server (File | Open…), and then configure the symbol server URL in Visual Studio. We can configure symbol servers and symbols loading from the options, on the Debugging | Symbols page. Depending on the scenario, other options can be configured here as well but for this one, we’re totally fine just providing our dotPeek symbol server URL.

Visual Studio symbol loading settings - add dotPeek

Here comes the magic: we can now load symbols for our application into Visual Studio. From the call stack, we can use the context menu Load symbols on the highest entry that shows our assembly name.

Load symbols from dotPeek

In the dotPeek Project/Pdb Generation Status tool window, we’ll see our assembly being decompiled and PDB’s being generated. And in Visual Studio, we can now double-click our stack frame and see the decompiled code that triggered the stack overflow exception and crashed our application!

View decompiled sources from dotPeek in Visual Studio

The morning started with a fresh coffee, a crash dump and no debuger symbols, and now we are able to see the exact line of code that crashed our application over night. dotPeek helped us in generating the .pdb file and decompiling source code from just our application’s assembly. Time for another coffee, and then fix the code…

Download dotPeek, our free .NET decompiler, and give it a try! We’d love to hear your feedback, as well as any great stories you may have on working with it.

The post Using dotPeek to figure out why IIS crashed appeared first on .NET Tools Blog.

Meet ReSharper Ultimate 2017.1!

$
0
0

This year’s first major release of ReSharper Ultimate is finally here with an ultimate support for Visual Studio 2017! We invite you to download the 2017.1 update and check all the long-awaited features, which you can read about in this post.
ReSharper_Ultimate__20171
Along with 600+ fixes in ReSharper and 110+ fixes in ReSharper C++ this release comes with the following major improvements:

Let’s dig into the details!

Visual Studio 2017 RTM support

ReSharper 2017.1 can now work with solutions loaded in a lightweight mode. When you use the Open Folder option, ReSharper sees all the files in the folder and supports .xml and .js file types. Move to Folder refactoring works in this mode.

ReSharper also respects the current target framework context, which is set by the drop-down at the top of the editor window. You’ll find more details about ReSharper’s support for the latest Visual Studio version in the video below:

C# 7 support

ReSharper receives a lot of new inspections, introduces new quick-fixes, and updates existing ones to support C# 7 language features.

We’ve extended ReSharper’s support for local functions and added two context actions that allow you to convert lambda expression or anonymous method into a local function and convert local function into a regular method. There’s also a new quick-fix that suggests converting a read-only delegate variable into a local function.

Join null check with assignment quick-fix has been implemented to support throw expressions. It makes the code more readable by combining the assignment, the null-coalescing operator, and throw. The existing context action Convert to ‘?:’ operator and the

.throw
postfix template also support C# 7 throw expressions.

Watch the video to see how ReSharper helps you use the new C# 7 features:

Unit testing

ReSharper’s unit testing works in both project.json- and .csproj-based projects in Visual Studio 2017 RTM. It discovers and runs MSTest and xUnit tests and supports code coverage and profiling as well as targeting multiple frameworks. NUnit tests that target .NET 4.x frameworks are supported. There’s also DataRow support for MSTest v2.
unit_test_targ_framework

Note that ReSharper currently doesn’t support continuous testing for .NET Core unit tests. This will be fixed in the next updates.

EditorConfig support and other code style improvements

Maintaining a consistent code style throughout your code bases is important since making the code more readable for all project contributors saves everyone’s time and even helps you avoid some errors. ReSharper 2017.1 provides several new features for keeping your code neat and clean. Watch the video for a quick overview of some of the updates and read on for more details.

EditorConfig support

EditorConfig offers a convenient way to share code style settings with colleagues who use different editors and IDEs. EditorConfig support in ReSharper 2017.1 is enabled by default. Below is an example of .editorconfig file settings supported by ReSharper:

root = true
[*]
# Most of the standard EditorConfig properties are supported
indent_size=2
max_line_length=100

# Most of Roslyn EditorConfig properties for Visual Studio 2017 are supported
csharp_space_between_parentheses=expressions, type_casts, control_flow_statements
csharp_new_line_within_query_expression_clauses=true

# Custom EditorConfig properties for every code formatting setting available in ReSharper options
resharper_csharp_brace_style=next_line
resharper_csharp_blank_lines_around_invocable=2

For more details on what EditorConfig properties ReSharper understands, refer to the Using EditorConfig help section. And watch the video to see how ReSharper uses EditorConfig to share formatting settings across your team:

Layered settings for tabs and indents

ReSharper’s layered settings feature is a great tool to maintain a consistent code style if most of your team members use ReSharper. Now it is extended with Tabs and Indents settings for all supported languages.

Tabs and Indents options page

Autodetection of the indent size and style

When you contribute to existing projects you may not have enough time to fine-tune code style settings. This is where a new ReSharper’s feature comes in handy. ReSharper now automatically detects and sets the indent size which is used in a file. This feature is disabled by default and can be enabled on the General Formatter Style ReSharper’s options page.

File formatting info

The new File Formatting Info window displays the sources of code style settings, including scopes and properties defined in all active

.editorconfig
files, the source of indentation settings and its value, and the status of indent autodetection.

Contextual configuration of formatting rules

The process of adjusting a new tool for your preferred code style can be tedious. To save your time, ReSharper offers contextual configuration of the formatting rules, which is now available in С#, C++, JavaScript and TypeScript. Select some code, press Alt+Enter and choose Format Selection | Configure to see formatting rules that affect only the selected code.

Code style, formatting and cleanup improvements

ReSharper’s Code Cleanup gets usability improvements. Now you can create and configure your custom task-specific profiles right in the Code Cleanup dialog box, simply by pressing Ctrl+E,C.
Code Cleanup dialog box

ReSharper applies its configured formatting rules to any code you paste. The Reindent option that affects only the indentation is set by default and you can change it on the Editor Behavior options page.

ReSharper 2017.1 introduces new code style settings for C# type members bodies, allowing you to choose between always using a body block, with braces, or using the expression format. ReSharper will mark any incorrect usage and provide a quick-fix to quickly rewrite to the correct style.

Expression body code style settings

C# code formatting engine has been significantly rewritten. We’ve fixed a lot of bugs and introduced new formatting options:

  • The new wrapping engine now handles the alignment correctly
  • Comma-first wrapping style is supported
  • Set spaces before and inside the parentheses of ‘nameof’
  • Choose preferred wrapping style for chained binary expressions
  • Configurable line breaks in a single ‘case’ statement

Finding usages of a specific interface or type becomes even more convenient with a new button in Find Results window to group by kind of usage. The filter was updated so that you can select specific usage occurrences. ReSharper also highlights broken or unfinished usages, which helps to determine what’s left to fix. Watch the video below to learn more about the updates to the Find Results window.

The Go to Everything and Go to Text popups support inline commands for advanced filtering of search results:
Filter in Go to Text

ReSharper’s Search & Navigation page adds a new option to open files in the preview tab from everywhere. This option is turned off by default.

Angular 2 templates syntax

ReSharper understands the following elements of Angular 2 templates syntax: template expressions, template statements,

NgFor
directive and template variables. Support is implemented for the
template:
property in Angular
@Component
decorator as well as for pure HTML referenced by
templateUrl:
property in
@Component
. Only relative paths are supported in
templateUrl
. For HTML pages, Angular markup is switched off by default and can be enabled in ReSharper Options (Code Editing | HTML | Editor).

The Rename refactoring works for component tags and for ‘foo’ in

[class.foo]
.
Angular 2 Rename refactoring

Component attributes receive support for the Go to Declaration (F12) command.

Code completion works for Angular attributes and component tags, as well as for

[attr.
,
[style.
and
[class.
.
Code completion for Angular component attributes

Note that Angular 1 is not yet supported. You can use the AngularJS plugin for code completion and live templates, if Support Angular markup in HTML pages is set to ‘None’ in ReSharper options.

TypeScript and JavaScript support

We implemented full support for TypeScript 2.1 and initial support for TypeScript 2.2.

In TypeScript 2.1 ReSharper now understands mapped and indexed types, object rest and spread properties, updated logic for literal types, configuration inheritance, untyped imports, combined types normalization, partially annotated signatures, and control flow analysis for implicit any and implicit any arrays.
Finding usages of a symbol in TypeScript 2.1

In TypeScript 2.2 ReSharper supports ‘object’ type, JSX spread syntax and deriving (extends/implements) from signatures/tuples/intersections/mapped types.

The Rename refactoring in TypeScript works faster for local symbols and gets a new option to disable search for dynamic usage of TypeScript symbols in JavaScript files via a checkbox in the Rename dialog.

The Generate Code menu gets a new option to generate properties or read-only properties for TypeScript classes. The Generate Overriding Members command now calls ‘super’ whenever possible.
TypeScript generate menu

TypeScript gets highlights and quick-fixes for unused imports in ES6 style imports.

You can now speed up your coding in JavaScript and TypeScript by taking advantage of postfix templates:
Postfix templates in JavaScript

ReSharper also improves relevance of code completion items in TypeScript and JavaScript; supports Navigate to Implementing Members in TypeScript and Navigate to Function Exits in TypeScript and JavaScript.

Code Analysis

ReSharper’s File Status Indicator (the small icon at the top of the Error Stripe) receives a new context menu. With a right-click on the icon, you can quickly toggle not only ReSharper code analysis but also identifier highlightings and Visual Studio code analysis (lightbulb and squiggles). If there are code issues in the current file, you’ll also see commands for navigating between issues of the highest severity level.

File Status Indicator

Note that for large files ReSharper suspends code analysis automatically. In this case, you’ll see a gray Pause icon in the Status Indicator.

ReSharper C++

ReSharper C++ 2017.1 introduces initial support for the Open Folder functionality and CMake-based projects in Visual Studio 2017. If you want to use ReSharper’s unit testing capabilities, you’ll need to configure a test run on the new C++ Tests page in ReSharper options. Please note that support for this kind of projects is still experimental — do let us know if you experience any problems!

Speaking about performance, ReSharper C++ significantly improves its memory usage, including both memory footprint after indexing and memory traffic during indexing. Moreover, the reindexing process should trigger less often during the normal workflow, as ReSharper C++ will not, by default, invalidate includers after preprocessing directives change in an included file.

We’ve enhanced inspections and code cleanup:

  • The Update file header cleanup task and a set of cleanup tasks to fix common code issues are added
    C++ code cleanup tasks
  • Control flow inspections are updated to handle class fields in addition to local variables and function parameters
    Inspections for uninitialised field in C++ class
  • The inspection Declaration and assignment can be joined is implemented, together with an accompanying quick-fix
    Join declaration and assignment quick-fix
  • Introduced several custom C++ 11 attributes that can be used to mark
    printf
    -style functions (RSCPP-15890), functions with side effects (RSCPP-18615), and guard classes for which the Unused variable highlighting should be suppressed (RSCPP-18764)

The set of postfix templates is extended with beg..end, new, var, const_cast, dynamic_cast, reinterpret_cast, static_cast, make_shared, and make_unique. You can configure the availability of C++ postfix templates and other settings on the Postfix Templates page in ReSharper options.
Postfix templates options

ReSharper C++ also improves code formatting:

  • Indent size and style can be auto-detected
  • Indenting of preprocessor directives is now supported
  • Adds new formatter options: Indent namespace members, Space after parentheses in cast expressions and Break line in simple ‘case’ statement

Last but not least, ReSharper C++ supports inline commands for results filtering in Go to Everything and Go to Text popups, and grouping by kind of usage in the Find Results window.

For more details about new ReSharper C++ features please refer to the What’s New page.

dotMemory, dotCover, dotTrace, and dotPeek

You can now attach the dotTrace and dotMemory profiler to running applications using drag and drop. Simply drop a special icon onto the application window you want to profile.
Profile running apps with drag and drop

We’ve introduced dotMemory Command Line Tool (dotMemory.exe) which is extremely helpful when you need to automate the process of gathering memory snapshots. The most basic tool usage scenarios are described in our Help.

Old-style highlighting in dotCover 2017.1 is back again and supports the updated logic to display both tests coverage and test results. There’s also an option to switch between markers and colored background or to display both.

Highlighting using colored background

Finally, we’ve implemented support for portable PDB in dotPeek. You can generate PPDB files, explore the contents of the Portable PDB associated with the assembly, and use sources embedded in the Portable PDB for navigation purpose.

Support for Portable PDB

That wraps it up. Please download a free 30-day trial of ReSharper Ultimate 2017.1 and check the new features and improvements.


Download ReSharper Ultimate 2017.1

The post Meet ReSharper Ultimate 2017.1! appeared first on .NET Tools Blog.

What’s new in the latest ReSharper 2017.2 EAP builds?

$
0
0

ReSharper 2017.2 EAPIt’s been four weeks and 7 EAP builds since we blogged about the ReSharper Ultimate 2017.2 EAP (Early Access Program) — time to have a thorough look at what’s new since!

Improved C# 7.1 support in ReSharper

With C# 7.1 around the corner, several new language features will come available. In our first ReSharper 2017.2 EAP, we already added support for the default literal. This newest EAP comes with support for a change in pattern matching with generic types, full support for async main, and supports tuple projection initializers.

Traditionally, when we would want to project a collection and then run LINQ over it, we’d have to resort to using either a helper class or an anonymous type for doing that projection. Not only that: if we just wanted the values for name and age, we’d have to allocate those explicitly as well:

var item = list
    .Select(p => new { p.Name, p.Age })
    .FirstOrDefault(p => p.Age > 21);

var name = item.Name;
var age = item.Age;

It looks verbose, and in fact there are several things happening under the covers that make this less than optimal. The compiler will generate an anonymous type which we are allocating on the managed heap (for every element in our list). We then have to allocate our name and age as well.

Granted, we could make this a bit more efficient by rewriting the example a little bit, or use C# 7.1’s tuple projection initializers. No anonymous type, less allocatons on the managed heap, and pleasant to read:

(var name, var age) = list
    .Select(p => (p.Name, p.Age))
    .FirstOrDefault(tuple => tuple.Age > 21);

Just like with the anononymous type, C# 7.1 infers the value tuple’s element names from the projection here. We’ve also added an inspection for checking redundant value tuple component names:

Inspection for checking redundant value tuple component names

Note if you want to use this, the ValueTuple type is required. It’s built into .NET 4.7, .NET Core 2.0, Mono 5.0 and .NET Standard 2.0. If you’re on another target framework, the System.ValueTuple package will have to be installed.

When using ReSharper’s Go to Everything (Ctrl+T) or one of the other navigation features, we can find types, type members, files, text, … It’s a powerful search engine, much like the ones we use to find things on the Internet! ReSharper’s search supports partial search terms, CamelHumps, misspellings, … In this EAP build, we made finding things in our projects even more powerful!

ReSharper now returns results when word order is incorrect. What was that method called again? Was it ValidUser() or UserValid()? No worries, Go to … will find it:

Navigation - Word order no longer matters to find results

Sometimes we do know the correct name of what we are looking for. However when that name is something more generic like Service, ReSharper may return a lot of search results…

Navigation for general word returns lots of results

Just like with Internet search engines, ReSharper now supports adding quotes to enforce an exact match:

Navigation supports exact matching using quotes

It’s also possible to use wildcard * or ? inside quotes for a more exact wildcard match. For example "*Service" will show UserService, IssueService, WorkItemService – as long as it ends in Service.

ReSharper – Inspections and quick-fixes

We’ve always had a code inspection that encourages using implicit types using the var keyword (or, depending on your code style, the other way around, using explicit types). This EAP now also applies this inspection and its corresponding quick-fix to out variables:

Use var for out variable

A couple of other inspections were added as well:

  • New code inspection that detects possibly unintended transformations from IQueryable to IEnumerable.
  • More context actions and quick-fixes supporting <inheritdoc/>. We now show a warning when <inheritdoc/> is used in an invalid context. There is also a suggestion for adding <inheritdoc/> when implementing or overriding members, as not adding it would hide documentation from the base symbol.

There are many ways of checking for null values and there are many preferences with our users for what style of null checks should be used when generating code. We have added a new options page, Null checking, where the priority of null checking patterns used by quick-fixes, context actions and code generation actions can be configured:

Null checking priorities

ReSharper – Web

A lot of work in the latest ReSharper Ultimate 2017.2 EAP build was done on the TypeScript side:

  • We improved support for mapped type members in Find Usages and in the Rename refactoring (Ctrl+R, R). For example, the name property from our IDog interface will be found in mapped and derived types now:
    Find usages in mapped type
  • For TypeScript 2.3, we added the contextual this for object literals and the --strict option.
  • TypeScript 2.4 enums with string values (or mixed string/number values) are now supported by ReSharper. And when referenced via a mapped type property, string values are correctly found/renamed.
  • TypeScript 2.4 support for generic inference from contextual type returns and generic contextual signatures.

We made several JSON improvements as well, for example when working in package.json. ReSharper knows about the file type and when we invoke Quick Documentation (Ctrl+Shift+F1) on a package name, we can see additional package details as well as links to the home page, tarball and issue tracker:

Quick Documentation in package.json

While we’re in package.json: completion for scoped NPM packages like “@angular/core” now also works:

package.json scoped packages completion

ReSharper – More!

When generating a constructor using the Generate action (Alt+Insert), parameters for that constructor can be made optional:

Make parameters optional

ReSharper Build reduces the time it takes to build our solution by applying heuristics to only build projects that need updating. This latest ReSharper Ultimate 2017.2 EAP build adds .NET Core support to ReSharper Build.

dotPeek

Several other improvements and fixes went into dotPeek. We now have proper decompilation of assemblies that used nameof() in their original source code. We made various improvements and fixes for displaying and navigating in IL code.

SourceLink is a new way of embedding infomation about an assembly’s original source code into the PortablePDB format. Both our standalone decompiler as well as ReSharper now support SourceLink: when an assembly is compiled with the Roslyn compiler flag /sourcelink:<file> (and a source_link.json is generated using, for example, Cameron Taggart’s SourceLink tools), dotPeek will now download sources referenced in the PortablePDB or use the embedded source files when available.

Speaking of PortablePDB – we added some more features to the Metadata tree:

  • Navigation to embedded sources
  • Navigation to source_link.json
  • Display of embedded CustomDebugInformation blobs of the following kinds: AsyncMethodSteppingInformation, TupleElementNames, DynamicLocalVariables, EditAndContinueLocalSlotMap, EditAndContinueLambdaAndClosureMap

PortablePDB metadata with source_link.json

The Go to String (Ctrl+Alt+T) navigation is now integrated into Go to Everything (Ctrl+T). Additionally:

  • It searches for strings in attributes, making it easier to find occurences of a given string in a (decompiled) code base.
  • Improved presentation of long and multiline strings.
  • When searching for a substring in such string, dotPeek now navigates to the substring position instead of jumping to the start of that long or multiline string.

dotTrace and dotMemory

We have been working hard improving the profiler engine powering both dotTrace and dotMemory. First of all, we added support for profiling .NET Standard 2.0 applications, on our own machine or remote.

The profiler core engine now supports setting a directory where temporary files, diagnostics and snapshots are stored. This is especially handy when profiling remote applications: if the profiler has no write access on the system drive, dotTrace and dotMemory can still profile the application.

Several bugfixes went in as well. We fixed a crash of the CLR running the application being profiled when a forced garbage collection happens during garbage collector initialization. A deadlock when the profiler shuts down during forced garbage collection was fixed, too.

ReSharper C++ improvements

A number of changes and new features went into ReSharper C++, including performance improvements – for example on switching build configurations.

Let’s have a look at what else is new.

Code analysis and quick-fixes

An analyzer was added to check when a local variable can be defined as a constant. ReSharper C++ will inform us about that and display a suggestion in the editor.

From the ReSharper settings under Code Editing | C++ | Naming Style, we could already edit the naming styles for generating new entities. We now added an inspection that hints when existing code does not conform to these naming styles. The inspection can be enabled or disabled as well:

Naming Styles in ReSharper C++

An inspection for unused return values shows us when we forgot to return the value. Using a quick-fix, ReSharper C++ can solve things for us:

cpp-unused-return-value

Other inspections and quick-fixes that were added:

  • A quick-fix to add std::move when cannot bind rvalue reference to lvalue.
  • An inspection that shows unused entities with internal linkage.
  • Quick-fix to add an #ifndef/#define/#endif include guard for the Missing include guard inspection.

Editor formatting

Here’s an overview of enhancement to the editor formatter:

  • Support for line wrapping.
  • The formatter supports Clang-format style configuration files (in addition to EditorConfig).
  • Several code formatting settings were added:
    • Option to insert line breaks after template headers and function return types.
    • Options for indentation of parentheses in function declarations, method calls, if/while/for statements.

Language support

The ReSharper C++ team continuously works on adding additional support for the C and C++ languages. For example:

  • Find usages (Shift+F12) and the Rename refactoring (Ctrl+R, R) are now supported for user-defined literals.
  • Anonymous nested structures are now supported in C code .
  • Virtual methods that can be overridden are shown in completion inside class bodies.
  • The type traits std::is_trivially_constructiblestd::is_trivially_copy_assignable
    and std::is_trivially_move_assignable are now supported.
  • More C++17 support!
    • using for attribute namespaces.
    • Code inspections honor [[nodiscard]] and [[maybe_unused]] attributes.

That about wraps it up. We’re looking forward to any feedback you may have on the latest builds of ReSharper, ReSharper C++, dotCover, dotTrace, dotMemory, dotPeek, as well as various command-line packages included in this EAP.

Download the latest ReSharper Ultimate 2017.2 EAP and give it a try!

The post What’s new in the latest ReSharper 2017.2 EAP builds? appeared first on .NET Tools Blog.

ReSharper Ultimate 2017.2 is released

$
0
0

Please welcome ReSharper Ultimate 2017.2 RTM: this year’s second major update to a set of JetBrains .NET tools that includes ReSharper, ReSharper C++, dotCover, dotTrace, dotMemory, and dotPeek.

ReSharper Ultimate 2017.2

Highlights of ReSharper 2017.2 include:

  • Support for .NET Core 2.0 in Visual Studio 2017 15.3. Your favorite code inspections, navigation actions and refactorings are now available in .NET Core 2.0 projects, including the new ASP.NET Core Razor Pages projects. Lots of .NET Core unit testing issues have been resolved along the way, and you can now run xUnit.net, NUnit or MSTest in your .NET Core 2.0 projects.
  • Improved support for C# 7.0 including pattern matching and out variables, as well as initial
    support for C# 7.1
    : the default literal, tuple projection initializers, async main and pattern matching with generics.
  • New code inspections around IEnumerable usage and XML documentation inheritance.
  • Null checking preferences that let you tell ReSharper how you want it to introduce null checks when it generates code.
  • Multiple navigation improvements, including search in any order, exact search, textual search in Go to Everything, and navigating to nearby files.
  • TypeScript, JavaScript, JSON and Angular support improvements, including code completion performance, TypeScript 2.3 and 2.4 features, new kinds of language injections and new TypeScript refactorings.
  • Interactive tutorials to help you get started with ReSharper’s functionality or get up to speed with features in new ReSharper releases.

Other ReSharper Ultimate products have received their share of improvements as well:

  • ReSharper C++ 2017.2 is mostly focused on better language understanding and supporting features from C++11 and C++17. Other changes include enhancements in code formatter and navigation, improved performance, new code inspections and quick-fixes.
  • dotCover 2017.2 improves code coverage performance, starts to support MSTest unit tests in .NET Core applications, and introduces a new kind of markers for coverage and test status indication.
  • dotTrace 2017.2 enables profiling child processes in unit tests, introduces Timeline profiling from the command line, and learns to show navigation paths in the Call Tree view.
  • dotMemory 2017.2 enables importing raw Windows memory dumps and analyzing them using its full range of features.
  • dotPeek 2017.2 supports SourceLink and extends its feature set in terms of navigation and search.

Learn more about the new features and download ReSharper Ultimate 2017.2.

An active subscription to ReSharper, ReSharper Ultimate, ReSharper Ultimate + Rider or All Products pack makes you immediately eligible for this update. If you need to renew your subscription, discuss licensing or receive a formal quote, please get in touch with JetBrains sales anytime.

The post ReSharper Ultimate 2017.2 is released appeared first on .NET Tools Blog.

Meet ReSharper Ultimate 2017.3

$
0
0

We are happy to announce we’ve published a new major release of ReSharper Ultimate bundle: please say welcome to ReSharper Ultimate 2017.3.
Meet ReSharper Ultimate 2017.3

Apart from 300+ fixed issues, ReSharper 2017.3 includes both long-awaited and unexpected features that will hopefully help you in your day-by-day routine:

  • Visual Studio debugger extensions, such as searchable DataTips, values displayed right in the text editor, navigation to breakpoints, and creating breakpoints from the Find Results tool window.
  • Performance guide for fine-tuning both ReSharper and Visual Studio settings to improve the overall IDE responsiveness in one place.
  • Major updates to code formatting engine: support for aligning code in columns and other new code styles, as well as a way to disable or enable formatting for selected blocks of code with comments, or for files with EditorConfig.
  • Improved Extract Method refactoring to support creating a local function and returning a value tuple instead of out parameter.
  • Links to external resources in to-do items.
  • New C# typing assists.
  • Find Usages/Call Tracking presentation update.
  • Enhanced Preview pane in tool windows.
  • Support for tuples and <inheritdoc/> in VB.NET.
  • Ctrl+Shift+Click action to show the result of ReSharper Go to Declaration in Visual Studio Peek preview overlay which now works in Visual Studio 2015 and 2017 in addition to 2013.
  • TypeScript support improvements, such as better performance when using type guards, auto-completion for imported paths, and tracking changes in npm modules.
  • New code generation action to create deconstructor from selected fields/properties for C# 7.

Other ReSharper Ultimate tools have been updated as well:

  • ReSharper C++ 2017.3 brings the same debugger features as the mainline ReSharper, improves language understanding including the C++17 and C++14 specification, integrates Clang-tidy, adds more code inspections, context actions, and formatting options, and supports Catch2 in its unit test runner.
  • dotTrace 2017.3 provides async/await and Tasks support in Timeline profiling mode, adds forecasting performance to Timeline Viewer, and introduces viewing backtraces in methods and subsystems.
  • dotCover 2017.3 supports Continuous Testing for .NET Core tests, improves ‘Show Covering Tests’ popup, introduces new document coverage summary indicator in ReSharper marker bar, and brings C# 7 local functions support.
  • dotPeek 2017.3 introduces “Tools | Show PDB Content…” menu action, and adds “Open from NuGet Packages Cache” dialog to Assembly Explorer tab.
  • dotMemory 2017.3 improves object search and receives a solid set of bug fixes.

Learn more about new features and download ReSharper Ultimate 2017.3.

The post Meet ReSharper Ultimate 2017.3 appeared first on .NET Tools Blog.


ReSharper Ultimate 2018.1 Early Access Program kicks off

$
0
0

A month ago we released ReSharper Ultimate 2017.3.2 with lots of fixes. We didn’t waste any time and worked hard this month to prepare something new for you again. Today we open the ReSharper Ultimate 2018.1 Early Access Program.

ReSharper Ultimate 2018.1 Early Access Program kicks off

Here is a list of notable changes you may observe after installing the first EAP build:

  • Comment position on the Comment code action now depends on the setting Don’t indent comments started at first column.
  • Pressing Enter inside a line comment now splits a single comment into two comments.
  • Exporting from the Inspection Results window respects the selected filters.
  • Find code dependent on module adds support for binary references.
  • Promise classes are now correctly resolved in TypeScript projects.
  • Several performance fixes.
  • Lots of fixes in code analysis (RSRP-467698, RSRP-467710, RSRP-468333, RSRP-429534).
  • ReSharper C++ adds Debug step filters to specify functions, which should be automatically stepped over during debugging. It also adds a new typing assist to remove trailing whitespaces on Enter, and a new inspection to find usages of deleted functions.
  • dotMemory now displays virtual collectible references as Collectible instead of Unresolved.
  • dotPeek adds support for the decompilation of dictionary initializers and null-conditional operators. It has also learned to show the metadata subtree (headers / directories) for unsupported files and file description for an assembly in the Properties toolwindow.

For a full list of issues fixed in the first EAP build, please refer to EAP notes for ReSharper and ReSharper C++.

Download ReSharper 2018.1 EAP now and give it a try!

The post ReSharper Ultimate 2018.1 Early Access Program kicks off appeared first on .NET Tools Blog.

ReSharper 2018.2 will require .NET Framework 4.6.1

$
0
0

TL;DR: ReSharper 2018.2 will require having .NET Framework 4.6.1 installed.

Starting with the next ReSharper 2018.2 release, we will require having .NET Framework 4.6.1 installed on your machine. Earlier versions of ReSharper will continue to work on .NET Framework 4.5.

Why is this changing?

With the .NET Framework evolving rapidly in the past years and Microsoft having stopped support for .NET Framework 4, 4.5 and 4.5.1 over two years ago, updating the required .NET runtime for ReSharper is a logical next step.

Newer versions of the .NET Framework come with numerous improvements, such as performance, security and Windows Presentation Foundation updates. The NuGet client SDK used by ReSharper also requires .NET Framework 4.6 or higher. Making use of the newer, modern runtime brings along these improvements and will greatly benefit our users and opens up new possibilities!

Thanks to this upgrade, the ReSharper codebase can now target .NET Standard 2.0 (and .NET Core), so that for example our Command Line Tools and Remote Profiling Tools will eventually no longer require a full .NET Framework installation at all. This also helps our (non-UI) tools to run on Linux and Mac OS X with better quality. The future is bright!

What does this mean for me?

Older operating systems, such as Windows XP, Windows Vista, Windows Server 2003 and Windows Server 2008 Service Pack 2 will no longer support ReSharper 2018.2 and newer. Earlier ReSharper versions will continue to work.

If you are on a modern operating system or are using Visual Studio 2015 or newer, the .NET Framework 4.6.1 is already installed and will support working with ReSharper 2018.2.

Will I need to retarget my own projects as well?

No. The .NET Framework 4.6.1 runtime is only required to be able to run ReSharper.

Being a productivity tool for .NET developers, we strive for compatibility with as many versions of the .NET Framework and Visual Studio as possible. Projects targeting e.g. .NET 3.5 or .NET 4.5 will still be supported in ReSharper 2018.2, and continue to benefit from rich code editing and code generation features, code analysis and quick-fixes, powerful refactorings, excellent navigation and more!

Download ReSharper now and give it a try!

The post ReSharper 2018.2 will require .NET Framework 4.6.1 appeared first on .NET Tools Blog.

ReSharper Ultimate 2018.1 is available for download

$
0
0

Today we are ready to introduce the first major release of ReSharper Ultimate family for this year – please welcome ReSharper Ultimate 2018.1!

ReSharper Ultimate 2018.1 is available for download

ReSharper gets a significant number of bug fixes (based on more than 260 requests) and a bunch of features and improvements as highlighted below:

  • C# 7.2 support has been finalized by adding the missing pieces to the puzzle: non-trailing named-arguments, private protected access modifier, leading underscores in numeric literals, in parameter, ref readonly returns and locals, readonly struct type, ref struct type, and conditional ref operator. Now, if your code follows the latest language version – there’s no more red code!
  • Navigation features improved: Go to File Member gets a new grouping for better presentation of multiple classes in a single file; Recent Files shows Go to File underneath its search results; Search Everywhere adds a Unit Test filter; and Find Usages now has a disambiguate dialog with a suggestion to look for default constructor usages.
  • The code formatting engine was given a huge update – inspections and quick-fixes for formatter-related problems, including indenting, line breaks, spaces, and blank lines, can now be observed and fixed directly in the code editor.
  • C# 7.x support has been improved by adding more options to code style, inspections, quick-fixes, and context actions for deconstruction and discards.
  • .editorconfig file can now be used to set inspection severities for any scope: for the whole solution, for a project, or even for a specific file. Also, ReSharper now reads code style settings (Code Editing | C# | Code Style) from .editorconfig files and extends its support for Roslyn language conventions. In addition, the inspection severity settings can be read from a project’s DotSettings file.
  • Value Tracking, the Introduce variable refactoring, and the .foreach/.var postfix template now support C# 7.x features.
  • In the same way that ReSharper handles Roslyn coding conventions, it will also handle StyleCop rules directly from StyleCop configuration files.
  • A couple of handy features around code comments have been added.
  • ReSharper Build engine now supports Pre-/Post-build tasks.
  • The option Remember last search is now enabled by default.

As far as other ReSharper Ultimate tools are concerned:

  • ReSharper C++ 2018.1 comes with two new major features: Debug Step Filters which lets you avoid stepping into specific functions during debugging, and Includes Analyzer which helps you investigate the dependencies between the header files that affect compilation time. Other updates include a redesigned Go to File Member dialog, new code inspections, and a command-line tool to perform code cleanup.
  • dotCover 2018.1 has redesigned two of its vital features: continuous testing mode can be turned on for any unit test session instead of running a separate continuous testing session, and coverage information is now shown in a separate Unit Test Coverage window, instead of a per-session Coverage tab. dotCover console runner gets the ability to cover arbitrary managed processes and services (analyze-everything, analyze-service) and send the get coverage snapshot command to the running instance of the console tool. And last but not least, coverage analysis performance has been improved.
  • dotMemory 2018.1 comes with many minor user interface improvements. The most significant change is the reworked Analysis Subject panel. Now, it’s much easier to navigate your analysis path.
  • dotPeek 2018.1 can now decompile the async Main method, dictionary initializers, null-conditional operators, and await inside catch/finally blocks.
  • dotTrace 2018.1 has received a set of bug fixes and minor performance improvements.

Learn more about the new features and download ReSharper Ultimate 2018.1.

The post ReSharper Ultimate 2018.1 is available for download appeared first on .NET Tools Blog.

ReSharper Ultimate 2016.1.1 is released

$
0
0

You can now download ReSharper Ultimate 2016.1.1, which includes a set of bug fixes and improvements to ReSharper and ReSharper C++.

Highlights of this update

Note that dotCover, dotTrace, dotMemory and dotPeek 2016.1.1 are basically all compatibility updates that have not received any considerable changes by themselves.

If you are interested in the improvements described above, please download and install ReSharper Ultimate 2016.1.1.

The post ReSharper Ultimate 2016.1.1 is released appeared first on .NET Tools Blog.

ReSharper Ultimate 2016.1.2 is here

$
0
0

We have just released a fresh bug fix update to our tools and welcome you to download ReSharper Ultimate 2016.1.2.

Major highlights

dotCover, dotTrace, dotMemory and dotPeek 2016.1.2 are updated solely for compatibility reasons and don’t include significant changes.

In case you were affected by the issues mentioned above, we recommend that you download and install ReSharper Ultimate 2016.1.2.

The post ReSharper Ultimate 2016.1.2 is here appeared first on .NET Tools Blog.

ReSharper Ultimate 2016.2 EAP: Builds 5 and 6

$
0
0

Another couple of ReSharper 2016.2 EAP builds has appeared since our last post. If you haven’t done it yet, it’s the right time to download and try out new features and fixes. In these builds, we have fixed a numbers of issues as we normally do, improved support for the recently released .NET Core 1.0 and ASP.NET Core 1.0, and below are descriptions of some new features.

HTML analysis inside .cs, .js, and .ts files

If you wanted to cut corners and define some constant piece of HTML right in a string literal, you could miss some errors there… but not any longer. In C#, JavaScript or TypeScript, you can now use the Make HTML here action to enjoy syntax highlighting, error detection and other HTML goodies right inside the string literal:

Injecting HTML inside a string literal

New decompiler features in ReSharper and dotPeek

  • The code that the IL Viewer displays becomes more readable: types, members, type parameters, local variables, etc. are highlighted with distinct colors; loops in your code can be distinguished by corresponding indents and comments:

    IL viewer with highlighting and formatted loops

  • The arsenal of visual dependency analysis tools (Type Dependency Diagram and Project Dependency Diagram) is now extended with the new Assembly Dependency Diagram. You can invoke it on selected assemblies in the Assembly Explorer and study how those and referenced assemblies are linked with each other:

    Hierarchy of assembly references

ReSharper C++

  • The latest 2016.2 EAP build includes an important optimization of C++ code analysis. For example, this optimization makes indexing (first opening) of the Unreal engine project several times faster.
  • Auto-completion in C++ now also suggests symbols that are not included in the current file. Of course, the corresponding #include directives are added automatically:

    Import suggestions in C++ auto-completion

  • There is a new code inspection that warns you about missing include guards in your header files. As a quick-fix, it lets you automatically add #pragma once directive.
  • And there are also a couple of new code formatting options: a line break in a member initializer list, and a space between closing angle brackets in template arguments (for conformance with pre-C++11 compilers).

You are welcome to download the latest 2016.2 EAP build. Should you come across any problems, please let us know in ReSharper, ReSharper C++ or dotPeek issue trackers.

The post ReSharper Ultimate 2016.2 EAP: Builds 5 and 6 appeared first on .NET Tools Blog.

ReSharper Ultimate 2016.2 Release Candidate

$
0
0

Ladies and gentlemen, you can now download ReSharper Ultimate 2016.2 Release Candidate!

All new features and improvements that we have revealed and blogged about in recent months are now in pre-final state.

This includes things as exciting as textual search via Go to Text, structural navigation with Tab, and warnings in solution-wide analysis, as well as more mundane fixes, of which there are plenty.

If you still have pressing issues with 2016.2 RC or if something that we assume fixed doesn’t actually solve your issues (btw, everyone who has been unhappy about Move to Folder behavior with TFS, we’re waiting for you to confirm a fix), this is probably your last chance to let us know via comments here, or better yet, via issues in respective product trackers: ReSharper, ReSharper C++, dotTrace, dotMemory, dotPeek or dotCover.

The post ReSharper Ultimate 2016.2 Release Candidate appeared first on .NET Tools Blog.


ReSharper Ultimate 2016.2 is here!

$
0
0

We at JetBrains have just finalized an update to the ReSharper Ultimate family, and we welcome you to download ReSharper Ultimate 2016.2 RTM!
ReSharper 2016.2 is released
Read on for the main highlights of this release:

ReSharper

In addition to 750+ fixes, major highlights of ReSharper 2016.2 are the following:

  • Support for ASP.NET Core 1.0 and .NET Core 1.0 projects, which means that ReSharper now correctly resolves project references and provides its core set of features (code inspections, code completion, navigation, search and refactorings) in projects of this type. Please note that unit testing is not yet supported .NET Core projects. This is going to be addressed in upcoming updates.ASP.NET Core support
  • Structural navigation, a new feature informally referred to as “Make Tab Great Again”. You can now use Tab and Shift+Tab keys to quickly move the text selection to the next or previous code element without having to use the cursor keys, letting you quickly navigate to the next important piece of code you need to edit.
    Structural Navigation in ReSharper 2016.2
    Tab will certainly continue to handle template expansion, and will also indent (and Shift+Tab will outdent) when the text caret is placed at the start of a line. However, when the text caret is within a code element, Tab and Shift+Tab will start navigating and selecting the structure of your code. You can change this behavior in ReSharper options anytime.
  • Go to Text navigation (Ctrl+T,T,T) lets you quickly find and navigate to any text in source and textual files. This new feature uses trigram indexing to make text search blazingly fast. Similar to other navigation commands, if there are too many matching items you can hit + on the numeric keypad to explore results in the Find Results window.
    Go to Text command in ReSharper 2016.2
  • Warnings in solution-wide analysis help you constantly keep track of all warnings in your solution: both actual compiler warnings and ReSharper’s inspections with the Warning severity level. The status bar indicator can now stay orange while there are unresolved warnings. It is still up to you whether to enable the solution-wide analysis and whether to include warnings into it: just right-click the status bar indicator to configure everything to your liking.
    Warnings in solution-wide analysis
  • Marking references as used at runtime to exclude them from code cleanup performed by the Optimize References and Remove Unused References features.
  • New C# typing assistant features, such as auto-replacing MethodName(.) with MethodName()., and correcting mistyped @$ prefixes for verbatim string interpolations.

  • Rearrange code improvements. For example, it is now available in interpolated string inserts, and in expressions with 3 and more operands; Greedy brace feature now works for opening brace, braces of types and namespace declarations.
  • Reworked surround templates. If you need to surround a piece of code with a template, just select the code, and type in the name of a template you need: no extra shortcuts required. In other news, a single template can now be used for for creating code (as a live template) and for surrounding existing code (as a surround template).
    Surround templates in completion lists
  • A new refactoring to move members to another part of a class. You can also use the refactoring over a region to move all region members into a new file with a name inferred from the region name.
  • New quick-fixes and context actions that help simplify string interpolation inserts, revert the order of iteration in simple for loops, or fix awaiting of a void method by making it return Task. (By the way, existing quick-fixes that make methods async now suggest using Task instead of void.) In other news, you can now check all parameters of a method for null (or empty strings) with a single context action. You can even uncomment or even delete a comment via Alt+Enter. Context action to add guard clauses for all arguments at once
  • Assembly dependency diagram that visualizes how assemblies are interrelated via references.
  • HTML analysis inside string literals in .cs, .js, and .ts files, which can be enabled with the context action or with a comment /*language=html*/ ahead of a string literal. You can now use the Mark HTML here action to enjoy syntax highlighting, error detection and other HTML goodies right inside the string literal.
  • Regular expression assistance in string literals can now also be enabled with a comment /*language=regexp|jsregexp*/ before the string literal. Language injection with comments
  • JSON value helpers allow you to tell ReSharper to provide code completion or validation for your own JSON files. You can add a helper in the JSON Value Helpers options page, matching based on a filename mask and/or schema match. Custom JSON schema catalogs can also be added in JSON options. These can be either a file, or a URL, which will be downloaded in the background, and periodically updated. JSON value helpers
  • Support for the <inheritdoc/> tag in XML documentation comments, which is a good alternative to copying documentation from base types/members to derivatives.
  • C# formatter improvements: new options for indenting of parentheses and code inside them; for controlling spaces before and after ++ and -- operators as well as before and inside parenthesis of checked and default expressions.
  • Improved IL Viewer: types, members, type parameters, local variables, etc. are contextually highlighted; loops in your code can be distinguished by indents and comments. IL viewer with highlighting and formatted loops
  • String interpolation suggestions, quick-fixes and context actions are now available for VB.NET. Context actions to convert a string literal to an interpolated string, or insert an interpolated argument are here as well.Concatenation to interpolation in VB.NET
  • Improved CSS support: ReSharper’s code inspections, code completion, navigation, search and refactorings are now also available for CSS variables. In addition, several fixes for better spec handling are introduced. CSS variables support in ReSharper 2016.2
  • Extended TypeScript/JavaScript support including:
    • Generating code with code completion in TypeScript (ctorf/ctorp, overrides, lambdas).
    • Improved Find Usages and Rename for union and intersection types.
    • Full support of TypeScript 2.0.0 features, including this for functions, control flow aware type guards, path mappings, optional class members, the never type.
    • If you have an abstract class implementing an interface, you can now generate missing members abstract, using the Generate action (Alt+Insert) or a quick-fix.
    • Go to Declaration and Find Usages work correctly when dealing with type aliases.
  • The Process Explorer window (ReSharper | Windows | Process Explorer), which was previously only available in dotPeek, provides you with the list of currently running processes, allows exploring their modules and decompiling those that are .NET assemblies.
    Process Explorer window in ReSharper 2016.2

ReSharper C++

ReSharper C++ 2016.2 comes with 200+ fixes and a set of larger improvements:

  • Inline Variable Refactoring is now available in ReSharper C++.Inline Variable refactoring for cpp
  • Quick Documentation pop-up appears in ReSharper C++ 2016.2. It can display documentation from Doxygen comment blocks, and even if there is no Doxygen documentation for a symbol, it will display the symbol signature. Quick documentation popup in ReSharper C++
  • New code inspections and quick-fixes: There is a new code inspection that warns you about missing include guards in your header files. As a quick-fix, it lets you automatically add #pragma once directive. Another new inspection detects a missing default case in a switch statement with a corresponding fix to add it.
  • Warnings about usages of classes and functions marked with the [[deprecated]]/__declspec(deprecated) attribute. ReSharper showing highlight for deprecated C++ code
  • Improved C++14 support: variable templates and decltype(auto).
  • Support of the [[noreturn]]/__declspec(noreturn) attribute in control flow analysis.
  • New code style preferences for #include directives in generated code.
  • Code style for default pointer initializer. You can specify 0, nullptr or NULL as the preferred initializer in the options, and ReSharper C++ will use it in generated initializers.
  • Automatic completion in C++ can now suggest symbols that are not included in the current file. The corresponding #include directives are added automatically.Import suggestions in C++ auto-completion
  • You can now generate documentation comments for C++ declarators, classes and macro definitions with a context action. The comment stub can be customized by editing the ‘doc’ live template that ReSharper uses for generation.
  • When your caret is on one of the exit points of a function/loop/switch (return, throw etc.), ReSharper C++ will automatically highlight all other exit points.
  • New formatter settings for single-line functions and lambdas, blank lines around single line function definitions, line breaks before member initializer list, and space between closing angle brackets in template arguments (for conformance with pre-C++11 compilers).
  • The mock function generator now supports the Trompeloeil framework.
  • Completion, usage search and rename of symbols in Doxygen comments.
  • __RESHARPER__ macro that allows you to detect when ReSharper is parsing your source code and, if necessary, disable ReSharper’s preprocessor for some code.
  • Performance improvements in indexing and code analysis.

Other ReSharper Ultimate tools have received their shares of improvement as well.

dotCover

  • dotCover 2016.2 lets you exclude auto-properties from coverage analysis with Hide auto-properties option.
  • Filtering processes from console runner allows you reduce unnecessary overhead by excluding child processes that are irrelevant to the coverage analysis. To enable a process filter, use the /ProcessFilters parameter. For example, /ProcessFilters=+:prA;+prB will exclude all processes except prA and prB; /ProcessFilters=-:prC will exclude prC from the coverage.

dotTrace

Recursive call stacks can be deep and difficult to analyze. Previously, Timeline Viewer would show call stacks “as is”, i.e recursive calls were simply shown as they were called: one after another in the stack trace, which would lead to long scrolling. With dotTrace 2016.2 Timeline Viewer, you can easily fold such calls to streamline stack analysis.Recursive call stack in dotTrace Timeline Viewer 2016.2

dotMemory

dotMemory now allows you to compare memory snapshots stored in different workspaces: that is, collected in different profiling sessions. This can be useful to check how particular changes in code affect your application’s memory usage. All you need are two snapshots taken before and after making the changes.
Cross-workspace snapshots comparison in dotMemory 2016.2
For the full list of fixes in dotMemory 2016.2 please refer to release notes.

dotPeek

  • With dotPeek 2016.2, the IL Viewer displays code in a more readable manner: types, members, type parameters and local variables are contextually highlighted; loops in your code can be distinguished by indents and comments.
  • dotPeek 2016.2 adds Assembly Dependency Diagram to the existing visual dependency analysis tools. You can invoke it on assemblies selected in the Assembly Explorer and explore how the assemblies are referencing each other. Assembly_Hierarchy

Licensing

If you have an active subscription for ReSharper, ReSharper C++ or ReSharper Ultimate, we encourage you to start using 2016.2 straight away.

As we have just recently switched to subscription licensing, some of you may still use older, pre-subscription licenses. If you are not sure whether your licenses are eligible to use with 2016.2, or if you need a formal quote or any other assistance, please get in touch with JetBrains sales anytime.


Get ReSharper Ultimate 2016.2

The post ReSharper Ultimate 2016.2 is here! appeared first on .NET Tools Blog.

ReSharper Ultimate 2016.2: video and code samples

$
0
0

We have released ReSharper Ultimate 2016.2 last week, which introduced a whole lot of updates across ReSharper, ReSharper C++ and dotPeek, as well as a bunch of fixes and improvements in dotTrace, dotCover, and dotMemory.

In case you feel that reading a multi-screen list of what’s new is too daunting, our old friend Hadi Hariri has come up with an under-10-minutes summary video:

In the video, Hadi uses a lot of code samples from a special repository that we maintain in order to illustrate changes in new ReSharper Ultimate versions in a very code-centric way.

If you like to learn what’s new in the latest ReSharper by playing with code that exposes the recent improvements, go ahead and clone this repository, which you can navigate using ReSharper’s own To-do Explorer.

The post ReSharper Ultimate 2016.2: video and code samples appeared first on .NET Tools Blog.

ReSharper Ultimate 2016.2.1 is available

ReSharper Ultimate 2016.2.2: bug fix to a bug fix

$
0
0

Sometimes, a bug fix release needs a bug fix of its own.

That’s what happened to ReSharper this time: yesterday’s 2016.2.1 release introduced a bug whereby running Code Cleanup would incorrectly introduce access modifiers ahead of static constructors (RSRP-460771).

If you’re affected by this bug, please download and install ReSharper Ultimate 2016.2.2, and apologies for making you update twice.

Try again. Fail again. Fail better. 👈

The post ReSharper Ultimate 2016.2.2: bug fix to a bug fix appeared first on .NET Tools Blog.

ReSharper Ultimate 2016.3 EAP 5

$
0
0

We have recently published yet another build of ReSharper 2016.3 EAP, and let’s now look what’s inside.

ReSharper

In mainline ReSharper, there is a number of fixed issues and some new features:

Dynamic completion of package names

In project configuration files (project.json, package.json, and bower.json), ReSharper can now suggest available package names based on your input:

Dynamic completion of package names

Language injections

In the first build of 2016.3 EAP, we added support for CSS and JSON as embedded languages, and now we’re adding support for JavaScript. This means that ReSharper will be able to parse the contents of a string literal, and treat it like a JavaScript snippet – with syntax highlighting, code completion, inspections, quick-fixes and so on.

As before, this can be enabled using a specially formatted comment – 

//language=javascript
 – which means the marker and the injected language will be shared across the team. If you don’t wish to modify the file, you can also use Alt+Enter and the “Mark as” submenu, which stores a tracking marker in ReSharper’s caches, but mind that the marker is local to your machine only:

Marking string literal as JavaScript

ReSharper also automatically injects languages in certain known scenarios, such as injecting JavaScript into AngularJS templates, or CSS in jQuery’s 

$[]
 indexer. For C# code, it will also automatically inject based on usage of the 
HtmlElementAttributes
 and 
HtmlAttributeValue
 annotation attributes.

This build also includes a new options page for language injections, allowing you to selectively enable or disable built-in automatic injections:

Automatic Language Injection options page

ReSharper C++

Among other fixes in ReSharper C++, this EAP build fixes the problem of user output from tests in Boost 1.62 and improves performance of the Boost.Test runner.

dotMemory

dotMemory now checks your application on finalized objects and objects queued for finalization. A new Finalizable objects inspection on the overview page shows such objects sorted by their type.

dotMemory Finalizable Objects Inspection

There are two problems in having finalized objects:

  • The finalization thread is run unpredictably, which, first, may cause problems in case you want to reclaim the unmanaged resources as quickly as possible, and, second, may lead to sudden performance drops.
  • The lifetime of finalizable objects is extended by at least one more garbage collection cycle (when garbage collector reaches such objects, it first promotes them to the next generation).

Therefore, it is more effective to implement the

IDisposable
interface for these objects. In this case, you reduce objects’ lifetime and explicitly run all disposal routines via the
Dispose()
method.

dotPeek

dotPeek introduces new ways to explore metadata of .NET assemblies – in addition to displaying and searching for metadata tokens, you can now dig through all metadata items (tables, blobs, strings, etc.) in the Metadata node that appears under each assembly. Noticeable features of this node include:

  • Automatically finding and displaying usages of metadata table items.
  • Decoding and displaying values of blob items.
  • On double-click, decompiling and displaying code that corresponds to the metadata item.
  • Exploring PE file headers.

Metadata tree in dotPeek

Download

If you haven’t done so yet, please download the latest 2016.3 EAP build and give it a try. As usual, we welcome your feedback via issue trackers of the corresponding products: ReSharper, ReSharper C++, dotMemory, and dotPeek.

The post ReSharper Ultimate 2016.3 EAP 5 appeared first on .NET Tools Blog.

Viewing all 221 articles
Browse latest View live