Archive for the ‘News and Events’ Category

Meet dotTrace 5.3.2 Performance with CLR 4.5 support

Tuesday, May 14th, 2013

Today we are happy to announce availability of a new maintenance release of our .NET performance profiler. Please feel free to download and try the latest dotTrace 5.3.2 Performance.

Starting from this update dotTrace Performance supports the latest version of CLR. In case you have already updated CLR to version 4.5 or just plan to do it, we would recommend to use this version of the profiler.

Refactoring Legacy Code Bases, Free Online Event May 8

Wednesday, April 17th, 2013

In cooperation with Microsoft, join JetBrains’ Hadi Hariri for the free online event, Refactoring Legacy Code Bases using Microsoft Visual Studio and ReSharper. The session is intended for architects, designers and professional developers.

Refactoring Legacy Code Bases
Wednesday, May 8, 9:00 AM - 10:00 AM Pacific Time (GMT-08:00)

Not everyone has the possibility of working on Greenfield projects or doing TDD or BDD. Many of us often end up having to work with legacy code bases that have little notion of what SOLID design principles are and unit tests are non-existent. It can be daunting to have to maintain these types of systems. However, with a little bit of effort, we can try and make the best of the situation. We can combine some well-known refactoring techniques, along with code analysis and design concepts to improve the quality of the code.

Registration is required to attend. We hope to see you there!

ReSharper 7.1.3 is Available for Visual Studio 2012 Update 2

Friday, April 12th, 2013

Have you upgraded Visual Studio 2012 to Update 2 RTM? If you have, please download ReSharper 7.1.3, which is mostly about compatibility with this new Visual Studio update.

Specifically, ReSharper can now successfully run MSTest fixtures in VS2012 Update 2 (this was the most important problem that has prevented usage of ReSharper 7.1.2 with VS2012 Update 2); adds support for Windows Phone 8 unit test projects; and becomes compatible with the final release of LightSwitch HTML Client as part of VS2012 Update 2.

To make things clearer, here are some easy rules specifying whether you need ReSharper 7.1.3 depending on the version of Visual Studio that you’re using:

  • Visual Studio 2005, 2008, or 2010: you don’t need ReSharper 7.1.3, skipping this update is a safe bet.
  • Visual Studio 2012 prior to Update 2: you should NOT install ReSharper 7.1.3 if you’re using MSTest.
  • Visual Studio 2012 Update 2: ReSharper 7.1.3 is primarily for you, so go ahead and download it.

Webinar Recording: Jon Skeet Inspects ReSharper

Thursday, April 11th, 2013

On Tuesday, April 9th, we held a free webinar with Hadi Hariri and C# legend Jon Skeet. The concept was simple enough: to play with some of the most sophisticated ReSharper code inspections and have Jon try to break ReSharper with tricky code samples.

The recording of this webinar is embedded below and can be found directly on YouTube and JetBrains.tv. The examples used are also available for download.

We would like to thank all of the webinar attendees for your participation, questions and tremendous turnout and of course to Jon, thank you for taking your time to join us and share your wealth of knowledge!

About This Webinar:

Jon Skeet, man, father, legend. Some call him the Chuck Norris of C#. The guy that the compiler bends to obey joins us for this webinar to walk us through some of the inspections that ReSharper offers. He explains the theory behind it, tells us whether he agrees with it or not and does his best to try and break ReSharper. You can follow Jon on Twitter @jonskeet.

 

 

Introducing the dotPeek 1.1 EAP

Tuesday, April 2nd, 2013

In our recent blog post on the ReSharper 8 EAP, we have mentioned certain improvements to the decompilation support. Today, we are happy to announce that the next version of dotPeek, our free decompiler, has also reached the EAP stage. Here are some of the features that you can try out today.

Export Assembly to Project

Many of you have asked us to add functionality for saving a decompiled assembly as a ready-to-build Visual Studio project. We have listened to your requests: now, if you right-click a decompiled assembly, you get the option to export it as a project:

All you need to do is provide the destination path and name of the project. You can also generate a solution (.sln) file if you need one.

The above generates a project (.csproj) file containing all the decompiled files. dotPeek is smart about creating projects – here are some of the optimizations it performs:

  • If PDB files are available, dotPeek restores the file and folder structure of the original project.

  • If the project has unsafe code, the project is configured to allow it.

  • The type of assembly is detected and the project is configured accordingly.

Incidentally, dotPeek also keeps track of your export history. If you try to export the project again, it will offer the following dialog:

Project File Support in Assembly Explorer

To make it easy to orient oneself in situations where parts of a solution exist only in compiled form and other parts exist as source code, dotPeek’s Assembly Explorer now supports Visual Studio projects (.csproj). You can automatically add the project to the Assembly Explorer after generating it from decompiled sources (see the Add project to Assembly Explorer checkbox in the above window):

Go to Everything

Just like ReSharper, dotPeek now uses Ctrl+T as the Go to Everything command, letting you navigate to either file, symbol or type within one menu:

Odds and Ends

Finally, here are a few more features that are available:

  • dotPeek now preserves window layout settings. It also keeps track of recently opened files.

  • Just like Visual Studio, dotPeek now lets you set bookmarks and navigate between them.

  • In addition to the MSI installer, dotPeek is now also available as a single executable file.

If you’re interested in seeing these features right now, download the dotPeek EAP and give it a go!

ReSharper Code Analysis Goes Beyond Visual Studio

Tuesday, March 26th, 2013

One of ReSharper’s most notable features, Code Analysis, is now unleashed and ready to hunt for bad and dead code—without even opening Visual Studio. Dubbed as InspectCode, it is as simple as a command-line tool can be and requires a minimum of one parameter—your solution file. But as it runs it will apply all of ReSharper’s code inspections—that’s over 1,400 of them—to code in all languages supported by ReSharper!
Can’t wait to try it out? Find the latest ReSharper 8 EAP build, download and unzip the Command Line Tools package, and then run InspectCode [SolutionFile].

InspectCode at work

While the tool works its way through your code, let’s take a closer look at its features and use cases.

Output

Execution of InspectCode results in an XML file with code issues found within the specified scope (the whole solution or particular projects). The XML comprises two parts:

  • The list of found issue types where each type has a description, severity level, and a link to the corresponding Code Inspection Wiki entry where available. Also, each issue has a category that can be used to group similar issues.
  • The list of found issues where each issue has its type and place in a file. The issues are grouped by projects.

How the output should be processed is up to you. But here are a couple of recommended next steps: transform the output to an HTML report, or generate some messages on your continuous integration (CI) server based on number and types of detected issues.

Usage Scenarios

Now let’s see how we can use the tool and what exactly we can do with its output. It may be helpful to run it on your local machine, but only if you don’t have ReSharper, because with ReSharper you can get inspection results for a selected scope with a couple of clicks and, if necessary, export detected issues to a report file. A more promising case is to use InspectCode on a CI server where you can integrate it in the build script and add code inspection results to your build reports and messages.

The JetBrains Teamcity team, who is pioneering the use of this tool right now, has created the following visual presentation of the code issues detected by InspectCode:

Presentation of code issues in TeamCity

To learn more, refer to the TeamCity documentation or download the latest version to try it out.

By the way, if you come up with more usage scenarios as you try out InspectCode, please share them with us.

Settings

If you have previously worked on the target solution with ReSharper, you may have already configured code inspections settings. If so, InspectCode will find your custom settings in .DotSettings files and apply them. If there are no settings files, then the default severity levels will be used for all inspections.

Besides custom severity levels for code inspections, InspectCode looks for the following settings in .DotSettings files:

If you want to configure InspectCode on a CI server, you can make all configurations locally with ReSharper, save the settings to the Solution Team-Shared layer, and then commit the resulting SolutonName.sln.DotSettings file in your VCS. InspectCode on the server will find and apply these settings.

As an alternative, you can configure InspectCode by specifying a shared .DotSettings file through the /profile (/p) parameter. In this case the specified settings layer will override settings in all other layers. (See this post to learn how to create and share a common settings file.)

Optional parameters

We have already mentioned two optional parameters: /profile (/p) and /no-swea. Among other optional parameters (which you can see by typing InspectCode /help) the following may come in handy:

  • /output (/o) - lets you set the output file. By default, the output file is saved in the %TEMP% directory.
  • /project - allows analyzing particular project(s) instead of the whole solution. After this parameter, you can type a project name or a wildcard that matches several projects within your solution.
  • /no-buildin-settings - can be used to ignore settings from the Solution Team-Shared layer (SolutonName.sln.DotSettings file).
  • /caches-home - lets you specify a custom location for the data that InspectCode caches. By default, the %TEMP% directory is used, unless there are settings files, in which case the one specified there is used. This parameter can be helpful if you want to use a fast SSD disk for the cache or if you want to store all your build processing data in a single place.

So our command line could look like this:
InspectCode C:\Projects\ReSharper\resharper.sln /project=Documents /o="C:\temp data\Results.xml" /no-swea

Q & A

That’s about all for the introduction of InspectCode. Now let us try and answer some questions you might ask:

  • How are command line tools licensed?
    The EAP version is a free 30-day trial. We are still working on the licensing policy and it will be announced soon.
  • Can I configure InspectCode without ReSharper?
    Currently, configuration without the use of ReSharper is restricted to some basic settings like enabling solution-wide analysis, selecting projects to be analyzed, choosing the output file, and specifying cache location.
  • Does InspectCode consider the Visual Studio project setting ‘Treat warnings as errors’?
    Yes. It will change the severity of issues corresponding to compiler warnings.
  • Will InspectCode analyze a solution that fails to build?
    Yes. In this case you will see all compiler errors in the output in addition to ReSharper-specific issues. The only requirement for correct analysis is that all dependent libraries be referenced correctly.

If you have more questions or feedback about the Command Line Tools, we’ll be happy to hear from you.

Jon Inspects ReSharper – Free Webinar Tuesday, April 9th

Thursday, March 21st, 2013

Jon Skeet, man, father, legend. Some call him the Chuck Norris of C#. The guy that the compiler bends to obey is going to join us for this webinar to walk us through some of the inspections that ReSharper offers. He’ll explain the theory behind it, tell us whether he agrees with it or not and will do his best to try and break ReSharper. Join us for what will definitely be a fun and educating webinar.

Jon Skeet

This free webinar will take place Tuesday, April 9th from 19:00 – 20:00 CET (Central European Time). Space is limited; please register now.

About Jon Skeet
Jon is a Java developer for Google in London, but he plays with C# (somewhat obsessively) in his free time. He loves writing and talking about C# and the second edition of “C# in Depth” was published in November 2010. Writing less formally, Jon spends a lot of time on Stack Overflow… where “a lot” is an understatement. Give him a puzzle about how C# behaves which gets him reaching for the language specification, and Jon is a happy bunny. Jon lives in Reading, England with his wife and three children.

Introducing the ReSharper 8 EAP

Wednesday, March 6th, 2013

In the world of technology, no-one can afford to stand still. As new frameworks and languages come out, ReSharper does its best to keep up. This is why we are happy to announce the opening of the ReSharper 8 Early Access Program. With the forthcoming release, we are proud to announce the following features, which will be part of ReSharper 8.

Go To Everything

In preparation for ReSharper 8, we’ve put in extra effort on streamlining certain operations. One of the areas where we felt improvement was needed was the unnecessary divergence caused by the various Go To menus. In an effort to simplify things, we have altered the main Go To Type command (Ctrl+T) so that now it navigates to either types, symbols or file names, all contained within the same listing.

By default, the menu shows a listing of recently opened files:

Searches for identifiers now yield both files, types, and file members:

Don’t worry – all the previous commands (e.g., Go To File) continue to work, and dynamically switching from one context to another is supported. The functioning of selectors is, of course, left intact, so you can write things like ClassName.MemberName to locate a particular member of a class, use combo navigation, wildcards and camel-humps. In addition, we added some new selectors – for example, typing public or private helps you narrow members down by visibility. Performance of this menu has been optimized so searches should be very quick.

Code Completion Improvements

This release comes with a substantial number of improvements in the way ReSharper offers code completion suggestions.

New Items in Automatic Code Completion

The first thing to point out is that, from now on, various aspects of smart completion and import symbol completion are now integrated into ordinary code completion, once again striving for a more streamlined experience.

For example, if you take a class and indicate that it implements INotify, you will be presented with the following menu:

The completion options will now show you all the possible ways of getting at a particular interface that begins with INotify, and using it will cause the appropriate using statement to be added to the top of the file.

In addition to the above improvements, ReSharper now offers several generative completion options, specifically offering to generate code on partial and override statements:

And finally, we’ve added some minor improvements to existing completion mechanisms. For example, the completion list for a collection member now includes the keyword new by default:

Other Code Completion Improvements

In addition, we’re introducing a new concept called Double Completion. For example, when you use ordinary completion by pressing Ctrl+Space, and you don’t get the member you’re looking for, you can press this shortcut again to try locate the element in all referenced assemblies. Double Completion also works with Smart Completion, so pressing Ctrl+Alt+Space more than once will offer you various chains of calls that will get you to the right member (possibly via extension methods).

Double Completion mechanisms are supplemented by quick-fixes, so if you use it to get at a symbol that is private, a quick-fix will quickly let you alter the visibility of a member to make it accessible.

New Code Inspections

As always, we’ve added new inspections as well as improved existing ones. Here’s a small sampling of some of them:

  • You can now disable all ReSharper warnings with a single comment — instead of defining separate inspections to suppress, you can now mark code with // ReSharper disable all and ReSharper will not complain about anything until it meets a corresponding // ReSharper restore all .

  • You can now switch between array initialization expressions and array creation expressions; ReSharper offers the appropriate inspection and context actions:

  • An ability to convert recursive calls to iterative ones:

  • If a method has an overload that supports cancellation (i.e., takes a CancellationToken), ReSharper will offer to use that overload, provided that there is a CancellationToken available in scope:

  • ReSharper also supports the idea of fallback color in CSS:

This is just a sampling of some of the inspections improvements that we’ve added. We’ll publish a blog post with more in-depth information soon.

CSS Improvements

To help developers ensure correct operation of their code, ReSharper introduces configurable support for CSS3 and earlier versions, as well as compatibility checks against popular browsers:

As a consequence of these compatibility checks, ReSharper will now provide detailed information about the availability of a feature for a particular browser:

We’re working on making ReSharper progressively smarter in recognizing CSS declarations, whatever shape they take, be it in JSON:

In string literals:

And even in anonymous type declarations:

Searching for a CSS attribute has got a lot smarter, too. For example, searching for the color Red will yield all locations in CSS, JavaScript and C# where this color is used, however it may be defined:

Finally, ReSharper now supports refactorings such as the renaming of identifiers defined in CSS:

Assembly Explorer

Those of you who know dotPeek, our free decompiler, have already seen the Assembly Explorer – a window similar to the Solution Explorer that lets you explore decompiled assemblies. The great news is that now Assembly Explorer is part of ReSharper, too:

In addition to being able to load assemblies via its user interface, ReSharper also offers an option to Locate in Assembly Explorer, which will select the item currently being decompiled in the Assembly Explorer window:

The Assembly Explorer is a very powerful tool, capable of locating assemblies in various file formats (e.g., ZIP files). It’s also very extensible, a fact appreciated by dotPeek plugin writers. Its capabilities are now open for you to extend, right within ReSharper.

BAML Decompiler

While we’re on the subject of decompilation, ReSharper now supports BAML decompilation, so if you’ve got a compiled WPF app, you can easily look at its XAML UI definitions:

Note that the generated XAML above supports typical features such as navigation, Find Usages and other features one would expect from a XAML viewer.

Odds and Ends

Just a few more things that are worth mentioning.

We have made adjustments to the formatter and Code Cleanup in order to treat preprocessing directives such as #if and #region correctly. This means that constructs such as

will now correctly survive in case you execute the formatter or Code Cleanup on the file.

In addition to ReSharper as a plug-in, we are also providing a command-line tool that can be used to analyze an existing VS solution. This happens to be the tool that TeamCity uses to present ReSharper analyses. We are currently offering it as a separate, time-limited download and will be putting up new releases together with forthcoming EAP versions.

Finally, we are working hard on bringing you TypeScript support in ReSharper! It’s still too early to announce any features for it, but rest assured that it’s high in our priorities and we’ll let you know as soon as it’s ready.

Now that you’ve seen some of the features that ReSharper 8 will have, why not give them a go? Simply download the EAP and let us know what you think!

AngularJS support for ReSharper

Thursday, February 28th, 2013

In case you haven’t already been introduced, AngularJS is a popular JavaScript framework for creating dynamic web applications. It provides many of the services required to build such applications, not the least of which is a declarative approach to updating the UI. It favours the use of data binding and templates over direct DOM manipulation, and it makes it possible to create complex sites with a minimum of code. For more information, check out the examples on their home page, or take a look at the video tutorials by our very own John Lindquist.

We’ve just released a plugin that adds ReSharper support for some of AngularJS’ features (here’s a direct download link). It’s an initial version, so doesn’t cover everything, but what it provides should give you a helping hand in creating your sites. Currently, the plugin provides code-completion for Angular’s custom HTML attributes, and a bundle of Live Templates to make building common constructs easier.

Code completion will include all of AngularJS’ “ng-” attributes when editing HTML files, and include a description tooltip:

Code completion showing Angular attributes

It also supports the HTML5 “data-” prefixed versions of the same attributes.

Code completion with data prefixed attributes

And of course, since ReSharper has smart matching, you can type initials to quickly get to the start of the attribute you want. For example, you can type “dngbh” to get to the “data-ng-bind-html” attribute:

Code completion with smart matching

The plugin also ships with 26 Live Templates, based on the IntelliJ and WebStorm templates by Pawel Kozlowski and John Lindquist, respectively. They are split into functionality for directives, modules, scope, routing, html and global helpers. For example, you can use the “ngindex” template to create a simple HTML page to start your development,  or “ngb” to create a binding expression. These work in HTML or HTML-like files (Razor, ASPX, .html)

Expanding the binding template in a HTML file

The JavaScript templates can create code for directives, for loops, modules, routing and scope. These are available in JavaScript files, and within script tags in HTML-like files:

Expanding a scope function template

Please check out the templates explorer to get a full list, or to edit, add or remove templates.

This is just an initial release. We’d love to expand the feature set, supporting custom HTML element directives, navigation to model properties, binding expressions, and more. If there are any features you’d like to see, or if you find any bugs, please add a feature request to the Issues page. And of course, it’s Open Source - if you’d like to see a new feature, how about taking a crack at it? We’ll help.

Now, go and download it, and make lovely dynamic JavaScript applications.

Meet JetBrains at TechDays Belgium and TechDays Netherlands

Friday, February 22nd, 2013

The JetBrains Team is on the road again continuing alongside Microsoft TechDays tour for stops in Belgium and the Netherlands. Join top international and local speakers discussing the hot topics of the day including Windows 8, Visual Studio 2012, Windows Azure, Windows Phone 8, HTML5 and much more.

At both locations we will have a booth where you will learn about the latest developments around JetBrains .NET tools. A friendly team will be ready to answer your questions and share some tips.

TechDays Belgium, March 5-7 at Kinepolis, Antwerp

TechDays Belgium is a three day event featuring 80 different sessions and attracting 2,000+ visitors. On March 5th there will be a pre-conference with 4 tracks including 2 for developers and 2 for IT professionals. The main conference will take place March 6th and 7th. We would like to invite you to our session with JetBrains Evangelist, Maarten Balliauw.

 

OAuth-as-a-service using ASP.NET Web API & Windows Azure Access Control

Thursday, March 7th from 09:00 – 10:15 / Level: 300

APIs are the new apps. They can be consumed by everyone using a web browser or a mobile application on their smartphone or tablet. How would you build your API if you want these apps to be a full-fledged front-end to your service without compromising security? In this session, Maarten will explain how to build an API using the ASP.NET Web API framework and how the Windows Azure Access Control service can be used to almost completely outsource all security and OAuth-related tasks.

TechDays Netherlands, March 7-8 at World Forum, The Hague

TechDays Netherlands is an annual two day Microsoft Conference for software developers and IT professionals. This year there will be 160 sessions highlighting innovation on the Microsoft Platform. Stop by our booth to learn how JetBrains .NET tools can help you become more productive.

 

Get a taste of the action in this video by George Dvorak filmed at TechDays France.