Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6375327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:36:03+00:00 2026-05-25T01:36:03+00:00

I’m in the situation that I have to use an unsigned third party .NET

  • 0

I’m in the situation that I have to use an unsigned third party .NET DLL in my signed application. So I decided to load that library dynamically at run-time:

var asm = Assembly.LoadFrom("THIRDPARTYASSEMBLY.DLL");

There is a static class in the DLL which I defined an interface for in my application and used GetUninitializedObject() to load the class:

var obj = FormatterServices.GetUninitializedObject(asm.GetType("NAMESPACE.CLASS")) as IMyInterface;

Although the class I’m trying to load is not abstract (It’s a public static class) I get this error at runtime:

System.MemberAccessException was unhandled: Cannot create an
abstract class.

Obviously I can’t use CreateInstance method because the static class doesn’t have any constructors.

So what would you suggest? I want to:

  • Invoke a public static method from that library. (I’m currently using InvokeMember().)
  • Get a Custom Type property.
  • Handle a few Custom Events in my application.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:36:03+00:00Added an answer on May 25, 2026 at 1:36 am

    Instead of trying to call the method dynamically, you could try to strong name the third party dll.

    You will need a key to strong name the dll with. You could either use the one you are already using for your own dll, or create a new one for this purpose (using sn -k).

    To strong name the already compiled assembly:

    1. Open a visual studio command prompt (to get the tools into your path).
    2. Generate il from the assembly:
      ildasm ThirdParty.dll /out:ThirdParty.il
    3. Rename the original ThirdParty.dll to something else.
    4. Generate a new dll, strong naming it as you do so:
      ilasm ThirdParty.il /dll /key=MyKey.snk

    This will result in a new ThirdParty.dll which will be strong named with the key you have specified. You can then add a direct reference to it and call the methods directly as you normally would.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.