Dotfuscator–Resign assemblies manually?

I were just setting up some “tracking” on a Windows Phone 7 application, using PreEmptive Solutions Dotfuscator, when I got some odd problem. First I just setup all up as I use to and deployed to the WP7 emulator. Application started and shutdown right away. Hmm, I tried again and again, same thing happened. I then looked closer at the “Build Output” window in Dotfuscator and saw this at the bottom:

Warning: The strong named input assemblies (or assembly) {Assembly name and path here } were not resigned. You will need to sign these dotfuscated assemblies manually

I could figure out that the reason why I needed to resign it, were because dotfuscator have had a look on it – I therefore needed to figure out how to avoid it to do so.

It turns out that you can exclude assemblies inside dotfuscator, just go to the “Input” tab, expand your .xap file until you find the assembly that gives you problems, right click it and pick “Exclude assembly from Package”.

Just a little help if anybody else ends up with this problem Smile

– Enjoy!

February Silverlight GeekNight in Copenhagen

In February we held another Silverlight GeekNight event in the Silverlight Developers in Denmark user group. Again this time there were a great dialog between the “geeks” and everybody were helping out each other with various problems and questions.

GeekNightFeb2011

[more]

GeekNights are just the perfect place to try out new stuff. At the GeekNights you have around 5-6 hours of focused development/researching time. No girlfriend, wife, kids, dogs and what have you, are there to disturb you.
It’s just you and Silverlight – and a bunch of other geeks doing the same thing.

These are the perfect conditions to learn new stuff (hands on!) and get help from some talented geeks if you run into problems.

We are so lucky to have some pictures from this February GeekNight – here you go.

DSC00023

DSC00024

DSC00025

Thanks to Thomas Martinsen for his beautiful pictures of “Geeks doing their ‘thing’” Smile

See you at the next GeekNight: http://www.eventbrite.com/event/1178038545

Unable to handle EndPointNotFound exception on WP7

Over the last few days I have been working on an online high score for the Windows Phone 7 game ‘plan bee’, which is done in XNA. (I guess this problem is also relevant for Silverlight applications). I had the service setup and all were good, data were flowing back and forth. To give the player a good experience when playing the game I of course started to test the game without internet connection, as this can happen on a mobile device like WP7 Smile

Then the game crashed right away and at first I just thought I forget to check for something and attached the debugger. The debugger showed me that an EndpointNotFound exception were thrown. I tried a lot of things and couldn’t figure out how I could avoid or catch this exception!

Angry developer

[more]

I tried to put try/catch around the freaking method calling the service, but the exception still insisted on begin thrown right when I tried to access the service. WTF!

Then I started googling around the net to see if anyone else had the same problem – and apparently I were not along with this – lucky me. People were tried really creative things, that were…yeah creative… but also really stupid some of them and wouldn’t work in the long run.

Solution

Suddenly I came across this little thread: http://forums.create.msdn.com/forums/p/69485/435804.aspx#435804

babaandthepigman: “Isn’t this exception a ‘first-chance exception’ caught by the debugger?

face_palm

In my aggressive attempt to figure out why this exception were thrown, I never tried it without the debugger and never had the time to press F5 after I saw the exception in the debugger. If I had done that, I would have discovered that the game continued to run and that I went into my “_Completed” event handler method where I could have checked for e.Error != null and have done what I wanted – without the game crashing.
Stupid me!

The funny thing is that apparently is that a lot of people have done this – you might be one of them as you are reading this post Smile Even funnier is how the thread just stops after the quoted comment above.

Hope this helped you with this “problem”.

– Enjoy!