Nancy Street

licenses.licx

Click to see the Site Map
HomeInfoMusicGalleryPetsGeoHobbiesGeo
Site MapWhat's NewRecent ChangesContactsServer StatisticsSite Information Home « Computers « DevBlog

Back to: Development Blog Contents

How to overcome this error: Could not transform licenses file 'licenses.licx' into a binary resource. error LC0004 : Exception occured creating type 'System.NullReferenceException'

My application uses a few ComponentOne controls such as C1FlexGrid, C1PrintPreview and C1Report. The whole solution was dead-copied over to a laptop with the same control versions in the GAC and compiled. The above error occured.

I couldn't figure out what was different, as the 2 PCs were as similar as I could make them, and I had manually checked all versions of the controls.

Web searches came up with lots of advice about simply deleting the licenses.licx file from your projects and rebuilding. This was supposed to recreate the licx files, but for me it didn't.

I finally found a vital clue here: Re: Could not transform licenses file

In this article step (2) hints that you have to open the form containing the controls, make a small change and save it to trigger the creation of the licx file. This is correct!

In Visual Studio I click the Show All Files button to show the licx files and delete them. I then opened 4 different forms, each one using a different C1 control. I made a tiny change on each form such as moving a control one pixel, then saved them. Now the licx files had been recreated with one text line for each control. The project now compiled cleanly and ran without generating any ComponentOne warning screens about "use a licensed copy".

So the trick is to delete the licx files and force Visual Studio to save all of the forms containing the licensed controls to regenerate the files.

December 2004 Update - I have sometimes found it easier to create a new empty Form, drag the C1 control onto that form, check that a new licx file has been generated, then delete the temporary form. Sometimes I have to close Visual Studio and reopen it and recompile to get the licx to generate.

Back to: Development Blog Contents


Contact Information | PGP Keys | Site Map | What's New | Visitor Book
Last Updated: 06-Aug-2007 21:10
Copyright © 1999-2007 Orthogonal Programming