licenses.licx unable to resolve error

bdillbdill Posts: 41
edited March 11, 2015 8:01AM in SQL Compare Previous Versions
I've started from the Web Help page: http://help.red-gate.com/help/SQLCompar ... /index.htm

When I got the error:
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:
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/[email protected]/7218321726/in/photostream
http://www.flickr.com/photos/[email protected] ... hotostream

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    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.
  • 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)
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    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'?
  • Here are my results:


    When I target the .Net 4 Framework I only get this in the Output window:
    ------ 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/[email protected] ... hotostream
    ------ Build started: Project: CreateRedGateSnapshot, Configuration: Debug x86 ------
    c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets&#40;1360,9&#41;: 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&#40;1360,9&#41;: 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&#40;1360,9&#41;: 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&#40;1360,9&#41;: 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&#40;1360,9&#41;: 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&#40;1360,9&#41;: 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&#40;1&#41;: 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.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    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?
  • Hello bdill...
    I am facing exactly the same problem as you were facing.
    Can you please tell me how you managed to resolve it..??
    I am in urgent need.
    Please help.
Sign In or Register to comment.