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

ReSharper Ultimate 2016.1 is released

$
0
0

We’ve just finalized an update to ReSharper Ultimate and welcome you to download Resharper Ultimate 2016.1 RTM!

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

ReSharper

Along with 950+ fixes, major highlights of ReSharper 2016.1 are the following:

  • A variety of new context actions: ReSharper 2016.1 brings a set of new Alt+Enter actions to check method input parameters, manipulate strings, convert strings to objects, comment and uncomment code selections, and many more!
  • A new Invert Boolean Member refactoring. The refactoring can be invoked on a method, property, local variable or a parameter to invert the boolean value it returns and update other members that receive values from it.
    Invert Boolean Member refactoring
  • Smart Paste feature that ensures the right escaping in string literals that you copy/paste around your code. It works in C#, VB.NET, JavaScript, XML, XAML and HTML files. Smart Paste
    Two new context actions, “Convert XML string to a LINQ to XML object” and “Convert JSON string to a Newtonsoft JSON.NET object”, complete the workflow of transferring existing XML or JSON into C# code.
  • Asynchronous Find Code Issues. Starting with version 2016.1, Find Code Issues works in the background both in ReSharper and ReSharper C++. This lets you keep editing or navigating your code while ReSharper runs its analysis.
  • New WCF-specific code inspections, quick-fixes and context actions.
  • Initial support for Node.js. All ReSharper goodies you are well familiar with, like completion, code inspections, quick-fixes, and navigation features are now available for Node.js.
    Node.js support
  • ReSharper 2016.1 is way better at understanding VB.NET 14, introducing support for string interpolation, multi-line strings, null-conditional operators, partial modules and interfaces, year-first date literals and XML documentation comments.
  • Out-of-the-box xUnit.net support. ReSharper 2016.1 provides built-in support for xUnit.net and doesn’t require a separate extension to be installed anymore. This means ReSharper will discover your xUnit.net tests and allow you to run and debug them right from the editor.
  • Support for JSON files and schemas includes the File Structure view, a “Convert JSON string to a Newtonsoft JSON.NET object” context action, JSON schema-aware code completion, inspections and quick-fixes.
    JSON file structure
  • JavaScript and TypeScript support enhancements include a reworked Rename refactoring (which can now rename files corresponding to TypeScript types), granular formatter settings, and full support for TypeScript 1.8. In addition, ReSharper starts to properly handle some bits of TypeScript 2.0: readonly properties, implicit indexers, private and protected constructors, abstract properties, and nullable types. Please expect a separate blog post describing TypeScript and JavaScript support in ReSharper 2016.1 shortly.
  • JSDoc improvements. ReSharper can now parse generics, HTML markup, and parameters with properties in your JSDoc comments. Everything that ReSharper infers from JSDoc becomes immediately available in code completion suggestions.
  • Code style features keep improving. Code styles can now be applied with a single command, ReSharper | Edit | Apply Code Style (Ctrl+Alt+S). Reformat Code, Apply Code Style and Run Code Cleanup commands are now accessible from Alt+Enter menu when you make a selection in the editor. In addition, a dedicated action for reformatting code is back, and it can be invoked from the main menu (ReSharper | Edit | Reformat Code) to reformat code depending on the context. Another improvement covers the use of braces, which ReSharper now helps you make consistent across your code base. Preferences for each kind of code block can be configured separately in a code style options page, and ReSharper makes sure to respect these preferences:
    Quick-fix to add missing braces
  • Intermediate Language viewer is now built into ReSharper. The IL Viewer, which first appeared in dotPeek 10, is now available for drilling down library code right in Visual Studio. To check how it works, navigate to any library symbol (which can be as easy as Ctrl-clicking it), and then choose ReSharper | Windows | IL Viewer in the menu.
  • Optimize References learns to handle NuGet references, and Remove Unused References starts to support NuGet references as well.
    Analyze NuGet references

ReSharper C++

ReSharper C++ 2016.1 comes with 270+ fixes and a set of larger improvements:

  • To-do Explorer: ReSharper C++ 2016.1 introduces the long-awaited navigation view, which lets you view, group and filter comments that contain one of the 3 default to-do patterns (Bug, Todo and Not Implemented) and any custom patterns that you might want to set up.
    To-do explorer in ReSharper C++ 2016.1
  • New context actions and quick-fixes. ReSharper C++ 2016.1 comes with quick-fixes to change variable type, function return type, type of unmatched out of class definition or declaration. Another new quick-fix lets you create a field from constructor parameter.
    Quick-fix to create field from constructor parameter
    We also added a set of new context actions and quick-fixes for working with #include directives; quick-fixes to change type of unmatched out-of-class function definition; to make a data member mutable or a member function non-const; to make a base class or a function non-final; to move all function definitions inside a selection.
  • The list of supported C++ language features is extended with generalized lambda captures, exception specifications, user defined literals and delegating constructors.
  • ReSharper C++ 2016.1 enhances Rename refactoring, which can now automatically rename corresponding files (both source and header) along with code symbols, and to update usages in include directives.
  • ReSharper C++ 2016.1 adds support for the Boost.Test framework to its Unit Test Runner. Please note that only Boost version 1.60 is supported.
    Boost.Test support in ReSharper C++
  • Code generation improvements. The Generate stream operations action available via Alt+Ins can now generate stubs for Boost.Serialization functions: save(), load() and serialize(). In addition, formatting options are now taken into account when generating code.
  • All ReSharper C++ actions are now banned from changing library headers.

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

dotCover

  • Test execution in Continuous Testing for MSTest and xUnit test becomes faster with dotCover 2016.1 thanks to pre-loading test runners.
  • Coverage filters are now supported in Continuous Testing.
  • Quick search results are now highlighted in the coverage tree.
  • We added a button to explore the stack trace of the selected test in Stack Trace Explorer:
    Improved Continuous Testing tool window
  • Another improvement applies to the relationship between dotCover console runner and TeamCity. TeamCity is now tuned to understand the output of the console runner and can highlight its errors and warnings in the build log.

dotTrace

  • dotTrace 2016.1 adds its Threads diagram into Visual Studio. Now, the integrated Timeline Viewer gets exactly the same diagram, which you can use to select threads, time range, and of course, view thread activity and filtered time intervals.
  • Moreover, the Threads diagram in both standalone and Visual Studio viewers gets smart tooltips. Hold the mouse over a specific time point on the timeline and a tooltip containing current thread state, executed method, and other info will appear. Tooltips are context-sensitive. This means that if some filter is applied, the tooltip will contain additional data on the filtered event. For example, when the File I/O filter is selected, the tooltip additionally shows info about file operation, file name, and data size.
    Threads diagram in Visual Studio with smart tooltips

dotMemory

dotMemory 2016.1 adds browser-style Back and Forward buttons to navigate across different views in profiling results.
Back and Forward navigation in dotMemory

dotMemory Unit

dotMemory Unit 2.2 gets a number of improvements:

  • Object selection queries now support open generic types, which is useful if you want to get all substitutions of your generic type.
  • The GetNewObjects, GetSurvivedObjects, and GetDeadObjects methods get overloads that accept query as a parameter. This allows to avoid one more GetObjects call and simplify assertions.
  • You can select objects by wildcards using the Like and NotLike queries on types, interfaces, and namespaces.
  • You can use three constants when specifying a directory for saving workspaces in the DotMemoryUnit attribute. The constants are written in angle brackets: <User>, <LocalAppData>, <CommonAppData> and stand for, correspondingly, %USERPROFILE%, %APPDATA%, and %LOCALAPPDATA% directories.
  • Improved performance of key queries: Type.Is, Interface.Is and Namespace.Like.
  • Tests that execute queries from child processes are now handled correctly.

Improvements in dotMemory Unit 2.2

dotPeek

  • dotPeek 2016.1 learns to handle extension methods as instance methods and automatically highlights usages of the symbol under the caret.
  • With dotPeek 2016.1 you can load NuGet packages and their dependencies from any online package source, or load packages listed in a packages.config file in your Visual Studio project.

Licensing

If you have an active license to ReSharper, ReSharper C++ or ReSharper Ultimate, we encourage you to start using 2016.1 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.1, or if you need a formal quote or any other assistance, please get in touch with JetBrains sales anytime.


Get ReSharper Ultimate 2016.1


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.

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.

ReSharper Ultimate 2016.2 EAP: What’s new in builds 9-11

$
0
0

ReSharper Ultimate 2016.2 EAP has been open for over two months, and we are approaching release now. Most probably, the new things described below will round up the feature set of upcoming ReSharper Ultimate 2016.2. So here is what’s new in the latest EAP builds.

ReSharper

In addition to 100+ fixed issues in the mainline ReSharper, there are some new features worth mentioning:

  • 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
  • Warnings in solution-wide analysis will help you constantly keep track of all warnings in your solution: both actual compiler warnings and ReSharper’s inspections with the ‘Warning’ severity level. Before, the status bar indicator would turn green as soon as the last error in the solution was fixed. Now, the indicator can 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 in it: just right-click the status bar indicator to configure everything.
    Warnings in solution-wide analysis
  • A way to propagate XML documentation with the <inheritdoc/> tag, which is a good alternative to copying documentation from base types/members to derivatives. Although the tag is non-standard, it is understood by tools such as NDoc, Sandcastle, and Stylecop; and there are also requests to support it in .NET Core and Roslyn.
    So you can now use a context action to add the <inheritdoc/> comment to derived members; you can enable adding <inheritdoc/> automatically when generating missing/overriding members; the Quick Documentation popup will display the correct documentation even if the tag explicitly refers to specific symbol, i.e. <inheritdoc cref="SomeSymbol"/>.
  • 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 of them that are .NET assemblies.
    Process Explorer window
  • New formatter options that let you control spaces before and after ++ and -- operators as well as spaces before and inside parenthesis of checked and default expressions.
  • In terms of TypeScript, ReSharper now fully supports TypeScript 2.0. Another long awaited feature makes the main navigation commands (Go to Declaration and Find Usages) work correctly when dealing with type aliases.

ReSharper C++

  • You can now generate documentation comments for C++ symbols simply with a context action. If necessary, you can customize the comment stub by editing the ‘doc’ live template that ReSharper uses for generation.
    Surround templates in completion lists
  • When your caret is on one of a function’s exits (return, throw, etc.) ReSharper C++ will automatically highlight all other function exits including exits from loops and switch statements.
  • New code inspections and quick-fixes: ‘Missing default case in a switch statement’ and ‘Non-explicit conversion operator’
  • Code style for default pointer initializer. You can specify 0, nullptr or NULL as the preferred initializer in the options, and ReSharper will help you maintain this style in your code base.

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. Of course, on complex call stacks with multiple recursive calls this would result in almost infinite stack scrolling. Now, Timeline Viewer allows you to 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, or, in other words, collected in different profiling sessions.

For example, this can be useful to find out how particular changes in code affect your application’s memory usage. All you need are two snapshots taken before and after committing changes.

Cross-workspace snapshots comparison

dotCover

  • Filtering processes from console runner lets 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.
  • Hide auto-properties option allows you to exclude auto-properties from the coverage analysis.

Please feel free to download the latest 2016.2 EAP build and let us know what you think. If you have any problems, please raise issues in ReSharper, ReSharper C++, dotTrace, dotMemory or dotCover issue trackers.

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.

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

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.

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. 👈

dotMemory 2016.2. Compare memory snapshots from different sessions

$
0
0

Along with multiple performance improvements and bug fixes, dotMemory 2016.2 brings one long-awaited feature: comparison of memory snapshots stored in different workspaces (or in other words, snapshots collected in different profiling sessions).

When might this be helpful? Generally, in any situation where the data you need compared cannot, for some reason, be collected in one profiling session. For example, you want to find out how particular code changes affect memory usage in your application. In this case you need at least two profiling sessions: before and after changing the code.

How does it work?

It’s really simple.

Cross-workspace comparison

  1. Profile your application and take snapshot(s), or open an existing workspace.
  2. Click Compare with snapshot from another workspace.
  3. Select a snapshot you want to use as basis.
  4. Select a snapshot for comparison.
  5. Click Compare.

This will open the Cross-workspace comparison view. Here you can see how many objects of a particular type exist in both snapshots. Since it’s impossible to match object lifetime data between sessions, the view won’t show you “new” and “collected” objects (which the regular “within-session” snapshot comparison does show). Nevertheless, in most cases, this data should be enough for further analysis.

Cross-workspace snapshots comparison

For example, you can quickly detect a problem when the same workflow in your application (e.g., before and after you commit changes) leads to a different number of objects in your application’s namespaces.

Consider downloading ReSharper Ultimate and giving this new feature a try.

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.

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

ReSharper Ultimate 2017.1 EAP 6: dotMemory console profiler and more

$
0
0

Today we welcome you to download our last pre-release build of ReSharper Ultimate 2017.1 and check out all new features and improvements that we’ve been working on since the beginning of this year. In the previous builds we fixed important bugs and added new features that mostly relate to perfecting support for Visual Studio 2017 RTM and C# 7. Today’s EAP build includes noticeable updates to dotMemory, dotPeek and a few other improvements that we are going to cover in this post.

dotMemory command line profiler

dotMemory 2017.1 introduces a console profiler. The dotMemory.exe tool allows configuring and running profiling sessions right from the command line. The tool is a perfect fit when you need to automate the process of gathering memory snapshots in the following cases:

  • You want to make profiling a part of your continuous integration builds, e.g. this can be a build step that performs profiling of your integration tests.
  • You want to speed up profiling routines, e.g. when you regularly profile the same application and do not want to start the dotMemory user interface each time.

See how easy it is to take a memory snapshot of a running application (with

6844
PID):
dotMemory.exe get-snapshot 6844 --save-to-dir=C:\Snapshots

or to run an application and take a snapshot only when memory consumption increases by 50%:

dotMemory.exe start --trigger-mem-inc=50% C:\MyApp\MyApp.exe

The dotMemory.exe tool also allows taking snapshots by a command sent to stdin or by using the profiling API. The most basic tool usage scenarios are described in our Help.

Navigation and search

Finding usages of a specific interface or type becomes even more convenient with a new option in Find Results window to group by kind of usage. There are certain usages like Type conversions which you may want to pay special attention to during the development process. And grouping helps here a lot. The filter was also updated so that you can select specific usage occurrences.
find_results
We’ve also added a small improvement that makes it possible to search for exact matches using quotes.

Go to Everything receives an option to filter the results using a special syntax. Just type ‘/’ to see all available filter options:
go_to_evrth_filter

dotPeek portable PDB support

dotPeek can now generate not only traditional PDB files which are Windows-only, but also Portable PDB files. The type of the generated PDB is determined automatically and depends on the selected assembly. dotPeek Symbol Server supports generation of the Portable PDB files as well.
It is possible to explore the contents of the Portable PDB associated with the assembly (standalone or embedded) which is presented in the same way as the assembly metadata. For the associated Portable PDB you’ll see a corresponding subtree in the Metadata tree.
And finally, you can use sources embedded in the Portable PDB for navigation purpose.

Code formatting

All in all, ReSharper 2017.1 brings lots of enhancements to code formatting. EAP 6 adds two more options:

  • In C# you can force line breaks in a ‘switch’ statement after the ‘case’ label statement or put each section on a single line.
  • In HTML, CSS and XML you can add line feed at the end of the file.

Other updates

We’ve added support for the routing attributes in Razor Tag Helpers. Code completion, navigation and find usages commands, Rename refactoring are applicable to such attributes.

dotTrace timeline profiling of ASP.NET Core Web Application started to work with the new version of CoreCLR. If you were affected by this issue you need to upgrade your project to use .NET core 1.1.1.

We fixed issue with profiling Silverlight applications (PROF-634) by redesigning Core API so that now it supports all targets: Desktop (both Core API and Self API), Silverlight and CoreCLR. WCF profiling in Visual Studio 2017 RTM is now also supported (PROF-636).

That’s it. Please download ReSharper Ultimate 2017.1 EAP 6 and report any critical issues you encounter.

The post ReSharper Ultimate 2017.1 EAP 6: dotMemory console profiler and more appeared first on .NET Tools Blog.

Webinar: Exploring .NET’s memory management

$
0
0

Join us Thursday, April 6, 16:00 – 17:00 CEST (check other timezones) for our free live webinar, Exploring .NET’s Memory Management, with Maarten Balliauw.

Register Now: Exploring .NET's Memory Management

In this webinar, we’ll take a trip down memory lane and look into how .NET memory management works. We’ll start off with the .NET Garbage Collector (GC) is really cool and look at how it helps providing our applications with virtually unlimited memory, so we can focus on writing code instead of manually freeing up memory. But how does .NET manage that memory? What are hidden allocations? Are strings evil? It still matters to understand when and where memory is allocated. In this talk, we’ll go over the base concepts of .NET memory management and explore how .NET helps us and how we can help .NET – making our apps better. Expect profiling using dotMemory, Intermediate Language (IL), and using ClrMD to mimic some inspections dotMemory provides.

To attend this webinar, register here.

About the presenter:

Matt EllisMaarten Balliauw is Developer Advocate at JetBrains and loves building web and cloud apps. His main interests are in ASP.NET MVC, C#, Microsoft Azure, PHP and application performance. He is a frequent speaker at various national and international events and organizes Azure User Group events in Belgium. In his free time, he likes brewing his own beer. Maarten’s blog can be found at http://blog.maartenballiauw.be.

The post Webinar: Exploring .NET’s memory management 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.

Webinar recording: Exploring .NET’s memory management

$
0
0

The recording of our recent webinar with Maarten Balliauw, Exploring .NET’s memory management, is now available:

We’ll take a trip down memory lane and look into how .NET memory management works. We’ll start off with the .NET Garbage Collector (GC) is really cool and look at how it helps providing our applications with virtually unlimited memory, so we can focus on writing code instead of manually freeing up memory. But how does .NET manage that memory? What are hidden allocations? Are strings evil? It still matters to understand when and where memory is allocated. In this talk, we’ll go over the base concepts of .NET memory management and explore how .NET helps us and how we can help .NET – making our apps better. Expect profiling using dotMemory, Intermediate Language (IL), and using ClrMD to mimic some inspections dotMemory provides.

All demos are available on GitHub and come with interactive walkthroughs, mostly. If you have dotMemory installed, you can investigate the results of each demo on your own!

Slides are on SlideShare, and a detailed blog series on the topic is available as well:

Thank you for attending! Download dotMemory now and give it a try!

The post Webinar recording: Exploring .NET’s memory management appeared first on .NET Tools Blog.

dotMemory Command Line Tools

$
0
0

In the 2017.1 release, dotMemory introduced a console profiler. Now, using the dotMemory.exe tool, you can perform memory profiling from the command line. Why would you? The short answer would be to automate the process of gathering memory snapshots. There are lots of possible use cases:

  • You want to speed up profiling routines, e.g. when you regularly profile the same application and do not want to start the dotMemory user interface each time.
  • You need to profile your application on someone’s computer you don’t have access to (e.g., your client’s) but don’t want to bother him with dotMemory installation and detailed profiling instructions.
  • Or maybe you want to include memory profiling into your continuous integration builds (though our dotMemory Unit framework could be much handier for this purpose).

Where can I get it?

dotMemory.exe is distributed separately from dotMemory. You can download the tool on the dotMemory download page. Note that dotMemory.exe is free and does not require you to have the full dotMemory installed.

Now let’s take a look at the most common usage scenarios.

Instantly get a snapshot

The most popular scenario is probably getting a snapshot of an already running application.

dotMemory.exe get-snapshot 1234 --save-to-dir=C:\Snapshots

1234 here is the process ID. Right after you run the command, dotMemory will attach to the process, take a snapshot, save it to C:\Snapshots, and detach from the process.
You can also specify the profiled application with its process name:

dotMemory.exe get-snapshot MyApp --with-max-mem

or

dotMemory.exe get-snapshot MyApp --all

--all and --with-max-mem options let you avoid ambiguity when multiple processes with the same name are running:

  • --with-max-mem – a process that consumes most of the memory will be profiled.
  • --all – all processes with the specified name will be profiled. dotMemory will take snapshots of all processes (snapshot per process).

Get snapshots by condition

Sometimes you may need to track application memory consumption during a long time interval. In this case, you can start your application under profiling and get snapshots only in case a particular condition is satisfied:

  • a periodic time interval ends (in the example, it’s 30 s):

    dotMemory.exe start --trigger-timer=30s C:\MyApp\MyApp.exe MyAppArg1

  • or memory consumption increases by a specified value (50% in the example below):

    dotMemory.exe start --trigger-mem-inc=50% --trigger-delay=5s C:\MyApp\MyApp.exe

    (--trigger-delay=5s here stands for the 5s delay required to skip application startup phase)

Note that in both examples, we use the start command to start the application. If you want to profile a ASP.NET application, you should use the start-iis command. In this case, IIS and all its application pools will be started under profiling. E.g.:

dotMemory.exe start-iis --trigger-timer=30s --open-url=localhost/myapp --use-browser=Chrome

What if the app you want to profile is already running but you still want to use triggers? Simply use the attach command:

dotMemory attach MyApp.exe --trigger-timer=30s

Get snapshots using stdin messages

If you want to take direct control over the profiling process (i.e., get snapshots at some exact moment), you can do this by sending messages to stdin of dotMemory.exe:

  • Get a snapshot:

    ##dotMemory["get-snapshot", {pid:1234}]

If pid is specified, dotMemory will take a snapshot of the process with the specified PID. Otherwise, dotMemory will take snapshots of all profiled processes.

  • Stop profiling and kill the profiled application:

    ##dotMemory["disconnect"]

These stdin messages work for all profiling sessions started with start, start-iis, or attach commands.

Moreover, if you want to write a profiling script, you may find it useful that dotMemory.exe is able to send service messages to stdout:

  • Start of the profiling session:

    ##dotMemory["connected", {pid: 1234}]

  • Saving the snapshot:

    ##dotMemory["workspace-saved", {path: "..."}]

Note that messages sent to stdin must always start from a new line and end with a carriage return. Both stdin and stdout messages have the format of a JSON array.

Get snapshots using API

Of course, we don’t forget about our profiling API. If you control profiling directly from your code using the dotMemory API, run dotMemory.exe with the -–use-api command. E.g.:

dotMemory.exe start --use-api C:\MyApp\MyApp.exe

We hope you’ll find the dotMemory console profiler useful and helpful in automating your profiling routines. As usual, we invite you to download the tool, try it on your own and share your experience.

The post dotMemory Command Line Tools appeared first on .NET Tools Blog.

dotMemory 4.0 out, dotTrace on sale

$
0
0

You’ve waited for this long enough! As of today, our profilers dotTrace Memory and dotTrace Performance assume new identities. Previously known as dotTrace Memory profiler, dotMemory is the newest product to rejoin the JetBrains .NET tools family. The decision to separate renewed memory profiler was natural since dotMemory was reworked from the scratch and re-invented even in analysis concept.

We are thrilled to announce the release of dotMemory 4.0, our smart and reliable .NET memory profiler.
dotMemory 4.0

At the same time, dotTrace Performance, now known as simply dotTrace, is on SALE. That’s right, our dotTrace .NET performance profiler can be yours for up to 58% OFF (commercial licenses) or up to 33% OFF (personal licenses). Profiling has never been this affordable. For more pricing details please check the dotTrace website.

So, back to dotMemory 4.0: it introduces a unique memory analysis concept. We believe that complicated and deeply intellectual memory usage analysis can be a fascinating and everyday activity. With dotMemory you start from all objects in memory and narrow to smaller object sets until the memory issue is solved. Just let dotMemory’s powerful functionality, multiple views on data and intuitive UI guide you through the journey.

Let’s have a closer look at key dotMemory features:

Powerful automatic inspections to instantly detect common types of memory leaks.

To ease your task, dotMemory automatically scans your snapshot for the most common types of memory issues. These inspections can be a great starting point in analyzing a snapshot if you’re not sure where to begin.
Automatic Inspections

Multiple views on data are great for detailed analysis of memory usage issues.

Examine objects in the heap from multiple views. Want to know how objects relate to each other? What objects do they reference and through what fields? Which calls created these objects? No problem! dotMemory has a view for nearly everything. For example, you can group instances by dominating object sets or by similar retention paths. Other innovative views include the icicle chart to visualize the call tree.
Multiple Views

Memory traffic analysis to detect what causes excessive garbage collection.

Excessive allocations and garbage collections may imply significant memory management overhead. Use the traffic view to understand what objects are created/collected most intensively in your app and what functions are causing this memory traffic.

Comparing memory snapshots to visualize improvements or regressions in memory usage.

Comparing two snapshots is the main way to find objects that are causing a memory leak. Use the comparison view to find out how many objects were created between snapshots and how many objects were collected.

Timeline view with real-time data collection

To monitor memory consumed by your application, get snapshots and drop them to compare in one click.
dotMemory Timeline View

Remote profiling — detect memory issues in running production environments.

Profile apps not only on your local computer but on any computer in your network or on the Internet. Remote profiling is especially helpful when you need to profile a web app on a production server.

A Profiling API lets you invoke the profiler from exact code positions in your applications.

Picking the right moment to get a snapshot is very important for memory analysis. Use the dotMemory API calls to take snapshots at exact places of your code.

Support for various .NET applications

Profile apps based on .NET Framework 2.0 to 4.5.1 including desktop, Silverlight 4, Silverlight 5, Windows Store, WCF, and IIS applications.

Visual Studio integration

dotMemory integrates with Visual Studio so you can start a memory profiling session right from the IDE, whenever you need.

To get to know dotMemory 4 better and explore getting-started hints, please visit Docs&Demos webpage.

dotMemory is available in different license types: commercial, personal, open source, and more. A new commercial license is priced at $249, and upgrades are just $79. If you purchased a dotTrace Memory license after January 1, 2012, you are welcome to upgrade your memory profiler for free. If not, we encourage you to take advantage of our low upgrade prices. All licenses include 1-year subscription for updates. Additional options and licenses details are available on the dotMemory website.

Download dotMemory 4.0 today and enjoy the new memory profiler. If you would like to first try it, a free 10-day evaluation license is available.

Profile with pleasure!
JetBrains dotMemory team

The post dotMemory 4.0 out, dotTrace on sale appeared first on .NET Tools Blog.

ReSharper 8.2.1 RTM Is Available

$
0
0

A new ReSharper maintenance release is now available for download. Please feel free to upgrade if your experience with ReSharper 8.2 is subpar due to the following issues:

  • False positive errors in Windows Phone projects with references to PCLs
  • Ambiguous reference errors
  • Issues with Jasmine and AngularJS tests not running

Here’s the full list of fixes and enhancements included in ReSharper 8.2.1 for your reference.

Updates to ReSharper SDK and ReSharper Command Line Tools are available too, as well as compatible builds of dotTrace, dotCover and dotMemory (the latter additionally contains a number of bug fixes).

The post ReSharper 8.2.1 RTM Is Available appeared first on .NET Tools Blog.

Viewing all 306 articles
Browse latest View live