[…\Sage_SA.Domain.dll] Strong-name signed assemblies must specify a public key in their InternalsVisibleTo declarations” in the latest SDK (2015.3 CA)

SUGGESTED

Hi,

Question about the latest SDK (2015.3 Canadian version), I got […\Sage_SA.Domain.dll]Strong-name signed assemblies must specify a public key in their InternalsVisibleTo declarations” when I call the function SDKInstanceManager.Instance.OpenDatabase. Is it a bug issue in the latest SDK?

Thanks,

Kai

  • 0
    Did this ever get answered? I have the same issue.
  • 0

    Hi,

    I was able to run the .EXE file from the c# sample directory, then also run it from the Visual c# 2010 IDE after rebuilding it.

    This code is at line 1500 in the c# SDKExample.

    if (SDKInstanceManager.Instance.OpenDatabase(saiFile, username, password, false, "Sage 50 SDK Sample Program", "SASDK", 1))

    Could you please post the segment of code that's crashing?

    I opened the sample data file from Sage 50, then opened the file's folder from File | Properties.  Then dragged and dropped onto the window, and removed the quotes.


    Other fun facts:

    The username and password are case sensitive, and the password length in the Sage interface is 7 charactors.  The SDK will try to match up 'Password' with 'Passwor' and fail. 

  • 0
    I also have the same issue after updating code that worked with previous versions of the SDK to 2015.3 and so I would appreciate some advice from Sage support.
  • 0 in reply to TerryJohnson

    I've submitted enough bugs to know that my response of 'works on my machine' isn't terribly helpful.  But an error message without some code isn't test-able.

    If you have purchased the SDK, you have access to free support.

    If not, based on past responses in this forum, Sage Support will recommend that you purchase the SDK, and then contact their support.   

    (edit)

    I stand corrected.  If what Harjot from Sage Support suggested doesn't help in your situation, please post more information.  I was working on a fully patched Windows 8.1 workstation, so it would have had the latest .NET framework.   According to https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx running version 4.52 (release 0x0005cbf5 / 379893)

    Programming is a hobby for me, so I promise nothing, but you never know, a second pair of eyes and all that...

    The minimum I would need to go further would be which SDK version your code was working / not working in, plus the offending few lines of code.  Among the many things I haven't tried in order to reproduce the problem, is to take an old (like 2013.1) c# SDK_Example, move the project to the 2015.3 release and try it there.  


     
    .

  • 0 in reply to TerryJohnson
    SUGGESTED
    Hi

    To solve the problem please try to install the full .Net Framework 4.5.2 on the computer you are installing the latest version of the SDK. If this still does not work please contact the Sage 50 Support center at 1-888-522-2722.

    Thank You

    Harjot Aujla
    Principal Customer Support Analyst
    Sage 50 Canada
  • 0 in reply to HarjotA
    Hi guys,

    Is someone found a way to fix this issue?
    I'm having the same problem...
  • 0 in reply to NAsselin
    Having the full .Net Framework 4.5.2 on the client machine running my software fixed the DLL signing issue for me. Setting it as a prerequisite in your installer should fix the issue for your users by offering the update to .Net if it is needed.
  • 0 in reply to TerryJohnson
    Thanks Terry for your quick response.
    Sadly this seems not to be enough on my side.
    Did you had also to compile your dll that communicate with the SDK in .NET 4.5.2 as well?
  • 0 in reply to NAsselin
    I have .Net 4.5 on the system where the software was compiled, but the target in Visual Studio is still .Net 4 (full)
  • 0 in reply to TerryJohnson
    Alright.
    Thanks Terry.
    I will continue my investigation.
    I'll keep you posted
  • 0
    Hey Guys,


    Any update on this issue iv been looking all over the internet for a solution to this issue. I have .net 4.5.2 installed on my machine and the target framework set to 4.5.2 to no avail any other suggestion would be greatly appreciated thanks. side note the connection was working fine before i updates to version 22.30.0.1 of the sdk
  • 0
    Hum, taking a look at the decompiled assembly shows:

    [assembly: InternalsVisibleTo("BindingFilteringTest")]

    in the Sage_SA.Domain.dll of version 22.30.0.1.

    Someone forget to remove a unit test?

    The runtime error is:

    An unhandled exception of type 'System.MethodAccessException' occurred in Sage_SA.SDK.dll

    Additional information: [C:\***\c#\bin\Debug\Sage_SA.Domain.dll] Strong-name signed assemblies must specify a public key in their InternalsVisibleTo declarations.
  • 0 in reply to jack b
    Hi everyone,
    I have fixed the issue after uninstalling all .net library and reinstalling all of it until 4.5.2 . In my case .net 4.5.2 was already intall on the computer, but it look like it wasn't installed properly at first...