If you’ve ever wondered how important Russian developers are to the .NET community, look no further than Resharper and DevExpress. The first comes to us from Saint Petersburg with love, the second is located in Tula, a 2-hour drive South from Moscow. At time when politicians and media feed us with fears and lies about Russia, we would like to remind how fruitful this relationship is to developers of all countries – and want to contribute to strengthen it.

Today, I’m excited to announce I’ll deliver the Patterns On The Road tour from March 11th to March 18th in Moscow and St Petersburg, the largest developer communities in Moscow. The objective of this tour is to talk about the idea of pattern-oriented development: not just designing with patterns (what you’ve hopefully already done since the GoF book), but also thinking and coding with patterns. I’ll show how these ideas apply to a killer problem: thread safety. For those who want to learn about PostSharp, there will be a free training day in both towns.

An evening of patterns or a full day of PostSharp? Choose what’s best for you:

Evening Meet-up: Patterns Don't Stop at Design - Be a Pattern-Driven Team

Design patterns are now universally accepted and have significantly improved the way we design software. However, they had relatively little impact on how we implement it. This talk advocates for a better integration of pattern thinking in the whole development cycle. It challenges popular dogmas about design patterns and shows unexpected connections with agile methodologies. It shows how to apply pattern thinking to a top problem: thread safety.

  • On March 12 (Moscow) or 16 (St Petersburg) evening. FREE event. Register now.

Training Day: Advanced PostSharp From the Horse’s Mouth

While the evening lecture remains quite general, this training day describes how we can implement pattern-driven development specifically with PostSharp.

The course opens with a quick journey through the history of programming languages and design patterns, then asks the fundamental question: why is it that we think in terms of patterns, and actually design with patterns, but actually abandon that pattern thinking as soon as we start writing code? This sets up the agenda for the whole day: thread safety, INotifyPropertyChanged, undo/redo, aspect-oriented programming and architecture validation.

  • On March 13 (Moscow) or 17 (St Petersburg). FREE event but limited capacity. Register now.


I’m looking forward to visit Russia again after almost 20 years. Additionally to delivers public talks, I’ll visit Kaspersky Lab in Moscow and JetBrains in St Petersburg. It will be exciting to meet the developers there.

Happy PostSharping!

As we’re now in the stabilization of PostSharp 4.1, I would like to talk in a bit more detail about a few of its features. If you haven’t done it yet, you can download the last preview of PostSharp 4.1 from our web site.

Additionally to adding support for Xamarin and improving support for Windows Phone and Windows 8, we spent a lot of effort improving our Visual Studio extension.

A few highlights are:

  • Support for Visual Studio 2015, including light bulb integration, live code diagnostics and coding guidance.
  • Conservative NuGet versioning.
  • Improvements in PostSharp Explorer.
  • Support for Universal Apps (shared projects).

Visual Studio 2015

As you probably know, Visual Studio 2015 includes a brand new compiler code-named “Roslyn”. The new compiler is used directly inside the IDE and replaces various older code parsers and code object models. This new release of Visual Studio is the one that required us the most significant redesign since Visual Studio 2005, the first version we targeted with our PostSharp tooling.

Thanks to this redesign, we can now rely on powerful and well-designed APIes to understand your code, and as a result we can provide a more useful integration with the source editor.

Light bulb

The first thing you will notice is that PostSharp now makes use of the light bulb instead of the smart tag to provide refactoring actions. The light bulb UI is neater and more consistent than the smart tag one, and it includes the ability to display a preview.

Unlike the ones that are built in Visual Studio, PostSharp light bulb actions may open a dialog box if user interaction is required. For instance, if you choose Apply threading model, you will be asked to choose from the list of available threading models:


Live code diagnostics

Real-time code diagnostics are useful when you are implementing an advanced pattern such as a threading model or undo/redo. We implemented live analysis of the most frequent issues. Just as with other C# errors, you will see the red squiggle and the error will appear in the Error List toolbox window.


Coding guidance, or Cody Clippy

We took live code diagnostics to the next level. When you are in the process of implementing a pattern, for instance Immutable, we will show you the next more relevant issue to solve related to the task you are now completing, and will display links to the most relevant documentation articles.


PostSharp Assistant is based on analysis of your own source code in real time, so it's much more relevant than previous guidance systems.

PostSharp Assistant is a non-modal tool window that you can dock where you want. Of course you can always disable the feature once you learned how to implement a pattern.

Conservative NuGet Versioning

In the past, it was too easy to mess your versions of PostSharp in multi-project solutions. The scenario was the following:

  1. On Monday, you install PostSharp in ProjectA, get the latest version at this time, say 4.0.20.
  2. On Wednesday, we release 4.0.21.
  3. On Thursday, you install PostSharp in ProjectB, get the latest version at this time, that is 4.0.21.
  4. You have both 4.0.20 and 4.0.21 in your solution and you need to solve the mess manually.

There were even worse scenarios:

  1. On Monday, you install PostSharp in ProjectA and ProjectB, get the latest version at this time, say 4.0.20.
  2. On Wednesday, we release 4.0.21.
  3. On Thursday, you install PostSharp.Patterns.Model in ProjectA, get the latest version at this time, that is 4.0.21. Your PostSharp package gets upgraded to 4.0.21 in ProjectA, but not in ProjectB.
  4. You still have both 4.0.20 and 4.0.21.

Unfortunately, this was the default behavior of NuGet. We finally fixed this situation:

  • If you install a new PostSharp Pattern Library in a project that already contains PostSharp, we will install the same version of the new package as the existing version of the PostSharp package.
  • If you don’t have PostSharp installed in the current project, we will look at other projects in the solution and match the highest version already installed.
  • In case we really need to upgrade the package (for instance if you want to use a 4.1 aspect in a 4.0 project), we will first warn you. Note that in this case, we don’t upgrade other projects in the solution so you will have to fix that manually.

PostSharp Explorer

PostSharp Explorer, the Visual Studio toolbox window that shows you which aspects are in your code, is now more useful. You can orient the panel vertically and horizontally, and it has three panels instead of two for better readability.

Universal Apps (shared projects)

We now properly support Universal Apps, the marketing name for “shared projects”. When you add an aspect to a class that is shared among several projects, PostSharp will try to install itself in all projects that use the shared project. That means that you will be only offered the aspects that are eligible for all importing projects. If you need more fine-grained control, you can skip the UI and use directly NuGet and #if blocks.

Note that Universal Apps support is not available in the currently public preview.


Visual Studio 2015 opens a new era in terms of IDE extensibility, exposing to third-party extensions all the knowledge the compiler has about your code. At PostSharp, we’re proud to be among the first commercial vendors to fully integrate with the new features and even provide unseen developing experience like with PostSharp Assistant.

Happy PostSharping!