I can think of a few reasons for an invalid licence resource. If you find the licence resource in your assembly output, then either the resource had been created with the wrong name, the assembly had been renamed, or the library being used is not licensed.
If you want to change the name of your assembly, it's necessary to completely rebuild it with the new name. Renaming a compiled assembly breaks the licensing.
The resource must also have a name that matches the assembly name, case-sensitively. If your assembly is called Foo.exe, then your licensing resource should be called Foo.exe.licenses.
If you are using SQL Data Compare, then the licence resource must contain the text RedGate.SQLDataCompare.Engine.ComparisonSession. If this is missing, maybe you have only licensed the schema components of the SQL Comparison SDK and not the data components. If you are using both, then you have to make sure that you include them both in the licenses.licx file, for instance
RedGate.SQLCompare.Engine.Database, RedGate.SQLCompare.Engine <new line>
RedGate.SQLDataCompare.Engine.ComparisonSession, RedGate.SQLDataCompare.Engine <new line>