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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:53:18+00:00 2026-05-28T01:53:18+00:00

For our application we use a messaging system where using the information in the

  • 0

For our application we use a messaging system where using the information in the message we can build various objects using reflection on the fly. A simplified version of this is:

if(Message.Control == "ControlA")
    Assembly.LoadFrom("ControlsA.dll")
else if (Message.Control == "ControlB")
    Aseembly.LoadFrom("ControlsB.dll")

Once we have the assembly we then invoke various methods as required.

The problem at the moment is that when we use this method for Windows 7 installations we receive a “Could not load file or assembly” error where the path that is reported as been searched is the users desktop directory where the application was launched from via a short cut (C:\Users\*user*\desktop).

My question is; why is the above method not looking in the Application Path for the DLLs in Windows 7 when it works in XP, should we be doing something differently?

  • 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-28T01:53:18+00:00Added an answer on May 28, 2026 at 1:53 am

    How about using

    Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
    

    to get the path of the currently executing code? It should be easy to find your libraries when you have this info.

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

Sidebar

Related Questions

We use MVC controllers that access System.File.IO in our application and they work fine
The web client of our application makes use of xforms. A message box pops
Our application makes heavy use of factories to spit out objects, but I often
Have Log4Net configured in our application to use a date stamped name and a
In our Spring application we use clustered Hibernate Search with ActiveMQ which sets up
Our application used to make use of a common base form that all forms
We use OpenFileDialog across our application to select files. So far, we never used
We're planning to use standard ASP.NET user authentication for our application. However, by default
We are in the process of migrating our ASP.NET application to use Jquery instead
we use super-long Hashes for the Registration of new Users in our Application. The

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.