Create your first Azure Mobile Services application

It is very easy to create your first Windows 8, Windows Phone 8 or iOS application with Azure Mobile Services tools. In this post, I will demonstrate how to create a sample “ToDo” application. In fact, it will take you longer to read this post than to execute the steps in it!

Log in to your Windows Azure portal and go to the Mobile Services section. Click on the Create a mobile service link.

[Read More]

Productivity Power Tools 2012

The productivity tools for Visual Studio 2012 are now available. In addition to the same features as the 2010 version, the new features of this version are:

  • Quick tasks
  • Power Commands
  • Color printing

All features can be individually disabled in the options. If you have never tried them, don’t hesitate, it could increase your productivity.

Happy coding!

Visual Studio 11: Caller Attributes

One of the new features of Visual Studio 11 and the .NET Framework 4.5 are the Caller attributes:

  • CallerMemberName: allows you to obtain the method or property name of the caller to the method.
  • CallerFilePath: allows you to obtain the full path of the source file that contains the caller. This is the file path at compile time.
  • CallerLineNumber: allows you to obtain the line number in the source file at which the method is called.

These attributes help to simplify the code in certain scenarios, such as logging or when using the INotifyPropertyChanged interface (as in MVVM) and you need to pass the name of the calling property.

[Read More]

Microsoft and UserVoice

For some time now, Microsoft use the UserVoice platform for gathering feedbacks from some of their products, which mostly target developers. UserVoice is really good for that task and its looks even better than Connect for feedback, which is still use for bugs and technical issues. But I don’t they are any list detailing theses site. So here’s my short list, and if you found one, let me know!

SharePoint 2010 and VS2010: Post-Deployment Scripts

Context

You are developing a SharePoint 2010 application using Visual Studio 2010 on a Windows 2008 64-bit server. You want to run a post-deployment script (PowerShell for example) for debugging:

image

The Problem

When you add a script, for example: powershell $(ProjectDir)\PowerShellScript\MySuperPowerShellScript.ps1

You always get an error when running the script:

Error occurred in deployment step ‘Run Post-Deployment Command’: The command "powershell $(ProjectDir)\PowerShellScript\MySuperPowerShellScript.ps1" exited with error code: 1.

This error is due to the fact that VS2010 runs in 32-bit mode, as well as its post-deployment scripts, and the SharePoint 2010 APIs run in 64-bit mode. This creates errors when executing the script.

[Read More]

I received a Windows Phone 7

Well, it may not be connected to a cellular network and it may be second-hand, but yesterday I received a Samsung Taylor for Windows Phone 7 (WP7) development!

I had fun with it last night and I am very satisfied with the device. Obviously, since it is a pre-production development device, it does not have all the features of a production phone. But all in all, it has all the functionalities of WP7.

[Read More]

How to Create Your StyleCop Rules

StyleCop is a free tool from Microsoft that allows you to check the style of your code (or others’). Additionally, StyleCop is now available as Open Source (on Codeplex), so I strongly recommend looking at the default rule implementations to help you create your own.

Create Your Rules

Here are some steps to create your custom StyleCop rules:

  • Install the latest version of StyleCop
  • Download the SDK of StyleCop (documentation .chm file)
  • Start Visual Studio
  • Create a new project of type “Class Library”
  • Add the following references - Microsoft.StyleCop - Microsoft.StyleCop.CSharp - Microsoft.StyleCop.CSharp.Rules

StyleCop_SolutionExplorer

[Read More]