Red Gate forums :: View topic - licenses.licx unable to resolve error
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

licenses.licx unable to resolve error

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
bdill



Joined: 15 Feb 2005
Posts: 28
Location: Nashville, TN

PostPosted: Fri May 18, 2012 12:03 am    Post subject: licenses.licx unable to resolve error Reply with quote

I've started from the Web Help page: http://help.red-gate.com/help/SQLCompareAPIv10/0/en/index.htm

When I got the error:
Code:
Unable to resolve type 'RedGate.SQLCmpare.Engine.Database,RedGate.SQLCompare.Engine'


I found this page: C:\Program Files\Red Gate\SQL Comparison SDK 10\Assemblies\SQL Compare

I've followed pretty much everything to the T except my DLLs are installed in C:\Program Files\Red Gate\SQL Comparison SDK 10\Assemblies\SQL Compare rather than the suggested C:\Program Files\Red Gate\SQL Data Compare <version>\ and I have my references set accordingly.

My licenses.licx file contains one line:
Code:
RedGate.SQLCompare.Engine.Database,RedGate.SQLCompare.Engine

but it still gets the same error. It never prompts for my serial #.

http://www.flickr.com/photos/9431737@N08/7218321726/in/photostream
http://www.flickr.com/photos/9431737@N08/7218321726/in/photostream
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6644

PostPosted: Fri May 18, 2012 9:44 am    Post subject: Reply with quote

Sorry for the inconvenience, this is a known error caused by the licensing client, because it was targeted at .NET 2 and therefore the string resources are incompatible with .NET 4.

The workaround is to compile one of the sample projects with the target framework version set to 2 in the csproj or vbproj file. This will allow the activation dialog to show so you can enter a serial number.

Once you have entered your serial number and activated, you can go on and compile the project you have built against .NET 4. Since the need to activate will be gone, you will not get an activation window and therefore won't get the error any more.
Back to top
View user's profile Send private message
bdill



Joined: 15 Feb 2005
Posts: 28
Location: Nashville, TN

PostPosted: Sat May 19, 2012 2:31 am    Post subject: Reply with quote

I failed to fully document my process, but I loaded a sample project in VS 2010. It upgraded OK. I ran it, and I updated the references to my install folder and set the target to .Net 2.0. I can't remember if it built without errors or not, but I do know that it never prompted me for a serial #.

Back to my own project. I still get the same error as before. If I target .Net 2.0 on my project it builds and runs, but if I change the target back to .net 4.0 or 4.0 Client, it gives the same "Unable to resolve type..." error as before.

Is there any chance of getting the licensing client updated to .Net 4.0? And the sample projects with it? .Net 4.0 is a solid 2 years old now... Cool
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6644

PostPosted: Mon May 21, 2012 9:09 am    Post subject: Reply with quote

Maybe it's not the same problem - can you please check the inner exception and does it say something like FileNotFound exception for the file 'RedGate.Licensing.Client.Resources.dll'?
Back to top
View user's profile Send private message
bdill



Joined: 15 Feb 2005
Posts: 28
Location: Nashville, TN

PostPosted: Wed May 23, 2012 1:19 am    Post subject: Reply with quote

Here are my results:


When I target the .Net 4 Framework I only get this in the Output window:
Code:
------ Build started: Project: CreateRedGateSnapshot, Configuration: Debug x86 ------
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

No Errors, warnings or messages in the Error list window.

When targeting the .Net 4 Framework Client profile I get these warnings and error:
http://www.flickr.com/photos/9431737@N08/7252425942/in/photostream

Code:
------ Build started: Project: CreateRedGateSnapshot, Configuration: Debug x86 ------
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3252: Could not resolve assembly "System.Web". The assembly is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3253: The referenced assembly "RedGate.SQLCompare.Rewriter, Version=10.0.0.192, Culture=neutral, PublicKeyToken=7f465a1c156d4d57, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3253: The referenced assembly "RedGate.Shared.Utils, Version=9.5.0.440, Culture=neutral, PublicKeyToken=7f465a1c156d4d57, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3253: The referenced assembly "RedGate.Shared.SQL, Version=9.5.0.440, Culture=neutral, PublicKeyToken=7f465a1c156d4d57, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3253: The referenced assembly "RedGate.SQLCompare.Engine, Version=10.0.0.192, Culture=neutral, PublicKeyToken=7f465a1c156d4d57, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3253: The referenced assembly "RedGate.SQLCompare.ASTParser, Version=10.0.0.192, Culture=neutral, PublicKeyToken=7f465a1c156d4d57, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
licenses.licx(1): error LC0003: Unable to resolve type 'RedGate.SQLCompare.Engine.Database,RedGate.SQLCompare.Engine'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The System.Web warnings are expected since it is a Client profile... There is no inner exception that I can see. Right clicking on it doesn't present any menu items related to inner exceptions.

Just for shucks, I tried targeting .Net 3.0 and 3.5 Frameworks.

3.0 worked just fine (same as .Net Framework 2.0)

3.5 gave the same results as 4.0 - failed to build with no Errors, Warnings or Messages in the Error List window.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6644

PostPosted: Wed May 23, 2012 9:39 am    Post subject: Reply with quote

I'm afraid I can't tell what's wrong with no error information. If it were the licensing that was the problem, you should see the error about resources, or some kind of "unable to resolve type"... error in the build output.

SDK does not support the .NET Client profile. It needs to be full .NET.

Maybe Visual Studio has eaten your homework... can you create a new project from scratch targeting 4.0 and add all of the code back in?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
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