As most of you know at MIX10, we released the first version of the Windows Phone 7 developer tools (which are free) targeting Silverlight and XNA development to the world. This was a community technology preview (CTP) release and targeted Visual Studio 2010 RC at the time (which was the publically available version). Since MIX10, Visual Studio 2010 has released in final form and the phone developer tools team has been working to get a working version finalized.
Today is that day – we’ve just made available the Windows Phone Developer Tools CTP (April 2010 Refresh) (direct link download). This is the installer that will install directly on your machine. If you don’t have any version of the tools installed, this will install the Visual Studio express edition for Windows Phone 7 (free). If you already have any released version of Visual Studio 2010, this will install the tools on top (integrated) into those.
This April refresh is still a CTP-quality and as such there are a few known issues with this latest release. Our goal was at least to get a set of tools that would be available to enable people to move to Visual Studio 2010 release. The known issues are documented in the release notes for the April 2010 refresh. Specifically the first item as a known issue in the release notes:
Authenticode signed assemblies fail to load. When including Authenticode signed assemblies in your project, the application XAP will fail to deploy and run. This includes the use of Microsoft client libraries such as WCF Data Services, the Silverlight Toolkit, and 3rd party managed libraries. This issue will be resolved in a future release to permit the inclusion of Authenticode signed assemblies.
This might be annoying for some. We will eventually get this fixed in a future release and understand this is annoying to some. We apologize for this. We do have a workaround for you in the manner of a PowerShell script (note: PowerShell is included in Windows 7, otherwise download a version here). Here is the workaround (also noted on Charlie’s blog).
You will know if you hit this issue if your app deploys to the emulator but fails to actually run with a System.IO.FileLoadException then you are likely hitting this issue.
The PowerShell Script
Attached here is the PowerShell Script – right-click and save this somewhere known.
Using the script
Here’s the steps to using the script on the assemblies that will cause you issue (those signed assemblies).
- Copy the script to the folder containing the signed assemblies
- Open an elevated command prompt (this must be done in elevated mode) and enter powershell (type: powershell) – alternatively you could start powershell itself
- Run “.\wp7ctpfix.ps1 <your-signed-assembly-fully-qualified-path>” in the PowerShell window
- The script should show ‘operation succeeded’ if successful.
- A *new* assembly prefixed with “WP7_CTP_Fix_<signed-assembly>” in that directory
NOTE: If you get a warning that the script couldn’t be run, in PowerShell first run set-executionpolicy Unrestricted and then proceed (and reset back to Restricted if desired).
You’ll need to do this on all assemblies you reference that might be impacted. NOTE: This does not alter the existing assembly, but rather creates a NEW COPY for you to use temporarily.
Using the fixed assemblies
Once you’ve completed the step above, you’ll have to change your project refrences:
- Expand the References section of your project and remove any of the problematic references
- Add a reference pointing to the newly created copies done in the step above
Using these fixed assemblies will only work in the emulator. Since right now there is no means of application distribution for the masses, this isn’t an issue. Again, we will be fixing this issue and it is only temporary – we have no announcements yet, however, on when the next update of the tools will be. As noted in Charlie’s blog because this is a little bit of a ‘brute force’ technique, Microsoft is giving permission to do this with this fine print:
So as to enable you to load your applications on the pre-release version of the Windows Phone 7 operating system that is included with this April 2010 CTP of the Windows Phone Developer Tools, you may temporarily remove the signatures from any Microsoft-owned assemblies that you would otherwise be licensed to include in your programs, solely for the limited purpose of evaluating this CTP. Upon the next pre-release of these Developer Tools or July 31, 2010, whichever is earlier, you must replace such signature-stripped assemblies with assemblies from which the signatures have not been removed. Nothing in this statement should be interpreted as permission on behalf of owners of non-Microsoft assemblies.
What’s New in April refresh?
There are some new items in this refresh that we’ve changed/added which are noted in the What’s New topic in MSDN. Here are some highlights:
And a few others – be sure to review the topic link above on MSDN.
What about Expression Blend?
Expression Blend 4 had a plugin that enabled Windows Phone 7 development as well. This plugin has also been updated for this April 2010 refresh. You must have the Expression Blend 4 RC installed first.
You can get the updated Blend plugin here:
Please read the release notes before installing the tools. If you think any of the known issues will impact you significantly, please do what you think is right (if that means sticking with the March CTP build on Visual Studio RC). The bug above was discovered late in our plans. We had to make a decision whether to hold up another potentially ‘weeks’ or release what we had in another CTP form. In this case we chose the to release what we had to provide something that customers have been asking for.
There are a few other known issues of this refresh that you should review, but also some new items as indicated above.
Other useful resources:
Hope this helps!