Problem with embedded licenses.licx file in VS 2003 .Net

Forum for users of SQL Toolkit 3,4,and 5

Problem with embedded licenses.licx file in VS 2003 .Net

Postby Suleon » Thu Apr 26, 2007 1:22 pm

Hello again,

I am loosing my nerves on a licensing problem. I think it's a Visual Studio 2003 problem but maybe somebody can help me:

I want to use API from RedGate.SQLCompare.Engine and RedGate.SQL.Shared. When I try to make a synchronisation I get an exception that SQL Comparer is not reigstrated. So I followed the instructions from the toolkit help.

I added an embedded licenses.licx file to the resources of my project. I still have other license files in other projects e.g. ActiveReports, ComponentOne When I try to compile my projects I get an error message:

Error 17 "LC.exe" ended with Code -1
C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\Microsoft.Common.targets 1669 9 UptimeWinPresentation
============================================================
CompileLicxFiles

Compile .licx files (containing information about licensed controls used by the application) into .licenses files.

[IN]
@(_LicxFile) - The list of .licx files in the project (usually there will be just one)

[OUT]
@(CompiledLicenseFile) - The list of compiled .licenses files (there will be just one)
============================================================
-->
<PropertyGroup>
<CompileLicxFilesDependsOn></CompileLicxFilesDependsOn>
</PropertyGroup>
<Target
Name="CompileLicxFiles"
Condition="'@(_LicxFile)'!=''"
DependsOnTargets="$(CompileLicxFilesDependsOn)" Inputs="$(MSBuildAllProjects);@(_LicxFile);@(ReferencePath);@(ReferenceDependencyPaths)"
Outputs="$(IntermediateOutputPath)$(TargetFileName).licenses">
<LC
Sources="@(_LicxFile)"
LicenseTarget="$(TargetFileName)"
OutputDirectory="$(IntermediateOutputPath)" OutputLicense="$(IntermediateOutputPath)$(TargetFileName).licenses" ReferencedAssemblies="@(ReferencePath);@(ReferenceDependencyPaths)"
ToolPath="$(LCToolPath)">
<Output TaskParameter="OutputLicense" ItemName="CompiledLicenseFile"/>
<Output TaskParameter="OutputLicense" ItemName="FileWrites"/>
</LC>
</Target>


When I add the RedGate parts to one of the existing license files I also get this error. When I remove the license file and the RedGate content, it gets compilable again.

Is there an other way to distribute and use the API? I am looking forward to any hints.

Susanne
Suleon
 
Posts: 13
Joined: Tue Mar 20, 2007 8:34 am

Postby Daniel Handley » Mon Apr 30, 2007 7:04 pm

Hi Susanne

Can you let us know what is inside the licx file you created.

This is most often the problem as the format has to be just right.

Regards
Dan
Daniel Handley
Red Gate Software Ltd
Daniel Handley
 
Posts: 198
Joined: Mon Feb 07, 2005 3:05 pm
Location: Red Gate Software

Postby Suleon » Wed May 02, 2007 12:16 pm

Hello!

the content was:
RedGate.SQLCompare.Engine.Database, RedGate.SQLCompare.Engine
RedGate.SQLDataCompare.Engine.ComparisonSession, RedGate.SQLDataCompare.Engine

followed by a blank line. I followed the instructions from the help file.

Regards, Susanne
Suleon
 
Posts: 13
Joined: Tue Mar 20, 2007 8:34 am

Postby Daniel Handley » Wed May 02, 2007 12:56 pm

Hi

This looks good.
If you copied it from the help file it may be worth actually typing it out as this can resolve issues sometimes.

Also can you check that the software has already been activated on you machine.

Finally can you check to see why you are using lc from .net 2 rather than .net 1.1 from VS 2003.

Dan
Daniel Handley
Red Gate Software Ltd
Daniel Handley
 
Posts: 198
Joined: Mon Feb 07, 2005 3:05 pm
Location: Red Gate Software

Postby Suleon » Wed May 02, 2007 1:01 pm

Hi Dan,

I will try to type the words manually.

The software is activated. I can use the UI-Program and the command line tools without license dialog appearing.

What do you mean with "lc from .NET 2"? Yes, I use .NET 2 framework. Is this not supported yet?

Regards
Susanne
Suleon
 
Posts: 13
Joined: Tue Mar 20, 2007 8:34 am

Postby Daniel Handley » Wed May 02, 2007 1:03 pm

In your original message you have copied the message.

Error 17 "LC.exe" ended with Code -1
C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\Microsoft.Common.targets 1669 9 UptimeWinPresentation

This shows that you are using .net 2. VS 2003 uses .Net 1.1 to use .Net 2 you should be developing in VS 2005.

Dan
Daniel Handley
Red Gate Software Ltd
Daniel Handley
 
Posts: 198
Joined: Mon Feb 07, 2005 3:05 pm
Location: Red Gate Software

Postby Suleon » Wed May 02, 2007 1:06 pm

Oh, this was a mistake. I am using VS 2005 with .NET 2
Suleon
 
Posts: 13
Joined: Tue Mar 20, 2007 8:34 am

Postby Suleon » Tue May 15, 2007 7:03 am

Hello!

I still have no solution for that problem. Does anyone else has this trouble with licensing?

Ciao
Susanne
Suleon
 
Posts: 13
Joined: Tue Mar 20, 2007 8:34 am

Postby Brian Donahue » Fri Jun 08, 2007 2:19 pm

Hi Susanne,

Reading this, my feeling is that the issue is somehow caused by multiple assemblies using the same licensing strategy. Does it work if you remove the other components and compile referencing only the SQL Toolkit assemblies?
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Same Problem

Postby tcmdba » Fri Jun 08, 2007 10:42 pm

Just wanted to let you know that I have the same issue. I am running the SQL Compare tutorial and each time I rebuild the project I am prompted to register the Toolkit.
Running MS Visual Studio .NET 2003 and using the VB SQLCompareCodeSnippets Tutorial.
Latest version of SQL Toolkit.
tcmdba
 
Posts: 1
Joined: Fri Jun 08, 2007 10:36 pm

Postby Brian Donahue » Sat Jun 09, 2007 12:33 am

Hi,

I think you've got a different issue, tc. If you get prompted to enter a serial number at every build, that's probably not critical. Every time you start a new project, you may need to reactivate because RedGate.Licensing.Helper can't find the licence file from the last time you'd activated. This could be because the .lic file created after activation is not in your assembly references path?

Now if you deploy the licensed assembly and it asks for activation on the user's computer, then something didn't work right.

Now Susanne can't even get to the bit where you enter a serial number as far as I can tell, because good old Microsoft lc.exe is throwing an error.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Sat Jun 09, 2007 1:03 am

Susanne,

If you're using VS2003 can you please check the properties on licenses.licx, make sure the build action is 'embedded resource'. *very important*!

I think Dan may also have been on to something -- VS2003 may be calling the wrong version of lc.exe. What I know about embedded resources suggests that resources created by .NET 1.1 are not compatible with .NET 2.0 (I see this sometimes in Packager), so maybe the issue is that lc.exe simply doesn't understand the automatically-generated resource created by VS2003.

Can you please check this registry value:
HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\.NETFramework\\sdkInstallRootv1.1

This should point out the location of lc.exe to VS2003 (append 'Bin' to that path). Maybe this is set to an invalid file path and/or lc.exe is missing or damaged.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby Suleon » Mon Jun 11, 2007 2:31 pm

Hi Brian,

I am using Framework 2. Here is my registry entry:
sdkInstallRootv2.0 = C:\\Programme\\Microsoft Visual Studio 8\\SDK\\v2.0The directory is existing and contains bin folder and lc.exe

I also checked the properties of the license file. It i embedded resource.

Regards
Susanne
Suleon
 
Posts: 13
Joined: Tue Mar 20, 2007 8:34 am

Postby Brian Donahue » Mon Jun 11, 2007 4:27 pm

Hi Susanne,

Just to confirm: you are using VS2005 and .NET Framework 2.0? At the start of the thread it looked like VS2003 was trying to load lc.exe from .NET 2.0's folder.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Mon Jun 11, 2007 8:37 pm

If the above is true, can you try going into Visual Studio 2003 setup and installing or reinstalling the 'SDK'? Maybe the unavailability of the 2003 version of lc.exe is the issue.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Next

Return to SQL Toolkit Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests