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

  • SEARCH
  • Home
  • 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 1072205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:49:30+00:00 2026-05-16T20:49:30+00:00

While pursuing a spearate problem I’ve come to a very peculiar situation. A demo

  • 0

While pursuing a spearate problem I’ve come to a very peculiar situation. A demo code would be:

public class Global : HttpApplication
{
    protected void Application_Start(object sender, EventArgs e)
    {
        Log("In Application_Start");
        SomeClass.SomeProp = ConfigurationManager.AppSettings["PropValue"];
    }
    protected void Application_BeginRequest(object sender, EventArgs e)
    {
        Log("In Application_BeginRequest");
        try
        {
            this.Application_Start(null, null);
        }
        catch ( Exception ex )
        {
            Log(ex.ToString());
        }
        Log("At the end of Application_BeginRequest");
    }
}

What I get in my log is:

In Application_BeginRequest

Could not load file or assembly 'vjslib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException
    at MyRootNamespace.Global.Application_Start(Object sender, EventArgs e)
    at MyRootNamespace.Global.Application_BeginRequest(Object sender, EventArgs e) in D:\My Documents\Visual Studio 2008\Projects\SolutionDir\ProjectDir\Global.asax.cs:line 109

At the end of Application_BeginRequest

This makes no sense to me whatsoever. Consider:

  • vjslib is referenced by my main project (assembly) which includes the Global class. Why was the assembly loaded at all if its dependencies could not be resolved?
  • SomeClass is in another assembly which also references vjslib. SomeClass does use vjslib and some members do expose classes that are derived from classes in vjslib, but the property used here is just a plain old string.
  • Why is there no line number in the first line of the stack trace?

Are the dependencies resolved on a per-method basis? I thought that Microsoft doesn’t do such things anymore. What’s going on here?

  • 1 1 Answer
  • 4 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-16T20:49:31+00:00Added an answer on May 16, 2026 at 8:49 pm

    I believe that when CLR encounter reference to some type in IL, it attempts to load it. And they may result in loading the assembly. So all dependent assemblies does not necessarily get loaded at the start up – they will be getting loaded on demand.

    Edit: See this question on SO about when assembly gets loaded. The book “CLR via C#” also talks about assembly getting loaded when type in encountered by JIT in IL.

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

Sidebar

Related Questions

While listening through Stanford's Programming Abstractions course, I come across some piece of code
While it's very handy, I very rarely, if ever, come across functions that return
While editing and fixing up code I have thought that sometimes it would be
While using boost::threads I have come across this interruption problem. When I do a
While writing a simple remoting test I've come up against a suprising situation involving
While editing .scm files it would be great if Vim would automatically put the
While making some final tests of a class-library that I'm writing for Windows Mobile
While using regex to help solve a problem in the Python Challenge , I
while($c=fgets(STDIN)){ if($c===PHP_EOL){ continue; } else { echo $c; } } When the above code
I would like to access (clone/push/pull) a private (via ssh) git repository while behind

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.