| Author |
Message |
Suleon
Joined: 20 Mar 2007 Posts: 13
|
Posted: Thu Apr 26, 2007 1:22 pm Post subject: Problem with embedded licenses.licx file in VS 2003 .Net |
|
|
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 |
|
 |
Daniel Handley
Joined: 07 Feb 2005 Posts: 199 Location: Red Gate Software
|
Posted: Mon Apr 30, 2007 7:04 pm Post subject: |
|
|
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 |
|
 |
Suleon
Joined: 20 Mar 2007 Posts: 13
|
Posted: Wed May 02, 2007 12:16 pm Post subject: |
|
|
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 |
|
 |
Daniel Handley
Joined: 07 Feb 2005 Posts: 199 Location: Red Gate Software
|
Posted: Wed May 02, 2007 12:56 pm Post subject: |
|
|
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 |
|
 |
Suleon
Joined: 20 Mar 2007 Posts: 13
|
Posted: Wed May 02, 2007 1:01 pm Post subject: |
|
|
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 |
|
 |
Daniel Handley
Joined: 07 Feb 2005 Posts: 199 Location: Red Gate Software
|
Posted: Wed May 02, 2007 1:03 pm Post subject: |
|
|
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 |
|
 |
Suleon
Joined: 20 Mar 2007 Posts: 13
|
Posted: Wed May 02, 2007 1:06 pm Post subject: |
|
|
| Oh, this was a mistake. I am using VS 2005 with .NET 2 |
|
| Back to top |
|
 |
Suleon
Joined: 20 Mar 2007 Posts: 13
|
Posted: Tue May 15, 2007 7:03 am Post subject: |
|
|
Hello!
I still have no solution for that problem. Does anyone else has this trouble with licensing?
Ciao
Susanne |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6341 Location: Red Gate Software
|
Posted: Fri Jun 08, 2007 2:19 pm Post subject: |
|
|
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
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
tcmdba
Joined: 08 Jun 2007 Posts: 1
|
Posted: Fri Jun 08, 2007 10:42 pm Post subject: Same Problem |
|
|
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 |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6341 Location: Red Gate Software
|
Posted: Sat Jun 09, 2007 12:33 am Post subject: |
|
|
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
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6341 Location: Red Gate Software
|
Posted: Sat Jun 09, 2007 1:03 am Post subject: |
|
|
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. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
Suleon
Joined: 20 Mar 2007 Posts: 13
|
Posted: Mon Jun 11, 2007 2:31 pm Post subject: |
|
|
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 |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6341 Location: Red Gate Software
|
Posted: Mon Jun 11, 2007 4:27 pm Post subject: |
|
|
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
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6341 Location: Red Gate Software
|
Posted: Mon Jun 11, 2007 8:37 pm Post subject: |
|
|
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
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
|