10 Free eBooks from Microsoft Press

@MicrosoftPress just tweeted about 10 official free ebooks on twitter a few minutes back. I’m collecting all links from twitter and sharing them here in one post for those who missed it.

Introducing Microsoft SQL Server Code Name “Denali” (DRAFT Preview)

Introducing Microsoft SQL Server 2008 R2

Understanding Microsoft Virtualization Solutions (Second Edition)

Moving to Microsoft Visual Studio 2010

Update Your Skills with Resources & Career Ideas from Microsoft

Introducing Windows Server 2008 R2

Programming Windows Phone 7

First Look Microsoft Office 2010

Deploying Windows 7, Essential Guidance

Microsoft Office 365: Connect and Collaborate Virtually Anywhere, Anytime

Windows Phone 7.1 (Mango) – Socket Sample

As some of you might know, I’m currently writing a book called “Windows Phone 7 in Action” with two amazing authors for Manning. We managed to put new sample for Socket to our git repository yesterday. Our small program has the conversational style chat message view which is similar to the SMS view on Windows Phone (Mango) and socket classes ( Tcp Unicast, Udp Unicast and Udp AnySource Multicast). In order to make our code simple, we didn’t add any validation logic in our code. We hope that our sample might help for those who are new to Windows Phone socket programming.

You might say that there are some examples for sockets in MSDN already but one important thing to note is that the author of those samples encourages developers to use ManualResetEvent. It’s so misleading. I don’t really understand why they did that. But all I can do is to give them feedback so I (and a few other MVPs as well) submitted the feedback a few months back but nothing changed until now.

Anyway, let’s get back to our sample code. Here is the folder structure and a bit of details about samples.

Clients

  • ChatTcpUnicast : This sample uses Tcp Unicast so you will have to run the Tcp Server to test the code.
  • ChatUdpAnySourceMulticastClient : This is UdpAnySourceMulticast sample so you don’t need to run any server. It’s just peer-to-peer.
  • ChatUdpUnicast :

Servers

  • TcpSocketServer
  • UdpSocketServer

You can download the full source from this link below.

Githttps://github.com/timothybinkley/Windows-Phone-7-In-Action/tree/master/Chapter09/Socket

Please feel free to let us know if you have any question or anything for improvement. We are sorry that we couldn’t write all those explanations here. If you are interested in detailed explanation, please get our book ”Windows Phone 7 in Action” from Manning. Thanks.

UPDATE: 

Note that I didn’t use appbar which is not bindable and doesn’t have Command.. so you gotta touch twice to send the message .. You may want to replace with this bindable appbar http://www.maxpaulousky.com/blog/archive/2011/01/10/bindable-application-bar-extensions-for-windows-phone-7.aspx

X-Calibre Hackathon – Win Nokia Lumia devices, and $7K USD worth of cash prizes.

My friend “Chris Ismal” from Nokia posted about the event that he and his team are organizing in our Singapore Silverlight Facebook page. This event is called “ X-Calibre Hackathon”. It’s a full day event that developers come and build the application for Windows Phone by using latest Windows Phone 7.5 (mango) features.

You can read the details on their official website. I copied and pasted some informations for you here as well.

Winners will ride away with a trophy unlike any other, and Nokia Lumia devices to the 1st prize winning team, and…

  • 1st prize -$4,000 USD
  • 2nd prize – $2,000 USD
  • 3rd prize – $1,000 USD

The winning apps will also be featured in Nokia’s App Highlights and Amazing Everyday Marketing Campaign!

What is X-Calibre Hackathon?

X-Calibre Hackathon is a one-day Windows Phone application building contest (9am – 6pm) happening on November 19, 2011 where developers compete to create the best WP app using Mango features such as  Metro UI, Live Tiles, Fast App Switching etc.

What is the judging criteria? 

Judging will be done by representatives from Nokia, Microsoft, and the WP Champs.  There will be no criteria weightage.  Judging will simply be based on “the best Windows Phone app that uses Mango features such as Metro UI, Live Tiles, Fast App Switching, and others!”

What are the contest details?

  1. The chosen 60 participants will be divided into 4 groups each stationed at different locations.  Groups will compose of teams with maximum 3 members each team.  In total there will be 20 teams.
  2. Two Windows Phone Champs will be managing and providing technical support to each of the groups.  In total there will be 8 Champs.
  3. The contest will commence at 9:00 am simultaneously throughout the locations.  The Champs will be on-location until 6pm.  Venue is only available until 6:00 pm.  Contest (submission) ends 11:59 pm on the same day.
  4. Bring your own laptop, wifi, and food!5. Contest winners will be announced at the Awarding event in Nokia Singapore (date to be confirmed)

Blend 4 + VS 2011 (Preview) = Problem?

Problem: 

Microsoft Expression Blend 4 crash on startup after installing Visual Studio 2011 Developer Preview on my machine..

Solution: 

I found this bug report in MS Connect.  Christopher Cole from Microsoft Expression responded that report with the solution below.

There is a compatibility problem with .Net 4.5 installed as part of the Developer Preview and Blend 4. This issue was fixed, but too late to make the preview build.

The workaround is to run:

%windir%\Microsoft.NET\Framework\v4.0.30319\ngen uninstall “%ProgramFiles(x86)%\Microsoft Expression\Blend 4\Microsoft.Expression.Framework.dll”
%windir%\Microsoft.NET\Framework\v4.0.30319\ngen uninstall “%ProgramFiles(x86)%\Microsoft Expression\Blend 4\Microsoft.Expression.Blend.dll”
%windir%\Microsoft.NET\Framework\v4.0.30319\ngen uninstall “%ProgramFiles(x86)%\Microsoft Expression\Blend 4\Microsoft.Expression.Project.dll”

If “%ProgramFiles(x86)%\Microsoft Expression\Blend 4\Microsoft.Expression.WindowsPhone.dll” is present (for scenarios like Blend V4 SP1 or future releases), please also run:
%windir%\Microsoft.NET\Framework\v4.0.30319\ngen uninstall “%ProgramFiles(x86)%\Microsoft Expression\Blend 4\Microsoft.Expression.WindowsPhone.dll”

I just tried it on my machine and it works for me so I’m sharing it with my readers here..

Edit: 

Error: Unrecognized option Files

You have integrated Git with Command Prompt, you will get this error when you run “ngen”. If you happen to have the older preview version of git, you will get the error below when you try to uninstall it. I had to delete the git folder manually.

—————————
Error
—————————
Runtime Error (at 18:1292):

Could not call proc.
—————————
OK
—————————