licenses.licx unable to resolve error

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

licenses.licx unable to resolve error

Postby bdill » Fri May 18, 2012 12:03 am

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

When I got the error:
Code: Select all
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: Select all
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@N0 ... hotostream
bdill
 
Posts: 28
Joined: Tue Feb 15, 2005 10:02 pm
Location: Nashville, TN

Postby Brian Donahue » Fri May 18, 2012 9:44 am

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.
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby bdill » Sat May 19, 2012 2:31 am

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... 8)
bdill
 
Posts: 28
Joined: Tue Feb 15, 2005 10:02 pm
Location: Nashville, TN

Postby Brian Donahue » Mon May 21, 2012 9:09 am

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'?
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby bdill » Wed May 23, 2012 1:19 am

Here are my results:


When I target the .Net 4 Framework I only get this in the Output window:
Code: Select all
------ 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@N0 ... hotostream

Code: Select all
------ 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.
bdill
 
Posts: 28
Joined: Tue Feb 15, 2005 10:02 pm
Location: Nashville, TN

Postby Brian Donahue » Wed May 23, 2012 9:39 am

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?
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 1 guest