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 1957986
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T07:57:22+00:00 2026-05-17T07:57:22+00:00

I have a class/library project I made in Visual Studio, a Spreadsheet in the

  • 0

I have a class/library project I made in Visual Studio, a Spreadsheet in the SS namespace. Next, I created a windows form application, I then added the DLL, and put it in my resources menu, and it builds just fine, however, at runtime, I get a TryLoadException, which the documentation seems to say means it’s not in the assembly, but then why does it compile just fine? Also, I doubt it is a problem with my DLL, as my friend made a similar DLL (matching the same APIs, but built differently, and it works for his Windows Forms application), and I still get the TryLoadException.

Here is the procedure I followed.

  1. Create (and implement) the spreadsheet class.
  2. Create a new solution and project for the spreadsheet gui.
  3. In the project, right click and add an existing item, the dll found in the first solutions bin/debug (or bin/release, I tried both) folder. Also added the dll to the references.
  4. Somewhere in the code that get’s executed, add the line:

    Spreadsheet ss = new Spreadsheet(); // They’re both in the same namespace already

  5. Build, note that there are no errors.

  6. Run, execution stops right there with the TryLoadException.
  • 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-17T07:57:23+00:00Added an answer on May 17, 2026 at 7:57 am

    You put the DLL in your resources menu? That seems really strange.

    Some things to try. First, after the build, go and look in the Windows Forms project’s Debug (or Release, whichever you are about to run) folder. You should see your exe there and also this DLL you need. If not, there is a problem with the way you set the reference, such as not having CopyLocal or something else.

    Second, if your DLL and your Windows Forms app are projects in the same solution, use a Project Reference instead of browsing to the DLL. This will make life a little simpler.

    Third, try double-clicking the exe instead of pressing F5 and see if that affects anything. (The current directory is different in these two cases which is often relevant when trying to find DLLs.)

    Fourth, try removing the reference, taking the DLL away from Resources or whatever strange place it is now, and adding the reference again. See if things behave better then.

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

Sidebar

Related Questions

I have created a dll in C++ using a Class Library project in Visual
I have a Windows Service project, A, with a dependency on a class library
I have a class library project that i have made. Let's call it ClassA.
I have a C# class library and a startup project (a console app). The
I have created a class library in VB .NET. Some code in the library
I have an solution in VS 2008 which contains two class library projects and
We have a class library where we keep a lot of the stuff that
I have a class library with some extension methods written in C# and an
I have a class library with all my database logic. My DAL/BLL. I have
I have a .NET class library containing a class with a method that performs

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.