Linq To Entities Walkthrough

Linq To Entities Walkthrough

This post follows on from my previous comments on the Orcas Beta 1

The first thing you will need to do if you want to work with the Entity designer in Orcas Beta 1 is to download and install the fix (see my previous post).  This does NOT appear to include the drag-n-drog design surface that will enable you to redesign your entities but does at least provide a UI interface to the EDM tool. 

The first step in building an application that uses Entities to pull data too and from the database is to add a Data Model to your project.  You can do this via the usual Add New Item dialog:

Add New Item – ADO.NET Entity Data Model 

Select Generate from Database, Unless you want to code everything by hand! 

Using the familiar New Connection button you can set up a connection to your database  

Next, choose the database object you want to import as entities. 

You will notice it adds three model files and a generated code file

Although the individual class files don’t exist, you now have a series of classes defined that map to the database objects you previously selected.  If you open up the Class View window you will see them.

The next thing to do is to setup the databinding and the UI.  In the same way as you could add an object binding source in [VS2005] you can do the same thing via the Add Data Source item on the Data Menu.  Selecting Object as the data source will present you will a list of objects to choose from.

Notice the entity classes are all in a generated namespace.  In our case we have selected the Manufacturers class.  The Entity generator still doesn’t cater well for moving between singular and plural names!

Once we have added an Object Data Source we can use the Data Sources window to drag-n-drop either a grid or details onto our form.

Select the Data Grid View

Tidy up the form and remove unwanted columns – To remove these out of the entity model is a bit of a mission as you have to remove them from the 3 model files.

Next we need to add a little bit of code to the Load event of the form so that we can populate the data grid:

Public Class ManufacturersForm
    Private dc As New MobileEntities   

    Private Sub ManufacturersForm_Load(ByVal sender As System.Object, _
                                                              ByVal e As System.EventArgs) Handles MyBase.Load

        Dim mans = dc.Manufacturers.ToArray     (4)

        Dim manufacturers = From manufacturer In mans _              (2)
                                          Where manufacturer.MAN_Name.Length > 5 _
                                          Select manufacturer.MAN_Name, manufacturer.MAN_URL

        Me.ManufacturersBindingSource.DataSource = manufacturers           (3)
    End Sub
End Class

  1. In order to work with our entities we need a data context (think of this as a data manager that is responsible for loading, refreshing and saving your data).
  2. Lets use a bit of Linq to select Manufacturers with Names with a length greater than 5.  Note that we are projecting only the Name and Url fields from the Manufacturer class
  3. Now apply the data to the binding source.  Note that although we built the binding using the full Manufacturer class because we only use the Name and Url fields in the grid we can get away with binding to the anonymous type projected in the previous linq statement
  4. Unfortunately Linq to Entities is still relatively broken and on occasions you will have to force a pre-evaluation of the query in order for the following query to execute!

We now have a working sample – How easy was that!

This shows you the very basics of how to bind (single-direction) entity data to a ui grid.   

Me Too Post: Young IT (WA) Presents "IT in the Pub"

Me Too Post: Young IT (WA) Presents "IT in the Pub"

Chuck has the first word but I figured that this one is worth a re-post (sux to be a reader of the Aus-Dotnet mailing list as this might be the 3rd or 4th time you have read this….):

Young IT in conjunction with Porter Consulting Group would like to invite all ACS Young IT members (<= 35yrs) and guests to “IT in the Pub” at the Broken Hill Hotel ( in Victoria Park on Friday 4th May 2007 @ 6pm.

This social event provides an opportunity for ACS young IT professionals, students and industry representatives to network with each other on a social, business and professional basis. So its time to get away from behind those monitors, leave those notebooks and pdas at home, and have a few drinks on us.

Free food and drinks (Beer, Wine and Soft drinks) for the first hour or until the bar tab runs out. Representatives from Porter Consulting Group and various IT organisation will also be present.  This is a “Bring a Friend” initiative.

Attendance is free for ACS Members and they are encouraged to invite 1 friend at no cost, with further friends at the standard $5 fee.

If you would like to attend please register now for the chance to win one of the many door prizes: 

Hope to see you there!

Young IT Committee

You can’t park that iPhone here!

You can’t park that iPhone here!

With all the hype around the iPhone I think everyone has forgotten what really matters.  Apple are using their ability to create a rich and effective user experience which in my opinion is why the iPhone is getting so much attention.  It’s not that they are doing anything that “can’t” be done on an existing device, it’s the fact that they are pushing the bounds of accepted user interface design.  Perhaps Gabriel from Small Surfaces is right in saying that a “consistent UI … is hampering … innovation” but I think Alex might disagree.

This, believe it or not, is a .NET Compact Framework v2 application that really demonstrates the ability to build a rich user experience on the Windows Mobile platform.

Office in the Cloud, SaaS and Internet Operating Systems

Office in the Cloud, SaaS and Internet Operating Systems

Tim posts on why he doesn’t see the value in Cloud-base applications while he sees value in having Cloud-storage (eg Amazon Simple Storage Service (S3)).  I’m not sure I particularly agree.  With the advent of various rich Internet application toolkits (ie toolkits that facilitate building Internet applications that mimic rich client applications to the extent of working offline) cloud-base applications mean that there is zero-cost for not only installation but also accessibility.  This means that you can be sitting in an airport lounge or at an Internet kiosk and still have your favourite in-the-cloud application.  Of course if you are using cloud-applications you are going to need cloud-storage, no questions there but aren’t you going to run the risk of loosing your data – not in the backup/recovery sense, more in the ability to remember which cloud-application you were using and where it was stored!

That said I personally can’t think of anything more tedious than using cloud-based applications and/or storage.  I’d much prefer to spend time installing a product in order to have a rich, zero-wait user experience than having to suffer through some new cloud-based application. Now once I have a rich client application why would I pay money (agreed not a very large amount of money) to store this in the cloud.  I might as well store it locally or on my work fileshare?  What might be useful would be if my rich client application could sync with a cloud-based storage.  That way I have my data locally but if I move to another device I can easily pull down what I was just working on.  Perhaps something like the Mozy online backup service could be tweaked to work this way?

Taking a real example, my application for a Scrybe account came through yesterday (I originally jumped on this from Scoble’s post last year) and I went through the process of setting up yet another account – why can’t more of these services use existing account infrastructure like Google, Yahoo or Windows Live accounts?  Upon eventually signing in I’m yet to work out what the big song and dance is all about.  Other than a bit of wizzy flash animation to make the calendar resize as I select a date it offers next to no benefit over Outlook.  One thing that Scrybe does have is PaperSync which means you can print it out your calendar in a format that can readily be stuffed into one’s pocket (which I seem recall is a tip from but there is no ability to Sync to Outlook?  Why would I use Scrybe when I have Exchange server that gives me Outlook Web Access out of the box and has almost seamless integration with both Outlook and my mobile device across HTTP?  Sorry Scoble, you’re wrong about Scrybe – this one is a waste of my time!

One service I thought might be of interest to us developers is the Amazon Simple Queue Service SQS.  Although you can’t appear to use this for large peer-to-peer data swapping (the message has quite a low size restriction) it could be quite useful for building distributed applications that work across a network of computers.  In thinking about it the cloud-storage mentioned earlier could be the storage for any blocks of data required by the processing units.  The queue then is used to schedule and monitor work progress.

Ok, the last thing I want to touch on are just a couple of other interesting services and links I’ve come across.

Xcerion – Internet OS –

This is here cause I’m not sure what they are going to release as their website seems quite vague.  A friend of mine says that their technology looks interesting so I’ve signed up to get the latest.

Office Live – Hosted Sharepoint/Contact manager –

I used this service in the early beta days and thought that it was quite good for small companies that want to share documents, calendars, contacts etc but don’t want to invest in Sharepoint infrastructure.  If you couple this with hosted Exchange 2007 you have most of the infrastructure a SME requires.

Connected Services Sandbox – SaaS –

Think about some of the goals set out in the early days of webservices where organisations could publish their services and other organisations could consume them – This site is helping to fulfil this objective. It is effectively a seed project to help kick off the development of applications that pull together one or more network services.  You can either use the existing services to build your application or you can use the sandbox to build your own webservices that can then be consumed.

Mobile Developers Say Farewell to AppForge

Mobile Developers Say Farewell to AppForge

As Paul over at MoDaCo has pointed out AppForge has no more.  Unfortunately according to the Wikipedia entry so has all the IP and the licensing rights to boot.

I think this is a slap in the face by Oracle to all those mobile developers out there that have used AppForge in the past.  It’s business decisions like this that are costing Oracle market share in the database space and ruining their reputation amongst developers.

Orcas goodness from the VB team

Orcas goodness from the VB team

As Bill has pointed out (and again) the VB team have a number of webcasts lined up.  In fact the SDLC Blog has a great summary of dates, times and a brief abstract here.  Here is the quick list so you don’t miss out: 

The Microsoft Developer Show – Take 2

The Microsoft Developer Show – Take 2

Last year I took over running The Microsoft Developer Show from Dr Peter Stanski and was able to deliver a number of podcasts while based in Wellington.  Unfortunately the shift back to Perth has result in my time being otherwise spent (check out the main SoftTeq website to see our involvement with the local IT industry).  I did manage to capture the two .NET user group sessions we have had and they have just hit the airwaves:

If the sound quality is a little poor I must apologise as it was recorded with an open mic attached to my iPod.  The presentation slides will be available shortly.

Going forward I’m hoping to have more local content as well of getting the goods on all the new stuff coming our way this year.  As per usual if there is any feedback, please feel free to drop me a comment or two.

Going Occasionally Connected with Orcas

Going Occasionally Connected with Orcas

Visual Studio vNext (aka Orcas) has a number of features that is set to make building occasionally connected applications really really easy.  Since downloading the Beta 1 bits I have been trying to get my head around all the improvements and changes that Microsoft have added.  I must admit the overall stability of Visual Studio is quite good – I’ve only had it crash once or twice and that was actually the compiler that seemed to die rather than the IDE itself.

As a number of people (Amanda and Daniel, twice) have mentioned one of the things you will immediately notice is that Intellisense has gone absolutely nuts, it’s everywhere.  As soon as you type, it’s there – sometimes infuriatingly so ;-).  In [VS2005] I thought that C# did a better job with their intellisense support as it appeared more frequently without have to manually invoke it (ie through Ctrl-Space).  In Orcas VB Intellisense rock – in particular I love the support for both Linq and working with XML. Oh, and did I mention JavaScript support too?

The first thing about building an Occasionally Connected application (OC App) is that you need to think about how you are going to work with the data.  Unlike traditional applications which typically connect directly to a central database (whether they be a winforms or web app) OC Apps need to have data available when they are offline.  This means having a local datastore – with the release of SQL Server Compact Edition (v3.1) earlier this year this decision is now quite easy.  Orcas will ship with v3.5 of SQL Server CE which has some minor improvements around synchronisation.

This leads me to the next problem – how do I synchronise data from the central database to the local datastore (ie my Sql Server CE database)? In the past we had to choose between building this ourselves (eg using webservice with some data structure, perhaps datasets), using RDA or Merge Replication.  Last year Steve Lasker started talking about OCS or, as it is now called, the Microsoft Synchronisation Services.  This is a framework for building logic that will synchronise data between a “client” and a “server” – although the first release will focus on supporting the SQL Server CE (client) to SQL Server (server) scenario, there is no reason why you can’t do SQL Server Express to SQL Server, or even SQL CE or SQL CE.

MS Sync Services, as I mentioned in a previous post, also has designer support within Orcas.  Although the designer in Beta 1 has changes somewhat (the “Synchronisation” group box is no longer there – you have to build your own logic around when synchronisation is triggered) it still builds the majority of the functionality you need to be able to get syncing (more on what works/doesn’t work in a later post).  This designer can output both the client and server code.  Of course building an occasionally connected application we want to put the client code in our application and the server code in a webservice or WCF project (more on configuring this in a further post).

Now that we have a local datastore (SQL Server CE) that is setup to synchronise with the central database (using MS Sync Services) we now need to be able to read and write to the database, and to bind data to UI controls.  This can all be done using Linq to Entities.  As a few people have noted in Beta 1 there are a few issues with the Entities designer but if you are happy to work with the command line tool this can save you a lot of work accessing your data.  Once you have setup the Entity models you can then use Linq to pull back a set of objects (strongly typed of course) from the database.  These can then be bound to your UI using a binding source (the same as you would have done in VS2005).  You can even add/remove items using the Navigation control.  When you are done making changes all you need to do is call SaveChanges on the data context and you are done – this commits changes to the local database, you need to synchronise for these changes to be persisted to the server!

This gives you an overview of how Orcas can facilitate building occasionally connected applications.  I will follow this up with posts that go into more detail about some of these features – in particular the areas that are currently broken and some gotchas!

Imagine Cup Experiences

Imagine Cup Experiences


A week or so ago Nick Ellery (still can’t find a blog for him but he made a ballsy comment about Women in IT on the Academic blog), the new academic intern with the DPE team here in Australia, asked me to comment on some of my experiences with the Imagine Cup worldwide finals.  I was a finalist judge in 2004 (Brazil) and 2005 (Japan) and I cannot rave enough about the level of this competition. 

If you are a student who is in the process of entering this years Imagine Cup please feel free to comment on this post and I’ll try and answer any questions you might have regarding the finals process (or at least based on what they were in the past – no guarantee they will be the same this year)

Finals Format

The format usually consists of three phases:

  • Introductory round (not judged): In this round the contestants are given their first opportunity to meet with the judges for approximately 10 minutes to give overview of their entry.  This round is typically held the day before the main event and in the two years that I was involved varied between a booth setup (where contestants gave an overview/demo of their product at an exhibition style booth) and a presentation room.  I would suggest that there is a high correlation between the groups that made effective use of this round with those that make the finals round.  Some pointers for this round:

    • Think “elevator pitch” – this round is short and sharp.  Get started on time, don’t waste time with power point and you don’t all need to present.  Some groups insisted on having all participants talking – not necessary in this round.
    • Jazz it up as much as possible – this round is where you get to wow the judges into coming back to see more.  If they aren’t interested the first time round you are going to struggle to convince them of the merit of your entry in the next round
    • Get to know your judges – make sure you introduce everyone in the team but don’t do over kill (you’ll have more time in the next round); simple name, area of interest will probably suffice. Listen to what the judges have to say!!!!!  This includes where they are from (academic or industry), the questions they ask and their body language.  Take notes at the end of this round based on the judges (they will be doing the same about you) so that you can tailor your presentation to address their interests

  • Main round: In the main round each team is given 25 minutes (5 minutes allocated for transition) to present their entry.  The teams will present to the same set of judges they saw in the introductory round so they can assume that the judges haven’t forgotten everything (ie don’t spend too long on the same things).  Presentations are held in a separate presentation room so make sure you can move in, get setup and ready to go within a couple of minutes.  Although there are 5 minutes allocated, don’t be surprised if the previous group goes overtime or takes a minute or two to get off the stage – the less setup you have to do the better.  Some pointers for this round:

    • Make the most of the time – The competition is NOT about who you are or what you have done, so don’t waste too much time on your background. The competition IS about your entry – focus on background to the problem, your approach and the entry itself
    • Keep up the interest – In the opening round you will have hopefully captured the attention of the judges.  In this round you need to renew and foster this interest.  Do this by integrating “boring” content between bits of “interesting” content.  The reality is that you do have to cover things like the architecture of the solution, but you need to present it in a way that will maintain the interest of the judges.
    • Your application is not just a 3tier architecture – Don’t just drop hype words into your architecture – particularly if you don’t understand them and/or you aren’t using that technology.  Focus on what differentiates your solution and the areas where you are pushing the boundaries of any technology.
    • Who is the target market – This competition is NOT about building a commercial product BUT it needs to have a target market.  Who’s going to use the product? What’s the research behind the market demand? Have you thought about how the entry could be commercialised?  Is your solution ready to go, or does it need packaging or to be added into existing products?

  • Finals round: From the main round a number of teams (I think 6 or so) are selected to go through to the finals round.  In 2004 this was done in the same presentation room as the main round with the difference being that the other competitors get to sit in and watch and that they were presenting to the other judges.  In 2005 this was done in a massive conference hall with hundreds of guests invited and to a select group of finalist judges (myself included).  Some pointers for this round:

    • Introduce yourself – remember not all the judges will have met you in the earlier rounds and given their busy schedule they probably won’t have had an opportunity to look at your entry.  This is a little harder than the main round as you don’t know the background of the new judges.  If you can perhaps ask some of the other teams what the judges are like, what their questions were etc as this can give you a heads up as to the questions they might ask of you.
    • Get it right – if your demos had issues in the earlier rounds then make sure you fix them up and practice, practice, practice.  The winning entry will not only be good, they will present well too.  Take a look at previous winning entries and see how well polished they are.
    • Be entertaining – make the audience laugh and/or empathise with what you have done.  Make sure they aren’t laughing at you, rather with you!
    • Find the balance – you must present the technical details of your application but remember that this tends to be the dry part of your presentation so you need to focus on the parts that make your entry stand out from the pack.  Once you have identified them get someone with a keen graphical eye to present the information in an eye catching, yet meaningful, way. 
    • Don’t use Powerpoint – Powerpoint is for those people who can’t present.  If you must use powerpoint then keep it minimalistic and avoid using the standard templates.

Remember unlike the earlier rounds the finals competition is multi-stage.  Get to the venue early for ALL sessions.  Know what the schedule is, where you have to be places, how to get there and when your turn is going to be. Don’t think – I’ve just got to get through this round and then I can worry about the next round – take some time at the beginning to plan your campaign.

Most of all – don’t forget to have fun, meet as many people as you can and make sure you stay in contact with them.  The Imagine Cup is guaranteed to unlock doors – you just need to open them 😉

Trimboli alias unknown…

Trimboli alias unknown…

One of the posts I was reading earlier today pointed me to Oscar Trimboli’s blog on Unified Communications, in particular his post about the line up at TechEd 2007.  I came up with the title to this post because I think the name Trimboli sounds like something the team in Alias would go after – the bit about his alias being unknown was a little abstract taken from thoughts by a number of people profiled on Oscars blog who believe that we will eventually have a single address/handle/alias that will be used to send communications to (instead of having phone x 3, email, sms, snail mail, fax etc).  Which is all very good so long as everyone knows your alias 😉

Getting to the point: Over the last week or so I’ve been attempting to meet the Skype Challenge but feel that I’ve been failing cause the technology/software just isn’t right.  Through discussions over the weekend I came across a couple of other bits of technology that I thought readers (and Oscar) would be interested in.

  • VoIPStunt – Think Skype but way way way cheaper
  • GrandCentral – Unfortunately US only but it claims to be a single number through which you can be contacted….. interesting concept but not sure they could ever do that in Oz since the Telcos are sooooo slow at adopting change.
  • BT’s SDK – I mentioned this in an earlier post but I think that more applications could be built around services offered by the Telcos.  Given that it is going to be hard to make money out of legacy phone networks based on call costs etc I think we are likely to see more Telcos moving into the SaaS marketplace.
  • [Added] X-PDA – As Kevin across at jkOnTheRun mentions this is another pieve of technology for the mobile device that allows you to place calls.

Blackberry, bringing an Outage to a Windows Mobile near you!

Blackberry, bringing an Outage to a Windows Mobile near you!

Well the title is a little far fetched but as the response to Mr Mobile’s (aka Jason Langridge) post points out you can see that the timing of this RIM’s announcement is not very well thought out.  For those of you out there who didn’t hear about the outage: basically, RIM had a massive outage on their North American Blackberry network which meant those addict users had to go without their hit for around 8 hours. Jason has more information in his follow up post regarding the event.

Ok, so with that in mind RIM has come out and announced that they are going to have a version of their application deployment and device management software that will run on the Windows Mobile 6 platform.  Hmmm, ok so let me get this straight – I’m going to invest in a Windows Mobile device and then sign up for a service which might not respond for 8 hours, and when the network operator realises that there’s an issue they issue a “sorry for the disturbance” message?  I couldn’t think of a worse time to make this anouncement.

The other thing to think about is that RIM is definitely not the first to play in this application deployment (for mobile device) space:

And if you widen the scope to looking at device support there are a whole host of players such as i-mate that have their own device management suites.  Of course in Exchange 2007 we now have self-service device lock and wipe which in a large propotion of cases is half the battle!

Feedburner Networks

Feedburner Networks

The Australian & NZ MVPs, thanks to the prompting of Brian and the setup done by Mauricio, have put together a Feedburner network so that you don’t need to subscribe to all the individual feeds.  In Perth we have a similar network for Perth IT bloggers following the Technozone network Mauricio setup last year.  I would suggest that these networks are well worth subscribing to.

Perth IT Bloggers:

Australian & NZ MVPs:


Bill takes on RSS with VB9

Bill takes on RSS with VB9

Bill has converted the C# only Orcas Beta 1 RSS Feeder example into VB9.  In his conversion he has illustrated how Linq further reduces the need for iterators.  There are a couple of note worthy points from this example:

  • Try and work out exactly where each of the Linq statements are executed?
    • There are two linq expressions defined in the GetItems method but neither of them get executed until the ToArray method is called.  The ToArray method effectively iterates the expression converting the Ienumerable into an array (this is so that you can iterate the same array multiple times without reiterating/re-executing the linq expression)
  • Take a guess what the new Option Infer On means?
    • This controls whether types are inferred or not.  If this property is set to Off you can’t write Dim x = 5 and assume the compiler will know that x is an integer.

There are of course some weird behaviour to do with this new Option Infer:

Option Explicit – you must declare your variables

Option Strict – you must type your variables

Option Infer – you can infer the type

Ok, so now I’m confused so how about some examples:

Explicit [Off] Strict [Off] Infer [Off]
x = 5

[No compiler checking, x is an Object that is auto-declared essentially where it is first used]

Explicit [On] Strict [Off] Infer [Off]
Dim x = 5

[x is typed as Object since the compiler can only guess what it could be at runtime]

Explicit [On] Strict [On] Infer [Off]
Dim x as Integer = 5

[x is typed as an Integer and the compiler ensures that all references to x do appropriate casts.  With Infer off you can’t use anonymous types which means that all Linq statements have to return predefined types]

Explicit [On] Strict [On] Infer [On]
Dim x = 5

[x is typed as an Integer and the compiler ensures that all references to x do appropriate casts.  Anonymous typing is permitted as the type is inferred by the compiler]

Explicit [On] Strict [Off] Infer [On]
Dim x = 5

[x is typed as an Integer but the compiler allows implied type conversions (eg x = “6”).  Anonymous typing is permitted]


My recommendation is to turn Option Explicit and Option Strict on at a project level (as with previous versions of Visual Studio) and that you also turn on and get used to Option Infer as anonymous types truly enable the full power of Linq.

Windows Live OneCare – A Mechanic for your PC

Windows Live OneCare – A Mechanic for your PC

Having beta tested the first version or so of OneCare I had almost given up hope of Microsoft releasing a product that would meet my needs.  However installing the release version, which I must confess I’ve only just done, has been quite a positive experience. 

The only gotcha was with establishing a VPN connection.  After installation of OneCare trying to establish any VPN connection would fail without any indication of what was going wrong.  Recalling this from past experience I thought to go in an disable the firewall.  Doing this will prompt you to leave the firewall enabled but for it to bring up the Firewall Connetion Tool:

You’ll notice that I’ve not only included the VPN firewall exception, I’ve also checked the ActiveSync/WMDC option so that I can still connect my Windows Mobile device. Unlike in the early betas this does fix the issues that I was seeing.

The other thing I like about OneCare is TuneUp which you can schedule to occur:

Of course if you don’t want to install OneCare you can always go to the website where there is a run-once TuneUp option.

Simplifying your Build Server

Simplifying your Build Server

One of the tasks that the dev team at [Intilecta] has spent quite a bit of time on recently is reworking the build process.  Having been involved in the v1 build process I have been adding my 2 cents worth from time to time.  One such area was how to minimise the bits of software we need installed on the build server.

We are going to need a tool that can execute a build.  The obvious choice was to go with MSBuild since it comes with the .NET Framework v2.  Unfortunately at this stage we can’t get away without having [VS2005] installed as we need it to build our setup projects (we are hoping to change that later this version).

The next area we had to consider was how we handle the 3rd party control libraries we have installed.  At this stage we are using Infragistics and Dundas controls.  Both of these products have a substantial install which includes adding various assemblies to the GAC.  We wanted to be able to control the build process so that we don’t need these to be installed on the build machine.  Unfortunately doing this with the projects in their current form meant that we were getting compile errors similar to:

Error 1 Exception occurred creating type ‘Infragistics.Win.UltraWinTree.UltraTree, Infragistics2.Win.UltraWinTree.v6.3, Version=6.3.20063.1059, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb’ System.ComponentModel.LicenseException: Unable to locate license assembly. C:…licenses.licx

It turns out that these errors are caused by the license management framework (which AFAIK is actually part of the .NET Framework to support third party component vendors) as a result of having a license.licx file included in the project.  To see this (for VB.NET projects) you need to set Solution Explorer to show all files.  This file will then appear under the My Project folder (VB.NET) or Properties folder (C#) – it’s set as an Embedded Resource.

My understanding of how the license checking works goes like this: Having the licx file in the project causes the framework to try to create an instance of the class defined in the licx file.  As part of the constructor this class does some license checking to see if it is being run on a licensed development machine (control libraries are typically licensed on a per dev/per seat basis).  In the case of our build machine we haven’t installed the product so it fails this check and hence fails to create the object defined in the licx file.

If we remove the licx file the build starts to work (you also need to change the references from being references in the GAC to being references to the actual dlls since you don’t want to have to add the control libraries to the GAC on the build machine just so you can do a build).  This gives us a solution for our build process….. BUT

So why do we need the licx file at all?  Well if you now open the project and attempt to work with a form/panel/control that makes use of a 3rd party control you will get an exception similar to (if you don’t have the control library installed):

Unable to locate license assembly.
at Infragistics.Shared.UltraLicenseProvider.GetDesignTimeLicense(Type type, Object instance, Boolean allowExceptions, UltraLicenseBaseAttribute licenseAttribute)
at Infragistics.Shared.UltraLicenseProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
at System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license)
at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
at Infragistics.Win.UltraWinTree.UltraTree..ctor()

If you do have the library installed the licx gets created when you open the designer.  Just watch that you don’t check it back into source control with your project!

Skype Challenge Update

Skype Challenge Update

It’s now the 5th day since I announced my attempts at the Skype Challenge and by all accounts I feel that I’m failing.  That said, I’m going to keep persisting and attempting to reduce my phone dependency.  Here’s a few thoughts on where technology is currently failing:

Acknowledged problems (problems I knew I would encounter in this challenge)

  • Battery Life – My poor Dell Axim struggles to get through a whole day on a fully charged battery.  While I’m in the office it sits on my desk with the wireless off and plugged in but when I go home at night I turn the wireless on (so I’m “online” with Skype) and I set Activesync to poll every 15 mins or so.  Unfortunately by morning the battery has got so low that the wireless has been disabled!

  • Audio Quality – The Dell was never really designed to work as a phone.  Even with noise cancellation the audio is pretty poor quality.  On this respect I can’t wait to get my K-Jam back

  • Unable to Receive SMS – Clearly this was going to be an issue.  One solution to this problem would be for Skype to allow users to specify a mobile SkypeIn number – this could be used for not only incoming voice but also sending/receiving SMS messages

Unanticipated Issues

  • Audio Quality Degradation – When we head out for coffee to our regular haunt, Tiger Tiger, I usually enable the wireless for Skype.  I don’t typically get any calls but once or twice I’ve taken a call on the Dell.  The call is usually not bad, the line is quite fast so there is no delay or degradation of audio.  Unfortunately if someone else is downloading a file or also talking on Skype (or another VOIP app) the audio is unintelligible.  I seemed to recall that this is typically of ADSL style connections that only support up to around 800kbps upstream traffic (despite much larger download bandwidth).

  • Unavailability – I don’t know why I didn’t think of this issue before hand.  One of the reasons that Push Email works over GPRS and not over wireless is the inability for Windows Mobile to maintain an active connection to a wireless network when it is in suspend mode (which it can do over the GPRS network – since it has to do a similar thing to support incoming calls on the mobile network).  Of course this means that Skype (set to Wireless only mode since we are trying not to use the phone provider) is only available when the device is not suspended (ie when I’m using it).  Unless someone happens to call when I’m using the device I’m unlikely to receive the call!!!

  • Unable to Send SMS – Go figure – why did Skype leave this almost trivial functionality out of the Windows Mobile version of their client.  Just about every other function from the desktop is there, just not the ability to send SMS.

  • Contacts Unavailable – On the desktop I’ve become used to Skype automatically including my Outlook contacts in the Skype contacts list.  Unfortunately the mobile client doesn’t do this which makes using SkypeOut to call people a little harder (need to do a bit of copy-n-paste).

I hope this serves as an overview of the issues to date.  If anyone has any clever work arounds, please feel free to contact me.  Better still if you think you can, then take the Skype Challenge!