WP7

WP7 update error 80070026

March 19, 2012 QuickTip, WP7 No comments

I can assume this is of no use for most of you, my constant readers.

But in case you googled for this or just happened to have Windows Phone 7 and cannot update it because of the error 80070026, which you see on the image below,

WindowsPhone7_HTCMozart_UpdateError_80070026

please know: the only solution that helps is complete reset.

Don’t waste your time on searching for solutions – I did it for you. Also reset is not that painful as you might imagine. Just ensure you have all your media and application data backed-up to some clouds or at least local drive. With good internet connection, which no doubt you have at home, reinstallation of apps is super quick, plus you will get rid of junk apps.

To reset either go to “Settings->About->Reset you phone” or use more geeky way with using phone buttons: turn off phone, then press both volume up and down buttons and hold and then press the power button (briefly) to switch the phone on. When you see reset screen release volume buttons and follow instructions.

You might be interested to know if there are some specifics to my situation, so here they are:

Phone: HTC Mozart T8698
Update: 7.10.7740.16 => 7.10.8107.79
When: On performing actual update
OS: Windows 7
Zune: latest version possible

Some links in case you have other update troubles:

 

If you found another solution to this problem please let me know.


No comments


Hackathon “WP7 Rocks!” – we won

November 1, 2011 Success, WP7 6 comments

I would like to share some of my experience and impressions of taking part in “Windows Phone 7 Rocks!” Hackathon in Lviv.

An amazing event

 
First of all, many thanks to the organizers of this event and to the sponsors. Event was really great. Everyone got presents, food and joy of playing kinect at free time and of course tons of intensive coding. Hackathon started with helpful and resourceful presentations delivered by organizers. Two of them were about stuff I think wp7 developer must know – metro design and publishing to marketplace. And I would like to correct myself by replacing “developer” with “Ukrainian developer”, thing is, it is not easy for my country to be appreciated by Microsoft. Other two were about working with data in Mango and augmented reality. Ah.. and forgot to mention that everyone got styling wp7 t-shirt, finally I’ve got one! Awesome!

Hackathon is programming, team, fun and creativity

I hardly remember any other day when I had such intensive programming time. Not to say that I didn’t have sleepless all-night coding, but I was somewhat relaxed, making tea time to time surfing internet when realizing that copy-paste is no longer working. It was different, it was team play.
As you may know at the moment I work on enterprise WP7 project and my team has 8 developers. 6 of us took part in the Hackathon which formed 2 Hackathon teams. I cannot express well enough how much this night made us more closer to each other and how extreme team-building it was. But I strongly ensure you that it worth each minute we spent together coding two great ideas to be presented next day. During the night we did 125 commits to the source-control (4:59PM first commit and 11:22AM last commit). Can you imagine such productivity of the hired people? Never. Of course no one can work such intensive for long time.
So here we are:
6 most closest people. Sorry for two of them not looking at you and for me also – I’m busy.
On Monday our scrum master sent congratulation to us and here is how it looks like:
Hold on for a second. Winners? Yeap! But wait for a second. First things first.

Applications developed

At the moment there are no presentations available in the internet or video, so I cannot say much about other teams. Hopefully I will update this blog post soon. But I can remember many great applications developed by others, such as handy cartoon-creator, quest generator and player, travel places logger, guitar tuner, ball game, and many other nice applications. 3 of us created “real-problem” solving application – “WC Emergency”, which by it’s idea exploded auditory: when you really have “need”, you start app and answer 2 basic questions “How long can you wait?” and “How fast can you run?” after which you get the most reachable WC.  Some other team even managed to create 3D game, to the last moment I thought they will take first place. For the complexity they probably deserve first place, but…

Winners!

image

We managed to create something more exciting. We invented pure FUN. So other 3 of us created mini-game “Face 2 Face”. Splashscreen below:

 
After which you get selection for the single player or multiplayer mode:
 
For the single player you can play with blue-red balls or can load images instead of blue or read ones. Here single player simple mode:
 
Idea is simple – you keep friends on the battle-field and throw enemies out of it. Physics for two-kinds is different, I will keep it in secret.
But joy begins whey you selected multiplayer, took pictures for your team (faces cropped) here:
 
Found other guy willing to play with you. He takes pictures for his team on his phone (!). Game starts and you both have all pictures. You throw his guys and keep yours, he does the same for his team.
 
That angry bomb also has something to do with the game, but it is secret.
I think me and Taras managed to impress people when we started taking photos of them and playing with those in front of the auditory. Great that we had server-side coverage by Roman.
I bet this gave us new emotions and inspiration for the future. We also got HTC Mozart phone as present.

Thanks

Everyone was really pleased and despite those sleepless-red-eye-faces it was clearly seen that no one was disappointed of spending 24h non-stop coding.


6 comments


WP7 Mango and NUnit from console

October 22, 2011 HowTo, NUnit, UnitTesting, WP7 3 comments

If you are building Windows Phone application you probably have faced… well… not rich support for unit testing. But of course there is one rescuing thing – WP7 is almost the same Silverlight application. Thus you have wider area to search for solution. Awesome… but I wouldn’t write this blog post if everything is that easy. Right?

 

Support for NUnit and command line

Microsoft for some reason doesn’t care about huge community of those who use NUnit for their projects, and believe me not for small projects. So there of course is mstest project template that allows you to run tests inside of the appropriate CLR. There is good Silverlight Unit Tests Framework and here is information on how you can cheat in order to get it working for the phone. Problem with these two frameworks is obvious – they are not supporting console – they run in native for Silverlight environment – either on phone or in web. See pictures (phone and web respectively):

image

I know that there are ways to make it happen from console under (msbuild for example this temporary wp7ci project on codeplex). Hold on… one second. Again something very specific to Microsoft – msbuild. But what if I’m using nAnt?

Of course there is port of the NUnit for the Silverlight (here is how), also you can change tests provider in the “Silverlight Unit Tests Framework” (further SUTF).

Nevertheless summary is simple – no support for running nunit tests for the WP7 from command line.

 

Support for command line – solution

I came up with odd solution to force nunit-console to run unit tests in command line. After I observed it crashing with error TargetFrameworkAttribute I reflected mscorlib and googled a bit to discover this attribute exists in mscorlib of 2.0.5.0 version, but nunit actually targets 2.0.0.0 one (.net 2.0). Thus I decided to download sources of NUnit and recompiled those against .net framework 4.0 (mscorlib 2.0.5.0). Reason for this error is that Silverlight also uses higher version of mscorlib.

Awaiting for NUnit 3.0 which is promising to have support for Silverlight.

 

Support for Mango – problem

Before upgrading to Mango our tests for WP7 were created by testDriven (to be honest – it is what they use inside of their SUTF). We didn’t have support for command line and tests were running only because they are so Silverlight compatible.

With updating to Mango everything just died. Tests projects simply didn’t get loaded into solution. With this message:

image

“Not a big deal” you say. Actually a big deal, because you can get rid of this message by editing project files to have target framework profile set to WP71 and to reference only WP71 assemblies. But in this case you lose all of you compatibility with Silverlight and when you run your tests you start to get weirdest exceptions in the world like this one below:

System.DivideByZeroException : Attempted to divide by zero.
at System.Collections.ObjectModel.ObservableCollection`1..ctor()

At least this brings some more sense:

System.InvalidProgramException : Common Language Runtime detected an invalid program.

 

Support for Mango – solution

Solution I came up with is not 100% right, but at least it works. I just had to pretend that I’m still completely compatible with Silverlight. So I created copy of my project. One is considered to be used from command line and other for usage from VS.

Project 1 is used under VS has correct references directly to WP71 assemblies, like below:

    <Reference Include="System.Windows">
<HintPath>..LibrarySilverlightWP71ReferencesSystem.Windows.dll</HintPath>
    </Reference>

This ensure that VS loads your projects without errors, also you make it think it is WP7 by these:

    <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>

and this:

<Import Project="$(MSBuildExtensionsPath)MicrosoftSilverlight for Phone$(TargetFrameworkVersion)Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)MicrosoftSilverlight for Phone$(TargetFrameworkVersion)Microsoft.Silverlight.CSharp.targets" />

Project 2 is used for console and is pretended to be pure Silverlight, so it has:

    <Reference Include="System.Windows">
            <Private>True</Private>
    </Reference>

Which in reality copies (because of <Private>) wrong assemblies – from Silverlight, not from phone.

You would need to play a lot with which assemblies you want to get in folder where you run tests. I do have some confidence that Silverlight and WP7 are much compatible thanks to this brilliant explanation of what is WP7 from developer’s view.

 

Results

image

At #1186 I finally got build working and running tests. At #1193 I invented this Silverlight pretending trick. And finally till build number #1196 I ignored couple of incompatible tests and fixed some really failing tests.

Hope this helps someone. At least it is going to help my team.


3 comments