PostSharp 4.1 focuses on extending the set of supporting platforms by adding Xamarin (both iOS and Android), Visual Studio 2015, Visual Studio Universal Apps to the list of compatible products, and by improving the level of support of Windows 8 and Windows Phone. PostSharp 4.1 will also support new minor platform updates automatically, without requiring any update of PostSharp itself.
This is definitively our biggest headline. PostSharp 4.1 now supports Xamarin at the same level of feature as Windows Phone or Windows Store. Excepted the diagnostics pattern library, all PostSharp features are now strictly cross-platform and have been tested on several physical devices.
PostSharp 4.1 is an excellent choice to build large and complex applications for mobile devices and will deliver the same economies of scale as for desktop or server applications, possible saving thousands of lines of codes and hundreds of defects.
Note that Xamarin Studio is not supported. You must build your application on Windows using Visual Studio in order to use PostSharp with Xamarin.
There’s no specific tutorial on how to use PostSharp with Xamarin. It just works as usually: open your project in Visual Studio, move your caret on a class and add an aspect from the smart tag (in VS 2013) or light bulb (in 2015).
Visual Studio 2015 Support
PostSharp Tools have been fully rewritten to take advantage of the new architecture of Visual Studio 2015.
- Light bulbs are used instead of the smart tags: not only it looks better, but it also better integrates with other vendors such as Microsoft, Resharper or CodeRush.
- Real-time code analysis detects the most common errors in seconds so you don’t even have to recompile.
- Real-time coding guidance shows you what’s the next step to implement more complex patterns like threading models or undo/redo.
- More accurate parsing of C# code, resulting in higher reliability of PostSharp editor integration.
PostSharp Tools Improvements
Besides VS 2015 support, PostSharp 4.1 includes other significant improvements in the tooling for Visual Studio:
- Universal apps, the marketing name for shared projects, are now properly supported.
- PostSharp Explorer is now much more usable and accurate than before.
- Conservative NuGet Versioning prevents unwanted updates of your NuGet packages. PostSharp will always try to match the version that you’re already using in your solution and will politely ask if an update is needed.
- Windows Phone Get Threading. Additionally to Xamarin, PostSharp Threading Pattern Library now becomes available for Windows and Windows Phone (both Silverlight and WinRT), so you can build apps that are both thread-safe and cross-platform.
- Code Contracts Localization. You can now customize the text of exception messages. Please see the documentation for details.
- No Strong-Name Verification at build-time. It does not affect strong names at run-time.
- Automatic support of minor platform updates. Minor updates (like from 4.5 to 4.5.1) should now be automatically supported without any PostSharp update.
PostSharp 4.1 is all about new platforms. With complete support for Windows Phone, Android and iOS, you can leverage the boilerplate-cutting power of PostSharp to your mobile applications. And we proved we’re ready for Visual Studio 2015, with exciting new features that will improve your productivity.