Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / July 2007

Tip: Looking for answers? Try searching our database.

Strongly named assembly won't load

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Burns - 30 Jul 2007 16:10 GMT
Hi,

I have a C++ managed assembly (.dll) which links to a bunch of native
libraries. Everything works fine if I don't make the managed assembly a
strongly named one.

Once I make it a strongly named assembly by adding the following attribute:

   [assembly:System::Reflection::AssemblyKeyFile("pub_pri.snk")];

my test application (C# Test.exe) fails to load it and gives me the
following error:

   An unhandled exception of type 'System.IO.FileLoadException' occurred in
Test.exe

   Additional information: Could not load file or assembly
'Rimage.Rapid.Api.D, Version=2.0.6.1, Culture=neutral,
   PublicKeyToken=6a6da59bfa86aa07' or one of its dependencies. Strong name
validation failed. (Exception from HRESULT: 0x8013141A)

As far as I can tell I followed all the steps to strongly name an assembly
correctly.

I do recall reading somewhere that when a strongly named assembly links or
references a not strongly named assembly it is not considered a strongly
named assembly. Since my managed assembly links to native libraries, and I
assumed native libraries cannot be considered strongly named, can my managed
assembly every be strongly named? Is this why it doesn't load?

Thanks in advance, Dave
Mr. Arnold - 30 Jul 2007 23:53 GMT
<snipped>

> I do recall reading somewhere that when a strongly named assembly links or
> references a not strongly named assembly it is not considered a strongly
> named assembly. Since my managed assembly links to native libraries, and I
> assumed native libraries cannot be considered strongly named, can my
> managed
> assembly every be strongly named? Is this why it doesn't load?

Forget that it's talking about VB in someway in the title. SN is SN no
matter what .Net language is being used.

http://visualbasic.about.com/od/usingvbnet/a/FWTools5.htm

If a SN.exe cannot be used with all components that the application uses,
where a SN key can be given in the App.config file for the assembly or its
dependencies, then it's not a strong named solution. And that's exactly what
the error message is telling you.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.