Red Gate forums :: View topic - Problem with embedded licenses.licx file in VS 2003 .Net
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Toolkit Previous Versions
SQL Toolkit Previous Versions forum

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

Search in SQL Toolkit Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Go to page 1, 2  Next
Author Message
Suleon



Joined: 20 Mar 2007
Posts: 13

PostPosted: Thu Apr 26, 2007 1:22 pm    Post subject: Problem with embedded licenses.licx file in VS 2003 .Net Reply with quote

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
Back to top
View user's profile Send private message
Daniel Handley



Joined: 07 Feb 2005
Posts: 199
Location: Red Gate Software

PostPosted: Mon Apr 30, 2007 7:04 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Suleon



Joined: 20 Mar 2007
Posts: 13

PostPosted: Wed May 02, 2007 12:16 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Daniel Handley



Joined: 07 Feb 2005
Posts: 199
Location: Red Gate Software

PostPosted: Wed May 02, 2007 12:56 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Suleon



Joined: 20 Mar 2007
Posts: 13

PostPosted: Wed May 02, 2007 1:01 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Daniel Handley



Joined: 07 Feb 2005
Posts: 199
Location: Red Gate Software

PostPosted: Wed May 02, 2007 1:03 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Suleon



Joined: 20 Mar 2007
Posts: 13

PostPosted: Wed May 02, 2007 1:06 pm    Post subject: Reply with quote

Oh, this was a mistake. I am using VS 2005 with .NET 2
Back to top
View user's profile Send private message
Suleon



Joined: 20 Mar 2007
Posts: 13

PostPosted: Tue May 15, 2007 7:03 am    Post subject: Reply with quote

Hello!

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

Ciao
Susanne
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6677

PostPosted: Fri Jun 08, 2007 2:19 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
tcmdba



Joined: 08 Jun 2007
Posts: 1

PostPosted: Fri Jun 08, 2007 10:42 pm    Post subject: Same Problem Reply with quote

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6677

PostPosted: Sat Jun 09, 2007 12:33 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6677

PostPosted: Sat Jun 09, 2007 1:03 am    Post subject: Reply with quote

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:
Quote:
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.
Back to top
View user's profile Send private message
Suleon



Joined: 20 Mar 2007
Posts: 13

PostPosted: Mon Jun 11, 2007 2:31 pm    Post subject: Reply with quote

Hi Brian,

I am using Framework 2. Here is my registry entry:
sdkInstallRootv2.0 = C:\Programme\Microsoft Visual Studio 8\SDK\v2.0
The 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
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6677

PostPosted: Mon Jun 11, 2007 4:27 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6677

PostPosted: Mon Jun 11, 2007 8:37 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Go to page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group