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]

C# 5.0: Asynchronous Programming

For those who are not aware, you can download the Visual Studio Async CTP to get a preview of what is coming in the asynchronous world! This is just the CTP version, so there may be changes between this version and the official release.

Also, visit Eric Lippert’s blog to learn more about the topic.

[VS2010 Tips] Multi-line Insertion

While reading the MSDN article on converting VBA applications to C# 4.0, I remembered the famous ALT+[Selection] function that allows you to insert the same text/code on multiple lines at once. So, here is the English version of that part of the article:

Press ALT and select where you want to insert your code (selection in light blue in the image below):
image
Type your code and boom! All the selected lines have been filled with your code:

[Read More]

Unveiling Microsoft LightSwitch

Microsoft has just unveiled LightSwitch, a tool for developing business applications without having to touch the code. Jason Zander provides an excellent introduction on his site.

There will be a template for C# and VB. At first glance, the generated application seems to run on WPF for the Desktop version, and probably Silverlight or XBAP for the web version.

The beta will be available on August 23rd.

Stay tuned